|
@@ -2,42 +2,29 @@
|
|
|
|
|
|
;GRASS Installer for Windows
|
|
|
;Written by Marco Pasetti
|
|
|
-;Updated for OSGeo4W by Colin Nielsen
|
|
|
-;Last Update: 30 March 2009
|
|
|
+;Updated for OSGeo4W by Colin Nielsen, Helmut Kudrnovsky, and Martin Landa
|
|
|
+;Last Update: 17 Jan 2010
|
|
|
;Mail to: grass-dev@lists.osgeo.org
|
|
|
|
|
|
;----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
;Define the source path of the demolocation files
|
|
|
|
|
|
-!define DEMOLOCATION_PATH "c:\osgeo4w\usr\src\grass-7.0.svn\demolocation"
|
|
|
+!define DEMOLOCATION_PATH "c:\osgeo4w\usr\src\grass_trunk\demolocation"
|
|
|
|
|
|
;Select if you are building a "Development Version" or a "Release Version" of the GRASS Installer
|
|
|
-;Change the INSTALLER_TYPE variable to Release, Dev6 or Dev7
|
|
|
|
|
|
-!define INSTALLER_TYPE "Dev7"
|
|
|
+!define INSTALLER_TYPE "Dev70"
|
|
|
|
|
|
;----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
;Version variables
|
|
|
|
|
|
-!define RELEASE_VERSION_NUMBER "6.4.0RC5"
|
|
|
-!define RELEASE_SVN_REVISION "36599"
|
|
|
-!define RELEASE_BINARY_REVISION "1"
|
|
|
-!define RELEASE_GRASS_COMMAND "grass64"
|
|
|
-!define RELEASE_GRASS_BASE "GRASS"
|
|
|
-
|
|
|
-!define DEV6_VERSION_NUMBER "6.5.SVN"
|
|
|
-!define DEV6_SVN_REVISION "36599"
|
|
|
-!define DEV6_BINARY_REVISION "1"
|
|
|
-!define DEV6_GRASS_COMMAND "grass65"
|
|
|
-!define DEV6_GRASS_BASE "GRASS-6-SVN"
|
|
|
-
|
|
|
-!define DEV7_VERSION_NUMBER "7.0.SVN"
|
|
|
-!define DEV7_SVN_REVISION ""
|
|
|
-!define DEV7_BINARY_REVISION "1"
|
|
|
-!define DEV7_GRASS_COMMAND "grass7"
|
|
|
-!define DEV7_GRASS_BASE"GRASS-7-SVN"
|
|
|
+!define DEV70_VERSION_NUMBER "7.0.SVN"
|
|
|
+!define DEV70_SVN_REVISION "36599"
|
|
|
+!define DEV70_BINARY_REVISION "1"
|
|
|
+!define DEV70_GRASS_COMMAND "grass70svn"
|
|
|
+!define DEV70_GRASS_BASE "GRASS-70-SVN"
|
|
|
|
|
|
;----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -54,36 +41,16 @@
|
|
|
|
|
|
;Set the installer variables, depending on the selected version to build
|
|
|
|
|
|
-!if ${INSTALLER_TYPE} == "Release"
|
|
|
- !define VERSION_NUMBER "${RELEASE_VERSION_NUMBER}"
|
|
|
- !define SVN_REVISION "${RELEASE_SVN_REVISION}"
|
|
|
- !define BINARY_REVISION "${RELEASE_BINARY_REVISION}"
|
|
|
- !define GRASS_COMMAND "${RELEASE_GRASS_COMMAND}"
|
|
|
- !define GRASS_BASE "${RELEASE_GRASS_BASE}"
|
|
|
- !define INSTALLER_NAME "WinGRASS-${VERSION_NUMBER}-${BINARY_REVISION}-Setup.exe"
|
|
|
- !define DISPLAYED_NAME "GRASS ${VERSION_NUMBER}-${BINARY_REVISION}"
|
|
|
- !define CHECK_INSTALL_NAME "GRASS"
|
|
|
- !define PACKAGE_FOLDER ".\GRASS-Release-Package"
|
|
|
-!else if ${INSTALLER_TYPE} == "Dev6"
|
|
|
- !define VERSION_NUMBER "${DEV6_VERSION_NUMBER}"
|
|
|
- !define SVN_REVISION "${DEV6_SVN_REVISION}"
|
|
|
- !define BINARY_REVISION "${DEV6_BINARY_REVISION}"
|
|
|
- !define GRASS_COMMAND "${DEV6_GRASS_COMMAND}"
|
|
|
- !define GRASS_BASE "${DEV6_GRASS_BASE}"
|
|
|
- !define INSTALLER_NAME "WinGRASS-${VERSION_NUMBER}-r${SVN_REVISION}-${BINARY_REVISION}-Setup.exe"
|
|
|
- !define DISPLAYED_NAME "GRASS ${VERSION_NUMBER}-r${SVN_REVISION}-${BINARY_REVISION}"
|
|
|
- !define CHECK_INSTALL_NAME "GRASS 6 SVN"
|
|
|
- !define PACKAGE_FOLDER ".\GRASS-6-Dev-Package"
|
|
|
-!else if ${INSTALLER_TYPE} == "Dev7"
|
|
|
- !define VERSION_NUMBER "${DV7_VERSION_NUMBER}"
|
|
|
- !define SVN_REVISION "${DV7_SVN_REVISION}"
|
|
|
- !define BINARY_REVISION "${DV7_BINARY_REVISION}"
|
|
|
- !define GRASS_COMMAND "${DEV7_GRASS_COMMAND}"
|
|
|
- !define GRASS_BASE "${DEV7_GRASS_BASE}"
|
|
|
+!if ${INSTALLER_TYPE} == "Dev70"
|
|
|
+ !define VERSION_NUMBER "${DEV70_VERSION_NUMBER}"
|
|
|
+ !define SVN_REVISION "${DEV70_SVN_REVISION}"
|
|
|
+ !define BINARY_REVISION "${DEV70_BINARY_REVISION}"
|
|
|
+ !define GRASS_COMMAND "${DEV70_GRASS_COMMAND}"
|
|
|
+ !define GRASS_BASE "${DEV70_GRASS_BASE}"
|
|
|
!define INSTALLER_NAME "WinGRASS-${VERSION_NUMBER}-r${SVN_REVISION}-${BINARY_REVISION}-Setup.exe"
|
|
|
!define DISPLAYED_NAME "GRASS ${VERSION_NUMBER}-r${SVN_REVISION}-${BINARY_REVISION}"
|
|
|
- !define CHECK_INSTALL_NAME "GRASS 7 SVN"
|
|
|
- !define PACKAGE_FOLDER ".\GRASS-7-Dev-Package"
|
|
|
+ !define CHECK_INSTALL_NAME "GRASS 70 SVN"
|
|
|
+ !define PACKAGE_FOLDER ".\GRASS-70-Dev-Package"
|
|
|
!endif
|
|
|
|
|
|
;----------------------------------------------------------------------------------------------------------------------------
|
|
@@ -105,7 +72,7 @@ Name "${DISPLAYED_NAME}"
|
|
|
OutFile "${INSTALLER_NAME}"
|
|
|
|
|
|
;Define installation folder
|
|
|
-InstallDir "C:\${GRASS_BASE}"
|
|
|
+InstallDir "$PROGRAMFILES\${GRASS_BASE}"
|
|
|
|
|
|
;Request application privileges for Windows Vista
|
|
|
RequestExecutionLevel user
|
|
@@ -321,33 +288,33 @@ FunctionEnd
|
|
|
;----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
;CheckInstDir Function
|
|
|
+;this is commented out, because the installation path should be in $PROGRAMFILES
|
|
|
;Check if GRASS is going to be installed in a directory containing spaces
|
|
|
;if yes, show a warning message
|
|
|
|
|
|
-Function CheckInstDir
|
|
|
-
|
|
|
- Var /GLOBAL INSTDIR_TEST
|
|
|
- Var /GLOBAL INSTDIR_LENGHT
|
|
|
- Var /GLOBAL INSTDIR_TEST_LENGHT
|
|
|
- Var /GLOBAL MESSAGE_CHKINST_
|
|
|
-
|
|
|
- StrCpy $MESSAGE_CHKINST_ "WARNING: you are about to install GRASS into a directory that has spaces$\r$\n"
|
|
|
- StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_in either its name or the path of directories leading up to it.$\r$\n"
|
|
|
- StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_Some functionalities of GRASS might be hampered by this. We would highly$\r$\n"
|
|
|
- StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_appreciate if you tried and reported any problems, so that we can fix them.$\r$\n"
|
|
|
- StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_However, if you want to avoid any such issues, we recommend that you$\r$\n"
|
|
|
- StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_choose a simple installation path without spaces, such as: C:\${GRASS_BASE}.$\r$\n"
|
|
|
-
|
|
|
- ${StrReplace} "$INSTDIR_TEST" " " "" "$INSTDIR"
|
|
|
-
|
|
|
- StrLen $INSTDIR_LENGHT "$INSTDIR"
|
|
|
- StrLen $INSTDIR_TEST_LENGHT "$INSTDIR_TEST"
|
|
|
-
|
|
|
- ${If} $INSTDIR_TEST_LENGHT < $INSTDIR_LENGHT
|
|
|
- MessageBox MB_OK|MB_ICONEXCLAMATION "$MESSAGE_CHKINST_"
|
|
|
- ${EndIf}
|
|
|
-
|
|
|
-FunctionEnd
|
|
|
+;Function CheckInstDir
|
|
|
+; Var /GLOBAL INSTDIR_TEST
|
|
|
+; Var /GLOBAL INSTDIR_LENGHT
|
|
|
+; Var /GLOBAL INSTDIR_TEST_LENGHT
|
|
|
+; Var /GLOBAL MESSAGE_CHKINST_
|
|
|
+;
|
|
|
+; StrCpy $MESSAGE_CHKINST_ "WARNING: you are about to install GRASS into a directory that has spaces$\r$\n"
|
|
|
+; StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_in either its name or the path of directories leading up to it.$\r$\n"
|
|
|
+; StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_Some functionalities of GRASS might be hampered by this. We would highly$\r$\n"
|
|
|
+; StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_appreciate if you tried and reported any problems, so that we can fix them.$\r$\n"
|
|
|
+; StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_However, if you want to avoid any such issues, we recommend that you$\r$\n"
|
|
|
+; StrCpy $MESSAGE_CHKINST_ "$MESSAGE_CHKINST_choose a simple installation path without spaces, such as: C:\${GRASS_BASE}.$\r$\n"
|
|
|
+;
|
|
|
+; ${StrReplace} "$INSTDIR_TEST" " " "" "$INSTDIR"
|
|
|
+;
|
|
|
+; StrLen $INSTDIR_LENGHT "$INSTDIR"
|
|
|
+; StrLen $INSTDIR_TEST_LENGHT "$INSTDIR_TEST"
|
|
|
+;
|
|
|
+; ${If} $INSTDIR_TEST_LENGHT < $INSTDIR_LENGHT
|
|
|
+; MessageBox MB_OK|MB_ICONEXCLAMATION "$MESSAGE_CHKINST_"
|
|
|
+; ${EndIf}
|
|
|
+;
|
|
|
+;FunctionEnd
|
|
|
|
|
|
;----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -371,7 +338,7 @@ FunctionEnd
|
|
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE CheckUpdate
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
|
|
-Page custom CheckInstDir
|
|
|
+;Page custom CheckInstDir
|
|
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
@@ -513,7 +480,7 @@ Section "GRASS" SecGRASS
|
|
|
"$INSTALL_DIR\icons\GRASS_MSys.ico" "" SW_SHOWNORMAL "" "Launch GRASS ${VERSION_NUMBER} with the new wxPython GUI and a MSYS UNIX terminal"
|
|
|
|
|
|
; FIXME: ship the WinGrass release notes .html file instead of URL
|
|
|
-; http://trac.osgeo.org/grass/browser/grass-web/trunk/grass64/binary/mswindows/native/README.html?format=raw
|
|
|
+; http://trac.osgeo.org/grass/browser/grass-web/trunk/grass70/binary/mswindows/native/README.html?format=raw
|
|
|
; probably ship with devel versions too? ie Release Notes, not the Release Announcement press release.
|
|
|
!if ${INSTALLER_TYPE} == "Release"
|
|
|
CreateShortCut "$SMPROGRAMS\${GRASS_BASE}\Release Notes.lnk" "$INSTALL_DIR\WinGRASS-README.url" ""\
|
|
@@ -544,7 +511,7 @@ Section "GRASS" SecGRASS
|
|
|
FileWrite $0 'rem Set GRASS Installation Directory Variable$\r$\n'
|
|
|
FileWrite $0 'set GRASSDIR=$INSTALL_DIR$\r$\n'
|
|
|
FileWrite $0 '$\r$\n'
|
|
|
- FileWrite $0 'rem Directory where your .grass7\rc file will be stored$\r$\n'
|
|
|
+ FileWrite $0 'rem Directory where your .grass7/rc file will be stored$\r$\n'
|
|
|
FileWrite $0 'set HOME=%USERPROFILE%$\r$\n'
|
|
|
FileWrite $0 '$\r$\n'
|
|
|
FileWrite $0 'rem Name of the wish (Tk) executable$\r$\n'
|
|
@@ -705,7 +672,6 @@ Section "GRASS" SecGRASS
|
|
|
;replace \ with / in $GIS_DATABASE
|
|
|
${StrReplace} "$UNIX_LIKE_GIS_DATABASE_PATH" "\" "/" "$GIS_DATABASE"
|
|
|
|
|
|
- ;create $PROFILE\.grass7
|
|
|
;create $PROFILE\.grass7\rc
|
|
|
SetShellVarContext current
|
|
|
ClearErrors
|
|
@@ -860,7 +826,7 @@ Section "Uninstall"
|
|
|
|
|
|
;remove the .grass7\rc file
|
|
|
SetShellVarContext current
|
|
|
- RMDir \r "$PROFILE\.grass7"
|
|
|
+ Delete "$PROFILE\.grass7\rc"
|
|
|
|
|
|
;remove the Registry Entries
|
|
|
DeleteRegKey HKLM "Software\${GRASS_BASE}"
|