From 15c5785751c7741fcdf52507c1dc5cfb37fea792 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 26 May 2020 22:20:53 +0100 Subject: WinGui: Move the "desktop shortcut" feature of the installer to the finish page so it's most consistent with other installers. --- win/CS/HandBrakeWPF/Installer/Installer64.nsi | 32 +++++++------------------ win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi | 30 +++++++---------------- 2 files changed, 17 insertions(+), 45 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi index bc8be294b..b07d11dfa 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi @@ -33,14 +33,15 @@ ManifestDPIAware true !define MUI_LICENSEPAGE_BUTTON $(^NextBtn) !define MUI_LICENSEPAGE_TEXT_BOTTOM "You are now aware of your rights. Click Next to continue." !define MUI_WELCOMEFINISHPAGE_BITMAP "InstallerBackground.bmp" -!define MUI_COMPONENTSPAGE_SMALLDESC + +!define MUI_FINISHPAGE_RUN +!define MUI_FINISHPAGE_RUN_TEXT "Create desktop shortcut (all users)" +!define MUI_FINISHPAGE_RUN_FUNCTION "desktopShortcut" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !insertmacro MUI_PAGE_LICENSE "doc\COPYING" -; Components page -!insertmacro MUI_PAGE_COMPONENTS ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page @@ -204,18 +205,6 @@ Section "HandBrake" SectionApp CreateShortCut "$SMPROGRAMS\HandBrake\HandBrake.lnk" "$INSTDIR\HandBrake.exe" SectionEnd -Section /o "Desktop shortcut " SectionDesktop - SetShellVarContext current - CreateShortCut "$SMPROGRAMS\HandBrake\HandBrake.lnk" "$INSTDIR\HandBrake.exe" - CreateShortCut "$DESKTOP\HandBrake.lnk" "$INSTDIR\HandBrake.exe" -SectionEnd - -Section "Desktop shortcut (all users)" SectionDesktopAll - SetShellVarContext all - CreateShortCut "$SMPROGRAMS\HandBrake\HandBrake.lnk" "$INSTDIR\HandBrake.exe" - CreateShortCut "$DESKTOP\HandBrake.lnk" "$INSTDIR\HandBrake.exe" -SectionEnd - Section -AdditionalIcons CreateShortCut "$SMPROGRAMS\HandBrake\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd @@ -229,14 +218,6 @@ Section -Post WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" SectionEnd -; User Interface -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SectionApp} "The HandBrake Applicaiton" - !insertmacro MUI_DESCRIPTION_TEXT ${SectionDesktop} "Add a shortcut for the current user only." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionDesktopAll} "Add a shortcut for all users." -!insertmacro MUI_FUNCTION_DESCRIPTION_END - - Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK @@ -297,6 +278,11 @@ Section Uninstall SetAutoClose true SectionEnd +Function "desktopShortcut" + SetShellVarContext all + CreateShortCut "$DESKTOP\HandBrake.lnk" "$INSTDIR\HandBrake.exe" +FunctionEnd + ;Check for .NET framework Function CheckFrameWork ; Magic numbers from http://msdn.microsoft.com/en-us/library/ee942965.aspx diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi index fa8bd4980..b8f874418 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi @@ -33,14 +33,14 @@ ManifestDPIAware true !define MUI_LICENSEPAGE_BUTTON $(^NextBtn) !define MUI_LICENSEPAGE_TEXT_BOTTOM "You are now aware of your rights. Click Next to continue." !define MUI_WELCOMEFINISHPAGE_BITMAP "InstallerBackground.bmp" -!define MUI_COMPONENTSPAGE_SMALLDESC +!define MUI_FINISHPAGE_RUN +!define MUI_FINISHPAGE_RUN_TEXT "Create desktop shortcut (all users)" +!define MUI_FINISHPAGE_RUN_FUNCTION "desktopShortcut" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !insertmacro MUI_PAGE_LICENSE "doc\COPYING" -; Components page -!insertmacro MUI_PAGE_COMPONENTS ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page @@ -203,18 +203,6 @@ Section "HandBrake" SectionApp CreateShortCut "$SMPROGRAMS\HandBrake Nightly\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe" SectionEnd -Section /o "Desktop shortcut " SectionDesktop - SetShellVarContext current - CreateShortCut "$SMPROGRAMS\HandBrake Nightly\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe" - CreateShortCut "$DESKTOP\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe" -SectionEnd - -Section "Desktop shortcut (all users)" SectionDesktopAll - SetShellVarContext all - CreateShortCut "$SMPROGRAMS\HandBrake Nightly\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe" - CreateShortCut "$DESKTOP\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe" -SectionEnd - Section -AdditionalIcons CreateShortCut "$SMPROGRAMS\HandBrake Nightly\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd @@ -228,13 +216,6 @@ Section -Post WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" SectionEnd -; User Interface -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SectionApp} "The HandBrake Applicaiton" - !insertmacro MUI_DESCRIPTION_TEXT ${SectionDesktop} "Add a shortcut for the current user only." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionDesktopAll} "Add a shortcut for all users." -!insertmacro MUI_FUNCTION_DESCRIPTION_END - Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK @@ -292,6 +273,11 @@ Section Uninstall SetAutoClose true SectionEnd +Function "desktopShortcut" + SetShellVarContext all + CreateShortCut "$DESKTOP\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe" +FunctionEnd + ;Check for .NET framework Function CheckFrameWork ; Magic numbers from http://msdn.microsoft.com/en-us/library/ee942965.aspx -- cgit v1.2.3