quintodrome/release/wix/navidrome.wxs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

99 lines
4.8 KiB
Text
Raw Normal View History

feat: Windows MSI installer and service support (#3125) * First version/rough layout of the required wix to build an MSI that embeds everything * Don't need revision number * produced exe from existing build process is navidrome not Navidrome * Adding Kardianos wrapper around Cobra so the callbacks are handled automatically (this is basically only for windows) * Adding pointless check to shut up lint for now * make format * Revert disabling npm tidy * Using Kardianos always will result in the application hanging so it needs only be wrapped to handle the callbacks if it's being used in the service context, otherwise use cobra directly * Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295 * Under Linux this installs a user service (I don't think this is correct, but lets get this working first). User units/services cannot depends on system units, so previously this bombed out with Exit Code 5. * Under Windows we can install both the x86 and x64 builds, they will install to different folders, but previously they would overwrite the service as they were both called Navidrome. Now, it will install 2 services. This will still be weird/broken as they will attempt to listen on the same port, however uninstalling the "wrong" arch will not cause the "right" one to be partially uninstalled anymore * Reverting changes to the context as they don't really seem necessary anyway * Need to consistently name the service * Fixing broken context * The included files should be removed when the app is uninstalled * Reverting back to the original context here, I don't think it makes any difference to running under kardianos * Let's see what we have immediately available * OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky * Need -r on directory copy, plus we'll probably need to install wixl * No sudo cmd, so I assume this runs as root * WORKSPACE! * Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever * Might as well put the msi in the right folder, it's tidier * Writing the version number into the msi, from the output of goreleaser * Using jq to parse the goreleaser metadata, so need to install it * MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater * -r or --raw (on newer versions) means we don't get the "" around the value * Running as a user service I think makes limited sense for this * Will now ask for configuration settings during install. MSI/WiX only supports writing out INI files, Toml is almost INI compatable, except that the INI needs to write out a section first, so we need to have a script to strip that off. We are forced to display a License.rtf file by the UI so I think the build process should probably rename the default licence file and that will suffice. Uninstalling works cleanly, howvever upgrades seem to leave the old version installed in "programs and features" currently. Adding the UI has introduced a requirement for WiX 0.103 * Updating the build to include --ext ui for the new config ui * Configuration dialog should not display for upgrades as the config file is already written * Making description consistent with the systemd service and making the build process produce the required License.rtf * Fixing " non-constant format string in call to fmt.Errorf (govet)" * Its a string, not an int; read better. * Wixl 103 is required for --ext ui, so we need 24.04 * OK this is still installing Wix 0.101, maybe it all needs to be 24.04? * Switching the builds back to ubuntu-latest (22.04 at current) as it runs on a custom container, it's actually debian anyway Moving msi build into its own job so it can run on 24.04 so we have access to wixl 0.103 for --ext ui support * Forcing build * Whitespace fix * Adding sudo I guess * Gotta checkout as well * Adding debugging for when there's soemthing wrong with the paths * Adding more ls to see if the output has worked * The msi's are in subdirs * Actually they're in the ./wix directory * Still can't find these msi's? * I think that was being treated literally previously * No idea why this isn't working, give it a relative path instead? * Making explicit on the dialogue that the configuration file will be where the installation dir is * The lint keeps failing and it's just getting in the way so I'll turn this off for now and we'll edit out this commit from the merge * Cutting more out of the build to get more stuff out of the way * Need to increase the width to fit the text in * Calling everything License.rtf, presumably one of them is correct * I am pretty sure the License.rtf loading is broken under Wixl; so let's just bypass the EULA from the UI which is a nicer experience for the users anyway * This needs to be after WelcomeDlg now the Eula isn't displayed * You're supposed to be able to use <WixVariable> to override the location that the bmp's are loaded from, I can't get this to work under wixl so I'm guessing given that the ui extension is new, it hasn't been implemented with that in mind. So we'll hack it by overwriting the files installed with the package. * We should make this less brittle so when wixl is updated it still works * Re-enabling the lint and tests etc * Improving the scaling quality and removing borders from images to tidy them up a tad * Pretty sure this isn't necessary as MY_PROPERTY will always be false * Without publishing this event, we can't continue to the next dialogue however I think we should be able to get away without the property * Refactoring out the duplication so we only have one service defined and we can run that either way * Pushing the Interactive check into the root commmand? Feels like it is probably getting closer to the right place at least * go tidy * OK this didn't work under windows, I'm guessing it's because it's lacking all the metadata about the service it needs to report back to Windows on. * We need to run service execute now so that the windows service will behave (hopefully)! * Lint * go tidy * Renaming service to "navidrome" rather than "Navidrome" as this is the filename that systemd writes and it's unusual to have capital letters in service names under Linux. Switching to use service execute for Linux to mirror Windows * Need to provide the arguments to append * Without passing the context around, the DB isn't closed gracefully so we end up with with .db-shm and .db-wal files for recovery * We should log fatal rather than outputting directly to stdout * go tidy * refactor: small nitpicks * fix: terminate service gracefully --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 15:40:53 -08:00
<?xml version='1.0' encoding='windows-1252'?>
<?if $(var.Platform) = x64 ?>
<?define ProductName = "Navidrome" ?>
<?define UpgradeCode = "2f154974-1443-41b6-b808-b8be530291b3" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define Win64 = 'yes' ?>
<?else ?>
<?define ProductName = "Navidrome (x86)" ?>
<?define UpgradeCode = "2f0572e4-7e8c-42e7-a186-77f70ec0911a" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define Win64 = "no" ?>
<?endif ?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<?include SettingsDlg.wxs?>
<?include Navidrome_UI_Flow.wxs?>
<Product Name="$(var.ProductName)" Id="*" UpgradeCode="$(var.UpgradeCode)" Language='1033' Codepage='1252' Version='$(var.Version)' Manufacturer='Deluan'>
<Package Id='*' Keywords='Installer' Description="$(var.ProductName)" Comments='' Manufacturer='Deluan' InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252' InstallScope='perMachine' />
<MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="A newer version of $(var.ProductName) is already installed." />
<Media Id='1' Cabinet='main.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<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" />
<UIRef Id="Navidrome_UI_Flow"/>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id='INSTALLDIR' Name='Navidrome'>
<Component Id='LICENSEFile' Guid='eb5610a4-e3f3-4f36-ae2c-e96914e460c2' Win64="$(var.Win64)">
<File Id='LICENSE' Name='LICENSE' DiskId='1' Source='LICENSE' KeyPath='yes' />
</Component>
<Component Id='README.mdFile' Guid='d1ee412b-2ebc-4b0b-9fa7-0228ab707686' Win64="$(var.Win64)">
<File Id='README.md' Name='README.md' DiskId='1' Source='README.md' KeyPath='yes' />
</Component>
<Component Id="Configuration" Guid="9e17ed4b-ef13-44bf-a605-ed4132cff7f6" Win64="$(var.Win64)">
feat(build): MSI installer improvements (#3376) * feat(build): add a make target to build a msi installer locally * Testing wrapping the executable in cmd * build(ci): build msis in parallel * feat(server): add LogFile config option * Revert "Testing wrapping the executable in cmd" This reverts commit be29592254cb903fd4904f2f50d4d1a860795d33. * Adding --log-file for service executable * feat(ini): wip * feat(ini): parse nested ini section * fix(conf): fix fatal error messages * Now navidrome supports INI, we can use the built-in msi ini system and not require the VBScript to convert it into toml * File needs to be called .ini to be parsed as an INI and correct filename needs to be passed to the service * fix(msi): build msi locally * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): Makefile * fix(msi): more clean up * fix(log): convert LF to CRLF on Windows * fix(msi): config filename should be case-insensitive * fix(msi): make it a little more idiomatic * Including the latest windows release of ffmpeg into the msi as built by https://www.gyan.dev/ffmpeg/builds/ (linked to on the official ffmpeg source) * This should version independent * Need bash expansion for the * to work * This will run twice, once for x86 and once for x64, I'll make it cache the executable for now as it'll be quicker * Silencing wget * Add ffmpeg path to the config so Navidrome knows where to find it * refactor: download ffmpeg from our repository * When going back from the "Are you ready to install?" it should go back to the Settings dialogue that you just came from * fix: comments --------- Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-22 15:32:56 -08:00
<IniFile Id="ConfigurationPort" Name="navidrome.ini" Action="createLine" Directory="INSTALLDIR" Key="Port" Section="default" Value="&apos;[ND_PORT]&apos;" />
<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;" />
feat: Windows MSI installer and service support (#3125) * First version/rough layout of the required wix to build an MSI that embeds everything * Don't need revision number * produced exe from existing build process is navidrome not Navidrome * Adding Kardianos wrapper around Cobra so the callbacks are handled automatically (this is basically only for windows) * Adding pointless check to shut up lint for now * make format * Revert disabling npm tidy * Using Kardianos always will result in the application hanging so it needs only be wrapped to handle the callbacks if it's being used in the service context, otherwise use cobra directly * Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295 * Under Linux this installs a user service (I don't think this is correct, but lets get this working first). User units/services cannot depends on system units, so previously this bombed out with Exit Code 5. * Under Windows we can install both the x86 and x64 builds, they will install to different folders, but previously they would overwrite the service as they were both called Navidrome. Now, it will install 2 services. This will still be weird/broken as they will attempt to listen on the same port, however uninstalling the "wrong" arch will not cause the "right" one to be partially uninstalled anymore * Reverting changes to the context as they don't really seem necessary anyway * Need to consistently name the service * Fixing broken context * The included files should be removed when the app is uninstalled * Reverting back to the original context here, I don't think it makes any difference to running under kardianos * Let's see what we have immediately available * OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky * Need -r on directory copy, plus we'll probably need to install wixl * No sudo cmd, so I assume this runs as root * WORKSPACE! * Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever * Might as well put the msi in the right folder, it's tidier * Writing the version number into the msi, from the output of goreleaser * Using jq to parse the goreleaser metadata, so need to install it * MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater * -r or --raw (on newer versions) means we don't get the "" around the value * Running as a user service I think makes limited sense for this * Will now ask for configuration settings during install. MSI/WiX only supports writing out INI files, Toml is almost INI compatable, except that the INI needs to write out a section first, so we need to have a script to strip that off. We are forced to display a License.rtf file by the UI so I think the build process should probably rename the default licence file and that will suffice. Uninstalling works cleanly, howvever upgrades seem to leave the old version installed in "programs and features" currently. Adding the UI has introduced a requirement for WiX 0.103 * Updating the build to include --ext ui for the new config ui * Configuration dialog should not display for upgrades as the config file is already written * Making description consistent with the systemd service and making the build process produce the required License.rtf * Fixing " non-constant format string in call to fmt.Errorf (govet)" * Its a string, not an int; read better. * Wixl 103 is required for --ext ui, so we need 24.04 * OK this is still installing Wix 0.101, maybe it all needs to be 24.04? * Switching the builds back to ubuntu-latest (22.04 at current) as it runs on a custom container, it's actually debian anyway Moving msi build into its own job so it can run on 24.04 so we have access to wixl 0.103 for --ext ui support * Forcing build * Whitespace fix * Adding sudo I guess * Gotta checkout as well * Adding debugging for when there's soemthing wrong with the paths * Adding more ls to see if the output has worked * The msi's are in subdirs * Actually they're in the ./wix directory * Still can't find these msi's? * I think that was being treated literally previously * No idea why this isn't working, give it a relative path instead? * Making explicit on the dialogue that the configuration file will be where the installation dir is * The lint keeps failing and it's just getting in the way so I'll turn this off for now and we'll edit out this commit from the merge * Cutting more out of the build to get more stuff out of the way * Need to increase the width to fit the text in * Calling everything License.rtf, presumably one of them is correct * I am pretty sure the License.rtf loading is broken under Wixl; so let's just bypass the EULA from the UI which is a nicer experience for the users anyway * This needs to be after WelcomeDlg now the Eula isn't displayed * You're supposed to be able to use <WixVariable> to override the location that the bmp's are loaded from, I can't get this to work under wixl so I'm guessing given that the ui extension is new, it hasn't been implemented with that in mind. So we'll hack it by overwriting the files installed with the package. * We should make this less brittle so when wixl is updated it still works * Re-enabling the lint and tests etc * Improving the scaling quality and removing borders from images to tidy them up a tad * Pretty sure this isn't necessary as MY_PROPERTY will always be false * Without publishing this event, we can't continue to the next dialogue however I think we should be able to get away without the property * Refactoring out the duplication so we only have one service defined and we can run that either way * Pushing the Interactive check into the root commmand? Feels like it is probably getting closer to the right place at least * go tidy * OK this didn't work under windows, I'm guessing it's because it's lacking all the metadata about the service it needs to report back to Windows on. * We need to run service execute now so that the windows service will behave (hopefully)! * Lint * go tidy * Renaming service to "navidrome" rather than "Navidrome" as this is the filename that systemd writes and it's unusual to have capital letters in service names under Linux. Switching to use service execute for Linux to mirror Windows * Need to provide the arguments to append * Without passing the context around, the DB isn't closed gracefully so we end up with with .db-shm and .db-wal files for recovery * We should log fatal rather than outputting directly to stdout * go tidy * refactor: small nitpicks * fix: terminate service gracefully --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 15:40:53 -08:00
</Component>
<Component Id='MainExecutable' Guid='e645aa06-8bbc-40d6-8d3c-73b4f5b76fd7' Win64="$(var.Win64)">
<File Id='NavidromeExe' Name='Navidrome.exe' DiskId='1' Source='navidrome.exe' KeyPath='yes' />
<ServiceInstall
Description='Navidrome is a self-hosted music server and streamer'
ErrorControl='ignore'
Name = '$(var.ProductName)'
Id='NavidromeService'
Start='auto'
Type='ownProcess'
Vital='yes'
feat(build): MSI installer improvements (#3376) * feat(build): add a make target to build a msi installer locally * Testing wrapping the executable in cmd * build(ci): build msis in parallel * feat(server): add LogFile config option * Revert "Testing wrapping the executable in cmd" This reverts commit be29592254cb903fd4904f2f50d4d1a860795d33. * Adding --log-file for service executable * feat(ini): wip * feat(ini): parse nested ini section * fix(conf): fix fatal error messages * Now navidrome supports INI, we can use the built-in msi ini system and not require the VBScript to convert it into toml * File needs to be called .ini to be parsed as an INI and correct filename needs to be passed to the service * fix(msi): build msi locally * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): Makefile * fix(msi): more clean up * fix(log): convert LF to CRLF on Windows * fix(msi): config filename should be case-insensitive * fix(msi): make it a little more idiomatic * Including the latest windows release of ffmpeg into the msi as built by https://www.gyan.dev/ffmpeg/builds/ (linked to on the official ffmpeg source) * This should version independent * Need bash expansion for the * to work * This will run twice, once for x86 and once for x64, I'll make it cache the executable for now as it'll be quicker * Silencing wget * Add ffmpeg path to the config so Navidrome knows where to find it * refactor: download ffmpeg from our repository * When going back from the "Are you ready to install?" it should go back to the Settings dialogue that you just came from * fix: comments --------- Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-22 15:32:56 -08:00
Arguments='service execute --configfile &quot;[INSTALLDIR]navidrome.ini&quot; --logfile &quot;[ND_DATAFOLDER]\navidrome.log&quot;'
feat: Windows MSI installer and service support (#3125) * First version/rough layout of the required wix to build an MSI that embeds everything * Don't need revision number * produced exe from existing build process is navidrome not Navidrome * Adding Kardianos wrapper around Cobra so the callbacks are handled automatically (this is basically only for windows) * Adding pointless check to shut up lint for now * make format * Revert disabling npm tidy * Using Kardianos always will result in the application hanging so it needs only be wrapped to handle the callbacks if it's being used in the service context, otherwise use cobra directly * Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295 * Under Linux this installs a user service (I don't think this is correct, but lets get this working first). User units/services cannot depends on system units, so previously this bombed out with Exit Code 5. * Under Windows we can install both the x86 and x64 builds, they will install to different folders, but previously they would overwrite the service as they were both called Navidrome. Now, it will install 2 services. This will still be weird/broken as they will attempt to listen on the same port, however uninstalling the "wrong" arch will not cause the "right" one to be partially uninstalled anymore * Reverting changes to the context as they don't really seem necessary anyway * Need to consistently name the service * Fixing broken context * The included files should be removed when the app is uninstalled * Reverting back to the original context here, I don't think it makes any difference to running under kardianos * Let's see what we have immediately available * OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky * Need -r on directory copy, plus we'll probably need to install wixl * No sudo cmd, so I assume this runs as root * WORKSPACE! * Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever * Might as well put the msi in the right folder, it's tidier * Writing the version number into the msi, from the output of goreleaser * Using jq to parse the goreleaser metadata, so need to install it * MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater * -r or --raw (on newer versions) means we don't get the "" around the value * Running as a user service I think makes limited sense for this * Will now ask for configuration settings during install. MSI/WiX only supports writing out INI files, Toml is almost INI compatable, except that the INI needs to write out a section first, so we need to have a script to strip that off. We are forced to display a License.rtf file by the UI so I think the build process should probably rename the default licence file and that will suffice. Uninstalling works cleanly, howvever upgrades seem to leave the old version installed in "programs and features" currently. Adding the UI has introduced a requirement for WiX 0.103 * Updating the build to include --ext ui for the new config ui * Configuration dialog should not display for upgrades as the config file is already written * Making description consistent with the systemd service and making the build process produce the required License.rtf * Fixing " non-constant format string in call to fmt.Errorf (govet)" * Its a string, not an int; read better. * Wixl 103 is required for --ext ui, so we need 24.04 * OK this is still installing Wix 0.101, maybe it all needs to be 24.04? * Switching the builds back to ubuntu-latest (22.04 at current) as it runs on a custom container, it's actually debian anyway Moving msi build into its own job so it can run on 24.04 so we have access to wixl 0.103 for --ext ui support * Forcing build * Whitespace fix * Adding sudo I guess * Gotta checkout as well * Adding debugging for when there's soemthing wrong with the paths * Adding more ls to see if the output has worked * The msi's are in subdirs * Actually they're in the ./wix directory * Still can't find these msi's? * I think that was being treated literally previously * No idea why this isn't working, give it a relative path instead? * Making explicit on the dialogue that the configuration file will be where the installation dir is * The lint keeps failing and it's just getting in the way so I'll turn this off for now and we'll edit out this commit from the merge * Cutting more out of the build to get more stuff out of the way * Need to increase the width to fit the text in * Calling everything License.rtf, presumably one of them is correct * I am pretty sure the License.rtf loading is broken under Wixl; so let's just bypass the EULA from the UI which is a nicer experience for the users anyway * This needs to be after WelcomeDlg now the Eula isn't displayed * You're supposed to be able to use <WixVariable> to override the location that the bmp's are loaded from, I can't get this to work under wixl so I'm guessing given that the ui extension is new, it hasn't been implemented with that in mind. So we'll hack it by overwriting the files installed with the package. * We should make this less brittle so when wixl is updated it still works * Re-enabling the lint and tests etc * Improving the scaling quality and removing borders from images to tidy them up a tad * Pretty sure this isn't necessary as MY_PROPERTY will always be false * Without publishing this event, we can't continue to the next dialogue however I think we should be able to get away without the property * Refactoring out the duplication so we only have one service defined and we can run that either way * Pushing the Interactive check into the root commmand? Feels like it is probably getting closer to the right place at least * go tidy * OK this didn't work under windows, I'm guessing it's because it's lacking all the metadata about the service it needs to report back to Windows on. * We need to run service execute now so that the windows service will behave (hopefully)! * Lint * go tidy * Renaming service to "navidrome" rather than "Navidrome" as this is the filename that systemd writes and it's unusual to have capital letters in service names under Linux. Switching to use service execute for Linux to mirror Windows * Need to provide the arguments to append * Without passing the context around, the DB isn't closed gracefully so we end up with with .db-shm and .db-wal files for recovery * We should log fatal rather than outputting directly to stdout * go tidy * refactor: small nitpicks * fix: terminate service gracefully --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 15:40:53 -08:00
/>
<ServiceControl Id='StartNavidromeService' Start='install' Stop='both' Remove='uninstall' Name='$(var.ProductName)' Wait='yes' />
</Component>
feat(build): MSI installer improvements (#3376) * feat(build): add a make target to build a msi installer locally * Testing wrapping the executable in cmd * build(ci): build msis in parallel * feat(server): add LogFile config option * Revert "Testing wrapping the executable in cmd" This reverts commit be29592254cb903fd4904f2f50d4d1a860795d33. * Adding --log-file for service executable * feat(ini): wip * feat(ini): parse nested ini section * fix(conf): fix fatal error messages * Now navidrome supports INI, we can use the built-in msi ini system and not require the VBScript to convert it into toml * File needs to be called .ini to be parsed as an INI and correct filename needs to be passed to the service * fix(msi): build msi locally * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): Makefile * fix(msi): more clean up * fix(log): convert LF to CRLF on Windows * fix(msi): config filename should be case-insensitive * fix(msi): make it a little more idiomatic * Including the latest windows release of ffmpeg into the msi as built by https://www.gyan.dev/ffmpeg/builds/ (linked to on the official ffmpeg source) * This should version independent * Need bash expansion for the * to work * This will run twice, once for x86 and once for x64, I'll make it cache the executable for now as it'll be quicker * Silencing wget * Add ffmpeg path to the config so Navidrome knows where to find it * refactor: download ffmpeg from our repository * When going back from the "Are you ready to install?" it should go back to the Settings dialogue that you just came from * fix: comments --------- Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-22 15:32:56 -08:00
<Component Id='FFMpegExecutable' Guid='d17358f7-abdc-4080-acd3-6427903a7dd8' Win64="$(var.Win64)">
<File Id='ffmpeg.exe' Name='ffmpeg.exe' DiskId='1' Source='ffmpeg.exe' KeyPath='yes' />
</Component>
fix(transcoding): include ffprobe in MSI and fall back gracefully when absent (#5326) * fix(msi): include ffprobe executable in MSI build Signed-off-by: Deluan <deluan@navidrome.org> * feat(ffmpeg): add IsProbeAvailable() to FFmpeg interface Add runtime check for ffprobe binary availability with cached result and startup logging. When ffprobe is missing, logs a warning at startup. * feat(stream): guard MakeDecision behind ffprobe availability When ffprobe is not available, MakeDecision returns a decision with ErrorReason set and both CanDirectPlay and CanTranscode false, instead of failing with an opaque exec error. * feat(subsonic): only advertise transcoding extension when ffprobe is available The OpenSubsonic transcoding extension is now conditionally included based on ffprobe availability, so clients know not to call getTranscodeDecision when ffprobe is missing. * refactor(ffmpeg): move ffprobe startup warning to initial_setup Move the ffprobe availability warning from the lazy IsProbeAvailable() check to checkFFmpegInstallation() in server/initial_setup.go, alongside the existing ffmpeg warning. This ensures the warning appears at startup rather than on first endpoint call. * fix(e2e): set noopFFmpeg.IsProbeAvailable to true The e2e tests use pre-populated probe data and don't need a real ffprobe binary. Setting IsProbeAvailable to true allows the transcode decision logic to proceed normally in e2e tests. * fix(stream): only guard on ffprobe when probing is needed Move the IsProbeAvailable() guard inside the SkipProbe check so that legacy stream requests (which pass SkipProbe: true) are not blocked when ffprobe is missing. The guard only applies when probing is actually required (i.e., getTranscodeDecision endpoint). * refactor(stream): fall back to tag metadata when ffprobe is unavailable Instead of blocking getTranscodeDecision when ffprobe is missing, fall back to tag-based metadata (same behavior as /rest/stream). The transcoding extension is always advertised. A startup warning still alerts admins when ffprobe is not found. * fix(stream): downgrade ffprobe-unavailable log to Debug Avoids log spam when clients call getTranscodeDecision repeatedly without ffprobe installed. The startup warning in initial_setup.go already alerts admins at Warn level. --------- Signed-off-by: Deluan <deluan@navidrome.org>
2026-04-07 16:11:38 -08:00
<Component Id='FFProbeExecutable' Guid='f8a3b2c1-5d4e-4f6a-9b8c-7e2d1a0f3c5b' Win64="$(var.Win64)">
<File Id='ffprobe.exe' Name='ffprobe.exe' DiskId='1' Source='ffprobe.exe' KeyPath='yes' />
</Component>
feat: Windows MSI installer and service support (#3125) * First version/rough layout of the required wix to build an MSI that embeds everything * Don't need revision number * produced exe from existing build process is navidrome not Navidrome * Adding Kardianos wrapper around Cobra so the callbacks are handled automatically (this is basically only for windows) * Adding pointless check to shut up lint for now * make format * Revert disabling npm tidy * Using Kardianos always will result in the application hanging so it needs only be wrapped to handle the callbacks if it's being used in the service context, otherwise use cobra directly * Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295 * Under Linux this installs a user service (I don't think this is correct, but lets get this working first). User units/services cannot depends on system units, so previously this bombed out with Exit Code 5. * Under Windows we can install both the x86 and x64 builds, they will install to different folders, but previously they would overwrite the service as they were both called Navidrome. Now, it will install 2 services. This will still be weird/broken as they will attempt to listen on the same port, however uninstalling the "wrong" arch will not cause the "right" one to be partially uninstalled anymore * Reverting changes to the context as they don't really seem necessary anyway * Need to consistently name the service * Fixing broken context * The included files should be removed when the app is uninstalled * Reverting back to the original context here, I don't think it makes any difference to running under kardianos * Let's see what we have immediately available * OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky * Need -r on directory copy, plus we'll probably need to install wixl * No sudo cmd, so I assume this runs as root * WORKSPACE! * Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever * Might as well put the msi in the right folder, it's tidier * Writing the version number into the msi, from the output of goreleaser * Using jq to parse the goreleaser metadata, so need to install it * MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater * -r or --raw (on newer versions) means we don't get the "" around the value * Running as a user service I think makes limited sense for this * Will now ask for configuration settings during install. MSI/WiX only supports writing out INI files, Toml is almost INI compatable, except that the INI needs to write out a section first, so we need to have a script to strip that off. We are forced to display a License.rtf file by the UI so I think the build process should probably rename the default licence file and that will suffice. Uninstalling works cleanly, howvever upgrades seem to leave the old version installed in "programs and features" currently. Adding the UI has introduced a requirement for WiX 0.103 * Updating the build to include --ext ui for the new config ui * Configuration dialog should not display for upgrades as the config file is already written * Making description consistent with the systemd service and making the build process produce the required License.rtf * Fixing " non-constant format string in call to fmt.Errorf (govet)" * Its a string, not an int; read better. * Wixl 103 is required for --ext ui, so we need 24.04 * OK this is still installing Wix 0.101, maybe it all needs to be 24.04? * Switching the builds back to ubuntu-latest (22.04 at current) as it runs on a custom container, it's actually debian anyway Moving msi build into its own job so it can run on 24.04 so we have access to wixl 0.103 for --ext ui support * Forcing build * Whitespace fix * Adding sudo I guess * Gotta checkout as well * Adding debugging for when there's soemthing wrong with the paths * Adding more ls to see if the output has worked * The msi's are in subdirs * Actually they're in the ./wix directory * Still can't find these msi's? * I think that was being treated literally previously * No idea why this isn't working, give it a relative path instead? * Making explicit on the dialogue that the configuration file will be where the installation dir is * The lint keeps failing and it's just getting in the way so I'll turn this off for now and we'll edit out this commit from the merge * Cutting more out of the build to get more stuff out of the way * Need to increase the width to fit the text in * Calling everything License.rtf, presumably one of them is correct * I am pretty sure the License.rtf loading is broken under Wixl; so let's just bypass the EULA from the UI which is a nicer experience for the users anyway * This needs to be after WelcomeDlg now the Eula isn't displayed * You're supposed to be able to use <WixVariable> to override the location that the bmp's are loaded from, I can't get this to work under wixl so I'm guessing given that the ui extension is new, it hasn't been implemented with that in mind. So we'll hack it by overwriting the files installed with the package. * We should make this less brittle so when wixl is updated it still works * Re-enabling the lint and tests etc * Improving the scaling quality and removing borders from images to tidy them up a tad * Pretty sure this isn't necessary as MY_PROPERTY will always be false * Without publishing this event, we can't continue to the next dialogue however I think we should be able to get away without the property * Refactoring out the duplication so we only have one service defined and we can run that either way * Pushing the Interactive check into the root commmand? Feels like it is probably getting closer to the right place at least * go tidy * OK this didn't work under windows, I'm guessing it's because it's lacking all the metadata about the service it needs to report back to Windows on. * We need to run service execute now so that the windows service will behave (hopefully)! * Lint * go tidy * Renaming service to "navidrome" rather than "Navidrome" as this is the filename that systemd writes and it's unusual to have capital letters in service names under Linux. Switching to use service execute for Linux to mirror Windows * Need to provide the arguments to append * Without passing the context around, the DB isn't closed gracefully so we end up with with .db-shm and .db-wal files for recovery * We should log fatal rather than outputting directly to stdout * go tidy * refactor: small nitpicks * fix: terminate service gracefully --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 15:40:53 -08:00
</Directory>
</Directory>
feat(insights): detecting packaging method (#3841) * Adding environmental variable so that navidrome can detect if its running as an MSI install for insights * Renaming to be ND_PACKAGE_TYPE so we can reuse this for the .deb/.rpm stats as well * Packaged implies a bool, this is a description so it should be packaging or just package imo * wixl currently doesn't support <Environment> 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 * Using a file we should be able to add support for linux like this also * MSI should copy the package into place for us, it's not a KeyPath as older versions won't have it, so it's presence doesn't indicate the installed status of the package * OK this doesn't exist, need to find another way to do it * package to .package and moving to the datadir * fix(scanner): better log message when AutoImportPlaylists is disabled Fix #3861 Signed-off-by: Deluan <deluan@navidrome.org> * fix(scanner): support ID3v2 embedded images in WAV files Fix #3867 Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): show bitDepth in song info dialog Signed-off-by: Deluan <deluan@navidrome.org> * fix(server): don't break if the ND_CONFIGFILE does not exist Signed-off-by: Deluan <deluan@navidrome.org> * feat(docker): automatically loads a navidrome.toml file from /data, if available Signed-off-by: Deluan <deluan@navidrome.org> * feat(server): custom ArtistJoiner config (#3873) * feat(server): custom ArtistJoiner config Signed-off-by: Deluan <deluan@navidrome.org> * refactor(ui): organize ArtistLinkField, add tests Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): use display artist * feat(ui): use display artist Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org> * chore: remove some BFR-related TODOs that are not valid anymore Signed-off-by: Deluan <deluan@navidrome.org> * chore: remove more outdated TODOs Signed-off-by: Deluan <deluan@navidrome.org> * fix(scanner): elapsed time for folder processing is wrong in the logs Signed-off-by: Deluan <deluan@navidrome.org> * Should be able to reuse this mechanism with deb and rpm, I think it would be nice to know which specific one it is without guessing based on /etc/debian_version or something; but it doesn't look like that is exposed by goreleaser into an env or anything :/ * Need to reference the installed file and I think Id's don't require [] * Need to add into the root directory for this to work * That was not deliberately removed * feat: add RPM and DEB package configuration files for Navidrome Signed-off-by: Deluan <deluan@navidrome.org> * Don't need this as goreleaser will sort it out --------- Signed-off-by: Deluan <deluan@navidrome.org> Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2025-11-09 08:57:55 -09:00
<Directory Id="ND_DATAFOLDER" name="[ND_DATAFOLDER]">
<Component Id='PackageFile' Guid='9eec0697-803c-4629-858f-20dc376c960b' Win64="$(var.Win64)">
<File Id='package' Name='.package' DiskId='1' Source='.package' KeyPath='no' />
</Component>
</Directory>
feat: Windows MSI installer and service support (#3125) * First version/rough layout of the required wix to build an MSI that embeds everything * Don't need revision number * produced exe from existing build process is navidrome not Navidrome * Adding Kardianos wrapper around Cobra so the callbacks are handled automatically (this is basically only for windows) * Adding pointless check to shut up lint for now * make format * Revert disabling npm tidy * Using Kardianos always will result in the application hanging so it needs only be wrapped to handle the callbacks if it's being used in the service context, otherwise use cobra directly * Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295 * Under Linux this installs a user service (I don't think this is correct, but lets get this working first). User units/services cannot depends on system units, so previously this bombed out with Exit Code 5. * Under Windows we can install both the x86 and x64 builds, they will install to different folders, but previously they would overwrite the service as they were both called Navidrome. Now, it will install 2 services. This will still be weird/broken as they will attempt to listen on the same port, however uninstalling the "wrong" arch will not cause the "right" one to be partially uninstalled anymore * Reverting changes to the context as they don't really seem necessary anyway * Need to consistently name the service * Fixing broken context * The included files should be removed when the app is uninstalled * Reverting back to the original context here, I don't think it makes any difference to running under kardianos * Let's see what we have immediately available * OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky * Need -r on directory copy, plus we'll probably need to install wixl * No sudo cmd, so I assume this runs as root * WORKSPACE! * Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever * Might as well put the msi in the right folder, it's tidier * Writing the version number into the msi, from the output of goreleaser * Using jq to parse the goreleaser metadata, so need to install it * MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater * -r or --raw (on newer versions) means we don't get the "" around the value * Running as a user service I think makes limited sense for this * Will now ask for configuration settings during install. MSI/WiX only supports writing out INI files, Toml is almost INI compatable, except that the INI needs to write out a section first, so we need to have a script to strip that off. We are forced to display a License.rtf file by the UI so I think the build process should probably rename the default licence file and that will suffice. Uninstalling works cleanly, howvever upgrades seem to leave the old version installed in "programs and features" currently. Adding the UI has introduced a requirement for WiX 0.103 * Updating the build to include --ext ui for the new config ui * Configuration dialog should not display for upgrades as the config file is already written * Making description consistent with the systemd service and making the build process produce the required License.rtf * Fixing " non-constant format string in call to fmt.Errorf (govet)" * Its a string, not an int; read better. * Wixl 103 is required for --ext ui, so we need 24.04 * OK this is still installing Wix 0.101, maybe it all needs to be 24.04? * Switching the builds back to ubuntu-latest (22.04 at current) as it runs on a custom container, it's actually debian anyway Moving msi build into its own job so it can run on 24.04 so we have access to wixl 0.103 for --ext ui support * Forcing build * Whitespace fix * Adding sudo I guess * Gotta checkout as well * Adding debugging for when there's soemthing wrong with the paths * Adding more ls to see if the output has worked * The msi's are in subdirs * Actually they're in the ./wix directory * Still can't find these msi's? * I think that was being treated literally previously * No idea why this isn't working, give it a relative path instead? * Making explicit on the dialogue that the configuration file will be where the installation dir is * The lint keeps failing and it's just getting in the way so I'll turn this off for now and we'll edit out this commit from the merge * Cutting more out of the build to get more stuff out of the way * Need to increase the width to fit the text in * Calling everything License.rtf, presumably one of them is correct * I am pretty sure the License.rtf loading is broken under Wixl; so let's just bypass the EULA from the UI which is a nicer experience for the users anyway * This needs to be after WelcomeDlg now the Eula isn't displayed * You're supposed to be able to use <WixVariable> to override the location that the bmp's are loaded from, I can't get this to work under wixl so I'm guessing given that the ui extension is new, it hasn't been implemented with that in mind. So we'll hack it by overwriting the files installed with the package. * We should make this less brittle so when wixl is updated it still works * Re-enabling the lint and tests etc * Improving the scaling quality and removing borders from images to tidy them up a tad * Pretty sure this isn't necessary as MY_PROPERTY will always be false * Without publishing this event, we can't continue to the next dialogue however I think we should be able to get away without the property * Refactoring out the duplication so we only have one service defined and we can run that either way * Pushing the Interactive check into the root commmand? Feels like it is probably getting closer to the right place at least * go tidy * OK this didn't work under windows, I'm guessing it's because it's lacking all the metadata about the service it needs to report back to Windows on. * We need to run service execute now so that the windows service will behave (hopefully)! * Lint * go tidy * Renaming service to "navidrome" rather than "Navidrome" as this is the filename that systemd writes and it's unusual to have capital letters in service names under Linux. Switching to use service execute for Linux to mirror Windows * Need to provide the arguments to append * Without passing the context around, the DB isn't closed gracefully so we end up with with .db-shm and .db-wal files for recovery * We should log fatal rather than outputting directly to stdout * go tidy * refactor: small nitpicks * fix: terminate service gracefully --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 15:40:53 -08:00
</Directory>
<InstallUISequence>
<Show Dialog="MyCustomPropertiesDlg" After="WelcomeDlg">Not Installed AND NOT WIX_UPGRADE_DETECTED</Show>
</InstallUISequence>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='LICENSEFile' />
<ComponentRef Id='README.mdFile' />
<ComponentRef Id='Configuration'/>
<ComponentRef Id='MainExecutable' />
feat(build): MSI installer improvements (#3376) * feat(build): add a make target to build a msi installer locally * Testing wrapping the executable in cmd * build(ci): build msis in parallel * feat(server): add LogFile config option * Revert "Testing wrapping the executable in cmd" This reverts commit be29592254cb903fd4904f2f50d4d1a860795d33. * Adding --log-file for service executable * feat(ini): wip * feat(ini): parse nested ini section * fix(conf): fix fatal error messages * Now navidrome supports INI, we can use the built-in msi ini system and not require the VBScript to convert it into toml * File needs to be called .ini to be parsed as an INI and correct filename needs to be passed to the service * fix(msi): build msi locally * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): Makefile * fix(msi): more clean up * fix(log): convert LF to CRLF on Windows * fix(msi): config filename should be case-insensitive * fix(msi): make it a little more idiomatic * Including the latest windows release of ffmpeg into the msi as built by https://www.gyan.dev/ffmpeg/builds/ (linked to on the official ffmpeg source) * This should version independent * Need bash expansion for the * to work * This will run twice, once for x86 and once for x64, I'll make it cache the executable for now as it'll be quicker * Silencing wget * Add ffmpeg path to the config so Navidrome knows where to find it * refactor: download ffmpeg from our repository * When going back from the "Are you ready to install?" it should go back to the Settings dialogue that you just came from * fix: comments --------- Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-22 15:32:56 -08:00
<ComponentRef Id='FFMpegExecutable' />
fix(transcoding): include ffprobe in MSI and fall back gracefully when absent (#5326) * fix(msi): include ffprobe executable in MSI build Signed-off-by: Deluan <deluan@navidrome.org> * feat(ffmpeg): add IsProbeAvailable() to FFmpeg interface Add runtime check for ffprobe binary availability with cached result and startup logging. When ffprobe is missing, logs a warning at startup. * feat(stream): guard MakeDecision behind ffprobe availability When ffprobe is not available, MakeDecision returns a decision with ErrorReason set and both CanDirectPlay and CanTranscode false, instead of failing with an opaque exec error. * feat(subsonic): only advertise transcoding extension when ffprobe is available The OpenSubsonic transcoding extension is now conditionally included based on ffprobe availability, so clients know not to call getTranscodeDecision when ffprobe is missing. * refactor(ffmpeg): move ffprobe startup warning to initial_setup Move the ffprobe availability warning from the lazy IsProbeAvailable() check to checkFFmpegInstallation() in server/initial_setup.go, alongside the existing ffmpeg warning. This ensures the warning appears at startup rather than on first endpoint call. * fix(e2e): set noopFFmpeg.IsProbeAvailable to true The e2e tests use pre-populated probe data and don't need a real ffprobe binary. Setting IsProbeAvailable to true allows the transcode decision logic to proceed normally in e2e tests. * fix(stream): only guard on ffprobe when probing is needed Move the IsProbeAvailable() guard inside the SkipProbe check so that legacy stream requests (which pass SkipProbe: true) are not blocked when ffprobe is missing. The guard only applies when probing is actually required (i.e., getTranscodeDecision endpoint). * refactor(stream): fall back to tag metadata when ffprobe is unavailable Instead of blocking getTranscodeDecision when ffprobe is missing, fall back to tag-based metadata (same behavior as /rest/stream). The transcoding extension is always advertised. A startup warning still alerts admins when ffprobe is not found. * fix(stream): downgrade ffprobe-unavailable log to Debug Avoids log spam when clients call getTranscodeDecision repeatedly without ffprobe installed. The startup warning in initial_setup.go already alerts admins at Warn level. --------- Signed-off-by: Deluan <deluan@navidrome.org>
2026-04-07 16:11:38 -08:00
<ComponentRef Id='FFProbeExecutable' />
feat(insights): detecting packaging method (#3841) * Adding environmental variable so that navidrome can detect if its running as an MSI install for insights * Renaming to be ND_PACKAGE_TYPE so we can reuse this for the .deb/.rpm stats as well * Packaged implies a bool, this is a description so it should be packaging or just package imo * wixl currently doesn't support <Environment> 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 * Using a file we should be able to add support for linux like this also * MSI should copy the package into place for us, it's not a KeyPath as older versions won't have it, so it's presence doesn't indicate the installed status of the package * OK this doesn't exist, need to find another way to do it * package to .package and moving to the datadir * fix(scanner): better log message when AutoImportPlaylists is disabled Fix #3861 Signed-off-by: Deluan <deluan@navidrome.org> * fix(scanner): support ID3v2 embedded images in WAV files Fix #3867 Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): show bitDepth in song info dialog Signed-off-by: Deluan <deluan@navidrome.org> * fix(server): don't break if the ND_CONFIGFILE does not exist Signed-off-by: Deluan <deluan@navidrome.org> * feat(docker): automatically loads a navidrome.toml file from /data, if available Signed-off-by: Deluan <deluan@navidrome.org> * feat(server): custom ArtistJoiner config (#3873) * feat(server): custom ArtistJoiner config Signed-off-by: Deluan <deluan@navidrome.org> * refactor(ui): organize ArtistLinkField, add tests Signed-off-by: Deluan <deluan@navidrome.org> * feat(ui): use display artist * feat(ui): use display artist Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org> * chore: remove some BFR-related TODOs that are not valid anymore Signed-off-by: Deluan <deluan@navidrome.org> * chore: remove more outdated TODOs Signed-off-by: Deluan <deluan@navidrome.org> * fix(scanner): elapsed time for folder processing is wrong in the logs Signed-off-by: Deluan <deluan@navidrome.org> * Should be able to reuse this mechanism with deb and rpm, I think it would be nice to know which specific one it is without guessing based on /etc/debian_version or something; but it doesn't look like that is exposed by goreleaser into an env or anything :/ * Need to reference the installed file and I think Id's don't require [] * Need to add into the root directory for this to work * That was not deliberately removed * feat: add RPM and DEB package configuration files for Navidrome Signed-off-by: Deluan <deluan@navidrome.org> * Don't need this as goreleaser will sort it out --------- Signed-off-by: Deluan <deluan@navidrome.org> Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2025-11-09 08:57:55 -09:00
<ComponentRef Id='PackageFile' />
feat: Windows MSI installer and service support (#3125) * First version/rough layout of the required wix to build an MSI that embeds everything * Don't need revision number * produced exe from existing build process is navidrome not Navidrome * Adding Kardianos wrapper around Cobra so the callbacks are handled automatically (this is basically only for windows) * Adding pointless check to shut up lint for now * make format * Revert disabling npm tidy * Using Kardianos always will result in the application hanging so it needs only be wrapped to handle the callbacks if it's being used in the service context, otherwise use cobra directly * Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295 * Under Linux this installs a user service (I don't think this is correct, but lets get this working first). User units/services cannot depends on system units, so previously this bombed out with Exit Code 5. * Under Windows we can install both the x86 and x64 builds, they will install to different folders, but previously they would overwrite the service as they were both called Navidrome. Now, it will install 2 services. This will still be weird/broken as they will attempt to listen on the same port, however uninstalling the "wrong" arch will not cause the "right" one to be partially uninstalled anymore * Reverting changes to the context as they don't really seem necessary anyway * Need to consistently name the service * Fixing broken context * The included files should be removed when the app is uninstalled * Reverting back to the original context here, I don't think it makes any difference to running under kardianos * Let's see what we have immediately available * OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky * Need -r on directory copy, plus we'll probably need to install wixl * No sudo cmd, so I assume this runs as root * WORKSPACE! * Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever * Might as well put the msi in the right folder, it's tidier * Writing the version number into the msi, from the output of goreleaser * Using jq to parse the goreleaser metadata, so need to install it * MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater * -r or --raw (on newer versions) means we don't get the "" around the value * Running as a user service I think makes limited sense for this * Will now ask for configuration settings during install. MSI/WiX only supports writing out INI files, Toml is almost INI compatable, except that the INI needs to write out a section first, so we need to have a script to strip that off. We are forced to display a License.rtf file by the UI so I think the build process should probably rename the default licence file and that will suffice. Uninstalling works cleanly, howvever upgrades seem to leave the old version installed in "programs and features" currently. Adding the UI has introduced a requirement for WiX 0.103 * Updating the build to include --ext ui for the new config ui * Configuration dialog should not display for upgrades as the config file is already written * Making description consistent with the systemd service and making the build process produce the required License.rtf * Fixing " non-constant format string in call to fmt.Errorf (govet)" * Its a string, not an int; read better. * Wixl 103 is required for --ext ui, so we need 24.04 * OK this is still installing Wix 0.101, maybe it all needs to be 24.04? * Switching the builds back to ubuntu-latest (22.04 at current) as it runs on a custom container, it's actually debian anyway Moving msi build into its own job so it can run on 24.04 so we have access to wixl 0.103 for --ext ui support * Forcing build * Whitespace fix * Adding sudo I guess * Gotta checkout as well * Adding debugging for when there's soemthing wrong with the paths * Adding more ls to see if the output has worked * The msi's are in subdirs * Actually they're in the ./wix directory * Still can't find these msi's? * I think that was being treated literally previously * No idea why this isn't working, give it a relative path instead? * Making explicit on the dialogue that the configuration file will be where the installation dir is * The lint keeps failing and it's just getting in the way so I'll turn this off for now and we'll edit out this commit from the merge * Cutting more out of the build to get more stuff out of the way * Need to increase the width to fit the text in * Calling everything License.rtf, presumably one of them is correct * I am pretty sure the License.rtf loading is broken under Wixl; so let's just bypass the EULA from the UI which is a nicer experience for the users anyway * This needs to be after WelcomeDlg now the Eula isn't displayed * You're supposed to be able to use <WixVariable> to override the location that the bmp's are loaded from, I can't get this to work under wixl so I'm guessing given that the ui extension is new, it hasn't been implemented with that in mind. So we'll hack it by overwriting the files installed with the package. * We should make this less brittle so when wixl is updated it still works * Re-enabling the lint and tests etc * Improving the scaling quality and removing borders from images to tidy them up a tad * Pretty sure this isn't necessary as MY_PROPERTY will always be false * Without publishing this event, we can't continue to the next dialogue however I think we should be able to get away without the property * Refactoring out the duplication so we only have one service defined and we can run that either way * Pushing the Interactive check into the root commmand? Feels like it is probably getting closer to the right place at least * go tidy * OK this didn't work under windows, I'm guessing it's because it's lacking all the metadata about the service it needs to report back to Windows on. * We need to run service execute now so that the windows service will behave (hopefully)! * Lint * go tidy * Renaming service to "navidrome" rather than "Navidrome" as this is the filename that systemd writes and it's unusual to have capital letters in service names under Linux. Switching to use service execute for Linux to mirror Windows * Need to provide the arguments to append * Without passing the context around, the DB isn't closed gracefully so we end up with with .db-shm and .db-wal files for recovery * We should log fatal rather than outputting directly to stdout * go tidy * refactor: small nitpicks * fix: terminate service gracefully --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 15:40:53 -08:00
</Feature>
</Product>
</Wix>