From 74e8f5c444c4f88242c44d180b036a1aff1f6f64 Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Tue, 18 Mar 2025 09:30:44 +0000 Subject: [PATCH] wixl currently doesn't support so I'm swapping out to a file next-door to the configuration file, we should be able to reuse this for deb/rpm as well --- core/metrics/insights.go | 6 +++++- release/wix/build_msi.sh | 3 +++ release/wix/navidrome.wxs | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/metrics/insights.go b/core/metrics/insights.go index 965a24797..8654dc678 100644 --- a/core/metrics/insights.go +++ b/core/metrics/insights.go @@ -155,7 +155,11 @@ var staticData = sync.OnceValue(func() insights.Data { data.OS.Containerized = consts.InContainer // Install info - data.OS.Package = os.Getenv("ND_PACKAGE_TYPE") + packageFilename := filepath.Join(filepath.Dir(conf.Server.ConfigFile), "package") + packageFileData, err := os.ReadFile(packageFilename) + if err == nil { + data.OS.Package = string(packageFileData) + } // OS info data.OS.Type = runtime.GOOS diff --git a/release/wix/build_msi.sh b/release/wix/build_msi.sh index 9fc008446..c48e738dc 100755 --- a/release/wix/build_msi.sh +++ b/release/wix/build_msi.sh @@ -49,6 +49,9 @@ cp "${DOWNLOAD_FOLDER}"/extracted_ffmpeg/${FFMPEG_FILE}/bin/ffmpeg.exe "$MSI_OUT cp "$WORKSPACE"/LICENSE "$WORKSPACE"/README.md "$MSI_OUTPUT_DIR" cp "$BINARY" "$MSI_OUTPUT_DIR" +# package type indicator file +echo "msi" > "$MSI_OUTPUT_DIR/package" + # workaround for wixl WixVariable not working to override bmp locations cp "$WORKSPACE"/release/wix/bmp/banner.bmp /usr/share/wixl-*/ext/ui/bitmaps/bannrbmp.bmp cp "$WORKSPACE"/release/wix/bmp/dialogue.bmp /usr/share/wixl-*/ext/ui/bitmaps/dlgbmp.bmp diff --git a/release/wix/navidrome.wxs b/release/wix/navidrome.wxs index 9395e387a..ec8b164e8 100644 --- a/release/wix/navidrome.wxs +++ b/release/wix/navidrome.wxs @@ -61,7 +61,6 @@ Arguments='service execute --configfile "[INSTALLDIR]navidrome.ini" --logfile "[ND_DATAFOLDER]\navidrome.log"' /> -