[chore] tweaks to packager pieces
Some checks failed
/ clippy (push) Failing after 1m59s
/ test (push) Failing after 1m51s

This commit is contained in:
Chris Cochrun 2026-05-08 07:13:40 -05:00
parent 7d5a17c765
commit c7a1c9c96b
3 changed files with 38 additions and 9 deletions

View file

@ -72,7 +72,7 @@ features = ["wgpu"]
[package.metadata.packager]
version = "0.1.0"
identifier = "xyz.cochrun.lumina"
icons = ["res/icons/app.ico"]
icons = ["res/icons/app.ico" "res/icons/app.icns" "res/icons/app.svg"]
resources = ["res"]
category = "Video"
@ -81,6 +81,37 @@ allow_downgrades = true
[package.metadata.packager.nsis]
installer_icon = "res/icons/app.ico"
preinstall_section = """
Section PreInstall
; Check if GStreamer is already installed and skip this section
ReadRegStr $4 HKLM "SOFTWARE\\GStreamer1.0\\x86_64" "pv"
StrCmp $4 "" 0 gstreamer_done
Delete "$TEMP\\gstreamer1.0.exe"
DetailPrint "Downloading GStreamer"
nsis_tauri_utils::download "https://gstreamer.freedesktop.org/data/pkg/windows/1.28.2/msvc/gstreamer-1.0-msvc-x86_64-1.28.2.exe" "$TEMP\\gstreamer-1.0-msvc-x86_64-1.28.2.exe"
Pop $0
${If} $0 == 0
DetailPrint "Successfully downloaded GStreamer"
${Else}
DetailPrint "Error downloading GStreamer"
Abort "Canceling GStreamer install due to download error"
${EndIf}
StrCpy $6 "$TEMP\\gstreamer-1.0-msvc-x86_64-1.28.2.exe"
DetailPrint "Installing GStreamer"
; $6 holds the path to the gstreamer installer
ExecWait "$6" $1
${If} $1 == 0
DetailPrint "GStreamer successfully installed"
${Else}
DetailPrint "Error installing GStreamer"
Abort "Cancelling GStreamer install due to installation error"
${EndIf}
gstreamer_done:
SectionEnd
"""
[profile.release]
opt-level = 3

View file

@ -72,6 +72,7 @@
python313Packages.pip
unzip
appstream
appstream-glib
libcosmicAppHook
];

View file

@ -15,10 +15,7 @@ finish-args:
- --share=network
- --talk-name=com.system76.CosmicSettingsDaemon
- --talk-name=com.system76.CosmicSettingsDaemon.*
- --filesystem=xdg-documents
- --filesystem=xdg-pictures
- --filesystem=xdg-videos
- --filesystem=xdg-dowloads
- --filesystem=home:rw
- --filesystem=xdg-config/cosmic:rw
- --filesystem=xdg-data/lumina:rw
- --filesystem=xdg-cache/lumina:rw
@ -56,10 +53,10 @@ modules:
- just build-offline
# - cargo build --release
- install -Dm755 target/release/lumina -t /app/bin/lumina
- install -Dm644 res/icons/app.svg -t /app/share/icons/hicolor/scalable/apps/lumina.svg
- install -Dm644 res/xyz.cochrun.lumina.desktop -t /app/share/applications/xyz.cochrun.lumina.desktop
- install -Dm644 res/xyz.cochrun.lumina.metainfo.xml -t /app/share/metainfo/xyz.cochrun.lumina.metainfo.xml
- install -Dm755 target/release/lumina /${FLATPAK_DEST}/bin/lumina
- install -Dm644 res/icons/app.svg /${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/lumina.svg
- install -Dm644 res/${FLATPAK_ID}.desktop /${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
- install -Dm644 res/${FLATPAK_ID}.metainfo.xml /${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
sources:
# - type: git