Implementing remember property pattern for these properties, this

should fix #5287

Previously, on an upgrade, this will default back to the default
values set in the wxs; now it will store those away in the registry
and lookup their value before continuing. This won't fix the upgrade
for existing installs that have changed the values, only new ones.

The "best" option for existing installs imo is probably to backup
the navidrome database and config file. Uninstall the old version,
install the new version (with this fix) with the paths you wanted,
stop navidrome, restore the database and config file over the top
and start navidrome.
This commit is contained in:
Rob Emery 2026-04-09 14:16:36 +01:00
parent 0a6b5519cc
commit 24c9729324

View File

@ -23,9 +23,15 @@
<Property Id='DiskPrompt' Value="Navidrome Install [1]" />
<Property Id="REBOOT" Value="ReallySuppress" />
<Property Id="ND_PORT" Value="4533" />
<Property Id="ND_MUSICFOLDER" Value="C:\Music" />
<Property Id="ND_DATAFOLDER" Value="C:\ProgramData\Navidrome" />
<Property Id="ND_PORT" Value="4533">
<RegistrySearch Root='HKLM' Key='SOFTWARE\$(var.ProductName)\Installer' Name='ND_PORT' Type='raw' />
</Property>
<Property Id="ND_MUSICFOLDER" Value="C:\Music">
<RegistrySearch Root='HKLM' Key='SOFTWARE\$(var.ProductName)\Installer' Name='ND_MUSICFOLDER' Type='raw' />
</Property>
<Property Id="ND_DATAFOLDER" Value="C:\ProgramData\Navidrome">
<RegistrySearch Root='HKLM' Key='SOFTWARE\$(var.ProductName)\Installer' Name='ND_DATAFOLDER' Type='raw' />
</Property>
<UIRef Id="Navidrome_UI_Flow"/>
@ -46,6 +52,10 @@
<IniFile Id="ConfigurationMusicDir" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="MusicFolder" Section="default" Value="&apos;[ND_MUSICFOLDER]&apos;" />
<IniFile Id="ConfigurationDataDir" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="DataFolder" Section="default" Value="&apos;[ND_DATAFOLDER]&apos;" />
<IniFile Id="FFmpegPath" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="FFmpegPath" Section="default" Value="&apos;[INSTALLDIR]ffmpeg.exe&apos;" />
<RegistryValue Root='HKLM' Key='SOFTWARE\$(var.ProductName)\Installer' Name='ND_PORT' Value='[ND_PORT]' Type='string' />
<RegistryValue Root='HKLM' Key='SOFTWARE\$(var.ProductName)\Installer' Name='ND_MUSICFOLDER' Value='[ND_MUSICFOLDER]' Type='string' />
<RegistryValue Root='HKLM' Key='SOFTWARE\$(var.ProductName)\Installer' Name='ND_DATAFOLDER' Value='[ND_DATAFOLDER]' Type='string' />
</Component>
<Component Id='MainExecutable' Guid='e645aa06-8bbc-40d6-8d3c-73b4f5b76fd7' Win64="$(var.Win64)">