Skip to content

Commit fd0b701

Browse files
authored
Windows: Update NSIS standalone installer: Unicode, High-DPI, GRASS GIS to GRASS, typo (#5685)
* Windows: Create High-DPI aware standalone installer * Windows: Create Unicode standalone installer Supported with NSIS 3.0 and more, and the installers will not work with Windows 95-98-ME. * Windows: Fix typo in variable MUI_HEADERIMAGE_BITMAP_NOSTRETCH See docs for the "Modern UI" (XP-era) at https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html * Windows: Rename GRASS GIS to GRASS in installer Note that this changes the install path for the GRASS 8.5 version. The NSIS installer doesn't do upgrades, so shouldn't affect existing versions
1 parent eb89b65 commit fd0b701

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

mswindows/GRASS-Installer.nsi.tmpl

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
;Last Update: $Id$
77
;Mail to: grass-dev@lists.osgeo.org
88

9+
;----------------------------------------------------------------------------------------------------------------------------
10+
; Create a Unicode installer. Supported with NSIS 3.0 and more, and the installers will not work with Windows 95-98-ME.
11+
Unicode true
912
;----------------------------------------------------------------------------------------------------------------------------
1013

1114
;Select if you are building a "Development Version" (Devel) or a "Release Version" (Release) of the GRASS Installer
@@ -18,6 +21,10 @@
1821
SetCompressor /SOLID lzma
1922
SetCompressorDictSize 128
2023

24+
;----------------------------------------------------------------------------------------------------------------------------
25+
; Make the installer support High DPI screens
26+
ManifestDPIAware true
27+
2128
;----------------------------------------------------------------------------------------------------------------------------
2229

2330
;Version variables
@@ -29,7 +36,7 @@ SetCompressorDictSize 128
2936
!endif
3037
!define BINARY_REVISION "1"
3138
!define VERSION_NUMBER "@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@"
32-
!define GRASS_BASE "GRASS GIS @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@"
39+
!define GRASS_BASE "GRASS @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@"
3340
!define GRASS_COMMAND "grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@"
3441

3542
;----------------------------------------------------------------------------------------------------------------------------
@@ -60,12 +67,12 @@ InstallDir "$PROGRAMFILES64\${GRASS_BASE}"
6067
!define PACKAGE_FOLDER ".\GRASS-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@-Package"
6168
!if ${INSTALLER_TYPE} == "Release"
6269
!define INSTALLER_NAME "WinGRASS-${VERSION_NUMBER}-${BINARY_REVISION}-Setup.exe"
63-
!define DISPLAYED_NAME "GRASS GIS ${VERSION_NUMBER}-${BINARY_REVISION}"
64-
!define CHECK_INSTALL_NAME "GRASS GIS @GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@"
70+
!define DISPLAYED_NAME "GRASS ${VERSION_NUMBER}-${BINARY_REVISION}"
71+
!define CHECK_INSTALL_NAME "GRASS @GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@"
6572
!else
6673
!define INSTALLER_NAME "WinGRASS-${VERSION_NUMBER}-${GIT_REVISION}-${BINARY_REVISION}-Setup.exe"
67-
!define DISPLAYED_NAME "GRASS GIS ${VERSION_NUMBER}-${GIT_REVISION}-${BINARY_REVISION}"
68-
!define CHECK_INSTALL_NAME "GRASS GIS @GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@ GIT"
74+
!define DISPLAYED_NAME "GRASS ${VERSION_NUMBER}-${GIT_REVISION}-${BINARY_REVISION}"
75+
!define CHECK_INSTALL_NAME "GRASS @GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@ GIT"
6976
!endif
7077

7178
;Define the source path of the demolocation files
@@ -403,7 +410,7 @@ FunctionEnd
403410
!define MUI_ABORTWARNING
404411
!define MUI_ICON ".\Installer-Files\Install_GRASS.ico"
405412
!define MUI_UNICON ".\Installer-Files\Uninstall_GRASS.ico"
406-
!define MUI_HEADERIMAGE_BITMAP_NOSTETCH ".\Installer-Files\InstallHeaderImage.bmp"
413+
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH ".\Installer-Files\InstallHeaderImage.bmp"
407414
!define MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH ".\Installer-Files\UnInstallHeaderImage.bmp"
408415
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\Installer-Files\WelcomeFinishPage.bmp"
409416
!define MUI_UNWELCOMEFINISHPAGE_BITMAP ".\Installer-Files\UnWelcomeFinishPage.bmp"
@@ -435,7 +442,7 @@ FunctionEnd
435442
!define MUI_FINISHPAGE_NOAUTOCLOSE
436443
!define MUI_FINISHPAGE_RUN
437444
!define MUI_FINISHPAGE_RUN_NOTCHECKED
438-
!define MUI_FINISHPAGE_RUN_TEXT "Launch GRASS GIS"
445+
!define MUI_FINISHPAGE_RUN_TEXT "Launch GRASS"
439446
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchGrass"
440447
!define MUI_FINISHPAGE_SHOWREADME
441448
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
@@ -619,7 +626,7 @@ Section "GRASS" SecGRASS
619626
WriteRegStr HKLM "Software\${GRASS_BASE}" "InstallPath" "$INSTALL_DIR"
620627

621628
;HKEY_LOCAL_MACHINE Uninstall entries
622-
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "DisplayName" "GRASS GIS @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@"
629+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "DisplayName" "GRASS @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@"
623630
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "UninstallString" "$INSTALL_DIR\Uninstall-GRASS.exe"
624631

625632
!if ${INSTALLER_TYPE} == "Release"
@@ -641,18 +648,18 @@ Section "GRASS" SecGRASS
641648
SetShellVarContext current
642649

643650
CreateShortCut "$DESKTOP\${GRASS_BASE}.lnk" "$INSTALL_DIR\${GRASS_COMMAND}.bat" "--gui"\
644-
"$INSTALL_DIR\gui\icons\grass.ico" "" SW_SHOWNORMAL "" "Launch GRASS GIS ${VERSION_NUMBER}"
651+
"$INSTALL_DIR\gui\icons\grass.ico" "" SW_SHOWNORMAL "" "Launch GRASS ${VERSION_NUMBER}"
645652

646653
;Create the Windows Start Menu Shortcuts
647654
SetShellVarContext all
648655

649656
CreateDirectory "$SMPROGRAMS\${GRASS_BASE}"
650657

651658
CreateShortCut "$SMPROGRAMS\${GRASS_BASE}\${GRASS_BASE}.lnk" "$INSTALL_DIR\${GRASS_COMMAND}.bat" "--gui"\
652-
"$INSTALL_DIR\gui\icons\grass.ico" "" SW_SHOWNORMAL "" "Launch GRASS GIS ${VERSION_NUMBER}"
659+
"$INSTALL_DIR\gui\icons\grass.ico" "" SW_SHOWNORMAL "" "Launch GRASS ${VERSION_NUMBER}"
653660

654661
CreateShortCut "$SMPROGRAMS\${GRASS_BASE}\Uninstall ${GRASS_BASE}.lnk" "$INSTALL_DIR\Uninstall-GRASS.exe" ""\
655-
"$INSTALL_DIR\Uninstall-GRASS.exe" "" SW_SHOWNORMAL "" "Uninstall GRASS GIS ${VERSION_NUMBER}"
662+
"$INSTALL_DIR\Uninstall-GRASS.exe" "" SW_SHOWNORMAL "" "Uninstall GRASS ${VERSION_NUMBER}"
656663

657664
;Create the grass_command.bat
658665
ClearErrors

0 commit comments

Comments
 (0)