Tom Butcher 456e7904bf
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
Update Windows installer and build scripts for launcher executable and icon management
- Replaced references to `farmcontrol-server.exe` with `launcher.exe` in the NSIS installer script and build scripts for consistency with the new executable naming.
- Updated the icon path in the configuration to use a PNG file instead of ICO, enhancing visual fidelity.
- Removed the `prepare-windows-app-binaries.mjs` script to streamline the build process, as its functionality is now integrated into other scripts.
- Enhanced error handling in the build script to ensure the correct executable is present before proceeding.
2026-08-02 00:09:48 +01:00

35 lines
1.2 KiB
NSIS

!macro createDesktopShortcut
CreateShortCut "$DESKTOP\Farm Control Server.lnk" "$INSTDIR\bin\launcher.exe"
!macroend
!macro createStartMenuShortcut
CreateDirectory "$SMPROGRAMS\Farm Control Server"
CreateShortCut "$SMPROGRAMS\Farm Control Server\Farm Control Server.lnk" "$INSTDIR\bin\launcher.exe"
!macroend
!macro removeDesktopShortcut
Delete "$DESKTOP\Farm Control Server.lnk"
!macroend
!macro removeStartMenuShortcut
Delete "$SMPROGRAMS\Farm Control Server\Farm Control Server.lnk"
RMDir "$SMPROGRAMS\Farm Control Server"
!macroend
!macro customInstall
DetailPrint "Register farmcontrolserver URI Handler"
DeleteRegKey HKCR "farmcontrolserver"
WriteRegStr HKCR "farmcontrolserver" "" "URL:farmcontrolserver"
WriteRegStr HKCR "farmcontrolserver" "URL Protocol" ""
WriteRegStr HKCR "farmcontrolserver\DefaultIcon" "" "$INSTDIR\bin\launcher.exe"
WriteRegStr HKCR "farmcontrolserver\shell" "" ""
WriteRegStr HKCR "farmcontrolserver\shell\Open" "" ""
WriteRegStr HKCR "farmcontrolserver\shell\Open\command" "" '"$INSTDIR\bin\launcher.exe" "%1"'
!macroend
!macro customUnInstall
!insertmacro removeDesktopShortcut
!insertmacro removeStartMenuShortcut
DeleteRegKey HKCR "farmcontrolserver"
!macroend