mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
OK this was half working, but on upgrade; the INSTALLDIR is set from
the Directory tags and the dynamic pathing, so we need to use a different thing on upgrade. I think our only option is to be able to copy the values between the two when we need with custom actions.
This commit is contained in:
parent
8bc5a8762e
commit
4c7a0657f9
@ -32,8 +32,8 @@
|
||||
<Property Id="ND_DATAFOLDER" Value="C:\ProgramData\Navidrome">
|
||||
<RegistrySearch Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='ND_DATAFOLDER' Type='raw' />
|
||||
</Property>
|
||||
<Property Id="INSTALLDIR">
|
||||
<RegistrySearch Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='INSTALLDIR' Type='raw' />
|
||||
<Property Id="INSTALLATIONDIRECTORY">
|
||||
<RegistrySearch Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='INSTALLATIONDIRECTORY' Type='raw' />
|
||||
</Property>
|
||||
|
||||
<UIRef Id="Navidrome_UI_Flow"/>
|
||||
@ -51,12 +51,12 @@
|
||||
</Component>
|
||||
|
||||
<Component Id="Configuration" Guid="9e17ed4b-ef13-44bf-a605-ed4132cff7f6" Win64="$(var.Win64)">
|
||||
<IniFile Id="ConfigurationPort" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="Port" Section="default" Value="'[ND_PORT]'" />
|
||||
<IniFile Id="ConfigurationMusicDir" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="MusicFolder" Section="default" Value="'[ND_MUSICFOLDER]'" />
|
||||
<IniFile Id="ConfigurationDataDir" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="DataFolder" Section="default" Value="'[ND_DATAFOLDER]'" />
|
||||
<IniFile Id="FFmpegPath" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="FFmpegPath" Section="default" Value="'[INSTALLDIR]ffmpeg.exe'" />
|
||||
<IniFile Id="ConfigurationPort" Name="navidrome.ini" Action="createLine" Directory="INSTALLATIONDIRECTORY" Key="Port" Section="default" Value="'[ND_PORT]'" />
|
||||
<IniFile Id="ConfigurationMusicDir" Name="navidrome.ini" Action="createLine" Directory="INSTALLATIONDIRECTORY" Key="MusicFolder" Section="default" Value="'[ND_MUSICFOLDER]'" />
|
||||
<IniFile Id="ConfigurationDataDir" Name="navidrome.ini" Action="createLine" Directory="INSTALLATIONDIRECTORY" Key="DataFolder" Section="default" Value="'[ND_DATAFOLDER]'" />
|
||||
<IniFile Id="FFmpegPath" Name="navidrome.ini" Action="createLine" Directory="INSTALLATIONDIRECTORY" Key="FFmpegPath" Section="default" Value="'[INSTALLATIONDIRECTORY]ffmpeg.exe'" />
|
||||
|
||||
<RegistryValue Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='INSTALLDIR' Value='[INSTALLDIR]' Type='string' />
|
||||
<RegistryValue Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='INSTALLATIONDIRECTORY' Value='[INSTALLATIONDIRECTORY]' Type='string' />
|
||||
<RegistryValue Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='ND_PORT' Value='[ND_PORT]' Type='string' />
|
||||
<RegistryValue Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='ND_MUSICFOLDER' Value='[ND_MUSICFOLDER]' Type='string' />
|
||||
<RegistryValue Root='HKLM' Key='SOFTWARE\Deluan\$(var.ProductName)\Installer' Name='ND_DATAFOLDER' Value='[ND_DATAFOLDER]' Type='string' />
|
||||
@ -72,7 +72,7 @@
|
||||
Start='auto'
|
||||
Type='ownProcess'
|
||||
Vital='yes'
|
||||
Arguments='service execute --configfile "[INSTALLDIR]navidrome.ini" --logfile "[ND_DATAFOLDER]\navidrome.log"'
|
||||
Arguments='service execute --configfile "[INSTALLATIONDIRECTORY]navidrome.ini" --logfile "[ND_DATAFOLDER]\navidrome.log"'
|
||||
/>
|
||||
<ServiceControl Id='StartNavidromeService' Start='install' Stop='both' Remove='uninstall' Name='$(var.ProductName)' Wait='yes' />
|
||||
</Component>
|
||||
@ -98,6 +98,11 @@
|
||||
<Show Dialog="MyCustomPropertiesDlg" After="WelcomeDlg">Not Installed AND NOT WIX_UPGRADE_DETECTED</Show>
|
||||
</InstallUISequence>
|
||||
|
||||
<CustomAction Id="CopyInstallDirToInstallationDirectory" Property="INSTALLATIONDIRECTORY" Value="[INSTALLDIR]" Execute="firstSequence" />
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="CopyInstallDirToInstallationDirectory" After="MyCustomPropertiesDlg" >Not Installed AND NOT WIX_UPGRADE_DETECTED</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
<Feature Id='Complete' Level='1'>
|
||||
<ComponentRef Id='LICENSEFile' />
|
||||
<ComponentRef Id='README.mdFile' />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user