From 6643438e289bf4f8c3e1367de6b8b502872cd90a Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Wed, 22 Jul 2026 12:39:28 +0100 Subject: [PATCH 1/3] Implementing the RememberProperty pattern for the settings set through the UI on install. Previously, these got reset on upgrade. This is as simple as squirrelling them away in the registry for all settings except for the INSTALLDIR, as the INSTALLDIR depends on the environment that the msi is being installed into (i.e. the actual location of ProgramFiles can be anywhere technically), that needs to be dynamically set after the CostFinalize phase and in the version of WiX schema supported by wixl needs to be implemented through a customAction. This will not fix the upgrade issue for existing installs, as the information entered doesn't exist in the registry or anything so the best option imo is to backup the navidrome database and config uninstall the old version and install the new version with the desired paths. It should then upgrade from there on correctly. --- release/wix/SettingsDlg.wxs | 2 +- release/wix/build_msi.sh | 2 +- release/wix/navidrome.wxs | 105 +++++++++++++++++++++--------------- 3 files changed, 63 insertions(+), 46 deletions(-) diff --git a/release/wix/SettingsDlg.wxs b/release/wix/SettingsDlg.wxs index 4a83f91da..cdc625434 100644 --- a/release/wix/SettingsDlg.wxs +++ b/release/wix/SettingsDlg.wxs @@ -16,7 +16,7 @@ - + diff --git a/release/wix/build_msi.sh b/release/wix/build_msi.sh index a8781a965..119abc8c5 100755 --- a/release/wix/build_msi.sh +++ b/release/wix/build_msi.sh @@ -40,7 +40,7 @@ fi # Download static compiled ffmpeg for Windows FFMPEG_FILE="ffmpeg-n${FFMPEG_VERSION}-latest-${WIN_ARCH}-gpl-${FFMPEG_VERSION}" -wget --quiet --output-document="${DOWNLOAD_FOLDER}/ffmpeg.zip" \ +[ ! -e "${DOWNLOAD_FOLDER}/ffmpeg.zip" ] && wget --quiet --output-document="${DOWNLOAD_FOLDER}/ffmpeg.zip" \ "https://github.com/${FFMPEG_REPOSITORY}/releases/download/latest/${FFMPEG_FILE}.zip" rm -rf "${DOWNLOAD_FOLDER}/extracted_ffmpeg" unzip -d "${DOWNLOAD_FOLDER}/extracted_ffmpeg" "${DOWNLOAD_FOLDER}/ffmpeg.zip" "*/ffmpeg.exe" "*/ffprobe.exe" diff --git a/release/wix/navidrome.wxs b/release/wix/navidrome.wxs index 6d94bab9d..3ea08ec27 100644 --- a/release/wix/navidrome.wxs +++ b/release/wix/navidrome.wxs @@ -14,6 +14,7 @@ + @@ -23,57 +24,72 @@ - - - + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -82,6 +98,7 @@ + Not Installed AND NOT WIX_UPGRADE_DETECTED Not Installed AND NOT WIX_UPGRADE_DETECTED From f9d839c8c07a8efb594bc934aa12d99ff1de45b9 Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Wed, 22 Jul 2026 12:54:26 +0100 Subject: [PATCH 2/3] Make it possible to build 386 and amd64 on the same machine --- release/wix/build_msi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/wix/build_msi.sh b/release/wix/build_msi.sh index 119abc8c5..df6805356 100755 --- a/release/wix/build_msi.sh +++ b/release/wix/build_msi.sh @@ -40,10 +40,10 @@ fi # Download static compiled ffmpeg for Windows FFMPEG_FILE="ffmpeg-n${FFMPEG_VERSION}-latest-${WIN_ARCH}-gpl-${FFMPEG_VERSION}" -[ ! -e "${DOWNLOAD_FOLDER}/ffmpeg.zip" ] && wget --quiet --output-document="${DOWNLOAD_FOLDER}/ffmpeg.zip" \ +[ ! -e "${DOWNLOAD_FOLDER}/ffmpeg_${WIN_ARCH}.zip" ] && wget --quiet --output-document="${DOWNLOAD_FOLDER}/ffmpeg_${WIN_ARCH}.zip" \ "https://github.com/${FFMPEG_REPOSITORY}/releases/download/latest/${FFMPEG_FILE}.zip" rm -rf "${DOWNLOAD_FOLDER}/extracted_ffmpeg" -unzip -d "${DOWNLOAD_FOLDER}/extracted_ffmpeg" "${DOWNLOAD_FOLDER}/ffmpeg.zip" "*/ffmpeg.exe" "*/ffprobe.exe" +unzip -d "${DOWNLOAD_FOLDER}/extracted_ffmpeg" "${DOWNLOAD_FOLDER}/ffmpeg_${WIN_ARCH}.zip" "*/ffmpeg.exe" "*/ffprobe.exe" cp "${DOWNLOAD_FOLDER}"/extracted_ffmpeg/${FFMPEG_FILE}/bin/ffmpeg.exe "$MSI_OUTPUT_DIR" cp "${DOWNLOAD_FOLDER}"/extracted_ffmpeg/${FFMPEG_FILE}/bin/ffprobe.exe "$MSI_OUTPUT_DIR" From 5b0aa3ee97f4de6274a21e6a5f70890ca1099202 Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Wed, 22 Jul 2026 13:59:55 +0100 Subject: [PATCH 3/3] When upgrading from the pre-fix installer, it would dump everything into the C:\ root as the UI never executes to set the value for the MSI_INSTALLATIONDIRECTORY, and the custom action doesn't run on upgrade as we should be reading from the registry in that situation This will force the customaction to run when the path is the confusingly named TARGETDIR (which is C:\ in 99% of cases). All other properties when upgrading from the pre-fix to the fix will be reset to the default values as well; which was the same as the previous behaviour anyway. --- release/wix/navidrome.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/wix/navidrome.wxs b/release/wix/navidrome.wxs index 3ea08ec27..8c20e109d 100644 --- a/release/wix/navidrome.wxs +++ b/release/wix/navidrome.wxs @@ -98,7 +98,7 @@ - Not Installed AND NOT WIX_UPGRADE_DETECTED + (Not Installed AND NOT WIX_UPGRADE_DETECTED) OR (MSI_INSTALLATIONDIRECTORY=TARGETDIR) Not Installed AND NOT WIX_UPGRADE_DETECTED