Refactor Windows installer scripts to remove desktop and start menu shortcut sections
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Removed the sections for creating desktop and start menu shortcuts from `farmcontrol.nsi`, streamlining the installer process. - Updated `installer.nsh` to ensure shortcuts are created during installation and removed during uninstallation, enhancing user experience and consistency.
This commit is contained in:
parent
2335a64c03
commit
17b5068644
@ -38,7 +38,6 @@ Icon "${INSTALLER_ICON}"
|
||||
UninstallIcon "${INSTALLER_ICON}"
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
@ -75,20 +74,6 @@ Section "Farm Control" SecMain
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
Section "Desktop shortcut" SecDesktop
|
||||
!insertmacro createDesktopShortcut
|
||||
SectionEnd
|
||||
|
||||
Section "Start Menu shortcut" SecStartMenu
|
||||
!insertmacro createStartMenuShortcut
|
||||
SectionEnd
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} "Install Farm Control."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "Create a shortcut on the Desktop."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} "Create a shortcut in the Start Menu."
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
Section "Uninstall"
|
||||
!insertmacro customUnInstall
|
||||
|
||||
|
||||
@ -29,19 +29,23 @@
|
||||
!macroend
|
||||
|
||||
!macro createDesktopShortcut
|
||||
SetShellVarContext all
|
||||
CreateShortCut "$DESKTOP\Farm Control.lnk" "$INSTDIR\bin\launcher.exe"
|
||||
!macroend
|
||||
|
||||
!macro createStartMenuShortcut
|
||||
SetShellVarContext all
|
||||
CreateDirectory "$SMPROGRAMS\Farm Control"
|
||||
CreateShortCut "$SMPROGRAMS\Farm Control\Farm Control.lnk" "$INSTDIR\bin\launcher.exe"
|
||||
!macroend
|
||||
|
||||
!macro removeDesktopShortcut
|
||||
SetShellVarContext all
|
||||
Delete "$DESKTOP\Farm Control.lnk"
|
||||
!macroend
|
||||
|
||||
!macro removeStartMenuShortcut
|
||||
SetShellVarContext all
|
||||
Delete "$SMPROGRAMS\Farm Control\Farm Control.lnk"
|
||||
RMDir "$SMPROGRAMS\Farm Control"
|
||||
!macroend
|
||||
@ -55,6 +59,10 @@
|
||||
WriteRegStr HKCR "farmcontrol\shell" "" ""
|
||||
WriteRegStr HKCR "farmcontrol\shell\Open" "" ""
|
||||
WriteRegStr HKCR "farmcontrol\shell\Open\command" "" '"$INSTDIR\bin\bun.exe" "$INSTDIR\bin\deeplink.js" "%1"'
|
||||
|
||||
DetailPrint "Creating shortcuts"
|
||||
!insertmacro createDesktopShortcut
|
||||
!insertmacro createStartMenuShortcut
|
||||
!macroend
|
||||
|
||||
!macro customUnInstall
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user