diff options
author | sr55 <[email protected]> | 2020-05-22 19:28:41 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2020-05-22 19:28:41 +0100 |
commit | 3d3b66426f6895e64e3d394a877d6e4ed90f6860 (patch) | |
tree | f2585c8d01b73d1ccff3c479f260b8fd5ddf0f29 /win | |
parent | 06fee7e392d2cda7374ed368bf62d960c1106d22 (diff) |
WinGui: Improvements to the installer.
- Make desktop shortcuts optional. (Choice of adding for all users, or current user now available)
- Start menu shortcuts now installs for all users by default.
- The installer for the release will now default to the same name we use on the website for ease of deployment.
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Installer/Installer64.nsi | 58 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi | 46 |
2 files changed, 82 insertions, 22 deletions
diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi index beeb7f928..bc8be294b 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi @@ -17,14 +17,14 @@ SetCompressor lzma
ManifestDPIAware true
-; MUI 1.67 compatible ------
-!include "MUI.nsh"
-!include WinVer.nsh
-
; Required for Github Actions (or local builds were inetc is not part of the installed NSIS)
; Extract inetc.zip to the HandBrake root directory into a folder called plugins.
!addplugindir /x86-ansi "..\..\..\..\..\..\plugins\Plugins\x86-ansi"
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+!include WinVer.nsh
+
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "HandBrakepineapple.ico"
@@ -32,13 +32,15 @@ ManifestDPIAware true ; GPL is not an EULA, no need to agree to it.
!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
; 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
@@ -56,7 +58,7 @@ ManifestDPIAware true ; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
-OutFile "HandBrake-${PRODUCT_VERSION_NUMBER}-Win_GUI.exe"
+OutFile "HandBrake-${PRODUCT_VERSION_NUMBER}-x86_64-Win_GUI.exe"
!include WordFunc.nsh
!insertmacro VersionCompare
@@ -117,9 +119,10 @@ Function .onInit done:
FunctionEnd
-Section "HandBrake" SEC01
+Section "HandBrake" SectionApp
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
+ SectionIn RO ; Read only, always installed
; Begin Check .NET version
StrCpy $InstallDotNET "No"
@@ -147,10 +150,7 @@ Section "HandBrake" SEC01 ${EndIf}
; Install Files
- File "HandBrake.exe"
- CreateDirectory "$SMPROGRAMS\HandBrake"
- CreateShortCut "$SMPROGRAMS\HandBrake\HandBrake.lnk" "$INSTDIR\HandBrake.exe"
- CreateShortCut "$DESKTOP\HandBrake.lnk" "$INSTDIR\HandBrake.exe"
+ File "*.exe"
File "*.dll"
File "*.template"
File "*.config"
@@ -188,16 +188,32 @@ Section "HandBrake" SEC01 SetOutPath "$INSTDIR\ja"
SetOverwrite ifnewer
File "ja\*.*"
- +
SetOutPath "$INSTDIR\pt-BR"
SetOverwrite ifnewer
- File "pt-BR\*.*" + File "pt-BR\*.*"
; Copy the standard doc set into the doc folder
SetOutPath "$INSTDIR\doc"
SetOverwrite ifnewer
File "doc\*.*"
+ ; Start Menu Shortcut for All users.
+ SetShellVarContext all
+ CreateDirectory "$SMPROGRAMS\HandBrake"
+ 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
@@ -213,6 +229,13 @@ 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
@@ -250,7 +273,7 @@ Section Uninstall Delete "$INSTDIR\tr\*.*"
RMDir "$INSTDIR\tr"
Delete "$INSTDIR\ja\*.*"
- RMDir "$INSTDIR\ja" + RMDir "$INSTDIR\ja"
Delete "$INSTDIR\pt-BR\*.*"
RMDir "$INSTDIR\pt-BR"
@@ -264,6 +287,13 @@ Section Uninstall DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+
+ SetShellVarContext all
+ Delete "$SMPROGRAMS\HandBrake Nightly\Uninstall.lnk"
+ Delete "$SMPROGRAMS\HandBrake Nightly\HandBrake Nightly.lnk"
+ RMDir "$SMPROGRAMS\HandBrake Nightly"
+ Delete "$DESKTOP\HandBrake Nightly.lnk"
+
SetAutoClose true
SectionEnd
diff --git a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi index fde0ba8b7..fa8bd4980 100644 --- a/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi +++ b/win/CS/HandBrakeWPF/Installer/MakeNightly64.nsi @@ -32,13 +32,15 @@ ManifestDPIAware true ; GPL is not an EULA, no need to agree to it.
!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
; 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
@@ -116,9 +118,10 @@ Function .onInit done:
FunctionEnd
-Section "HandBrake" SEC01
+Section "HandBrake" SectionApp
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
+ SectionIn RO ; Read only, always installed
; Begin Check .NET version
StrCpy $InstallDotNET "No"
@@ -147,9 +150,6 @@ Section "HandBrake" SEC01 ; Install Files
File "*.exe"
- CreateDirectory "$SMPROGRAMS\HandBrake Nightly"
- CreateShortCut "$SMPROGRAMS\HandBrake Nightly\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe"
- CreateShortCut "$DESKTOP\HandBrake Nightly.lnk" "$INSTDIR\HandBrake.exe"
File "*.dll"
File "*.template"
File "*.config"
@@ -186,8 +186,8 @@ Section "HandBrake" SEC01 SetOutPath "$INSTDIR\ja"
SetOverwrite ifnewer
- File "ja\*.*" - + File "ja\*.*"
+
SetOutPath "$INSTDIR\pt-BR"
SetOverwrite ifnewer
File "pt-BR\*.*"
@@ -196,6 +196,23 @@ Section "HandBrake" SEC01 SetOutPath "$INSTDIR\doc"
SetOverwrite ifnewer
File "doc\*.*"
+
+ ; Start Menu Shortcut for All users.
+ SetShellVarContext all
+ CreateDirectory "$SMPROGRAMS\HandBrake Nightly"
+ 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
@@ -211,6 +228,12 @@ 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
@@ -246,7 +269,7 @@ Section Uninstall Delete "$INSTDIR\tr\*.*"
RMDir "$INSTDIR\tr"
Delete "$INSTDIR\ja\*.*"
- RMDir "$INSTDIR\ja" + RMDir "$INSTDIR\ja"
Delete "$INSTDIR\pt-BR\*.*"
RMDir "$INSTDIR\pt-BR"
@@ -259,6 +282,13 @@ Section Uninstall DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+
+ SetShellVarContext all
+ Delete "$SMPROGRAMS\HandBrake Nightly\Uninstall.lnk"
+ Delete "$SMPROGRAMS\HandBrake Nightly\HandBrake Nightly.lnk"
+ RMDir "$SMPROGRAMS\HandBrake Nightly"
+ Delete "$DESKTOP\HandBrake Nightly.lnk"
+
SetAutoClose true
SectionEnd
|