Bläddra i källkod

wingrass packager updated (needs some testing)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40514 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 år sedan
förälder
incheckning
3ed0f68e2f
2 ändrade filer med 69 tillägg och 117 borttagningar
  1. 46 80
      mswindows/GRASS-Installer.nsi
  2. 23 37
      mswindows/GRASS-Packager.bat

+ 46 - 80
mswindows/GRASS-Installer.nsi

@@ -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}"

+ 23 - 37
mswindows/GRASS-Packager.bat

@@ -1,51 +1,35 @@
+rem -----------------------------------------------------------------------------------------------------------------------
+rem Self Contained GRASS Automated Packager
+rem -----------------------------------------------------------------------------------------------------------------------
+rem Edited by: Marco Pasetti
+rem Revised for OSGeo4W by: Colin Nielsen, Helmut Kudrnovsky, and Martin Landa
+rem Last Update: 17 Jan 2010
+rem -----------------------------------------------------------------------------------------------------------------------
+
 @echo off
 
 rem --------------------------------------------------------------------------------------------------------------------------
 rem Set the script variables
 rem --------------------------------------------------------------------------------------------------------------------------
 
-set GRASS_RELEASE_PACKAGE_DIR=.\GRASS-Release-Package
-set GRASS_6_DEV_PACKAGE_DIR=.\GRASS-6-Dev-Package
-set GRASS_7_DEV_PACKAGE_DIR=.\GRASS-7-Dev-Package
+set GRASS_70_DEV_PACKAGE_DIR=.\GRASS-70-Dev-Package
 
 set OSGEO4W_DIR=c:\osgeo4w
 
-set GRASS_RELEASE_INSTALL_FOLDER=%OSGEO4W_DIR%\apps\grass\grass-6.4.0RC5
-set GRASS_6_DEV_INSTALL_FOLDER=%OSGEO4W_DIR%\apps\grass\grass-6.5.svn
-set GRASS_7_DEV_INSTALL_FOLDER=%OSGEO4W_DIR%\apps\grass\grass-7.0.svn
+set GRASS_70_DEV_INSTALL_DIR=%OSGEO4W_DIR%\apps\grass\grass-7.0.svn
 
-@echo -----------------------------------------------------------------------------------------------------------------------
-@echo Self Contained GRASS Automated Packager
-@echo -----------------------------------------------------------------------------------------------------------------------
-@echo Edited by: Marco Pasetti
-@echo Revised for OSGeo4W by: Colin Nielsen
-@echo Last Update: 10 June 2009
-@echo -----------------------------------------------------------------------------------------------------------------------
-@echo Select the GRASS version to pack:
-@echo.
-@echo 1. Current GRASS Release Version
-@echo.
-@echo 2. Current GRASS-6 Development Version
-@echo.
-@echo 3. Current GRASS-7 Development Version
-@echo.
-
-set /p SELECTION=Enter your selection (1/2/3):
+rem @echo .
+rem @echo Select the GRASS version to pack:
+rem @echo.
+rem @echo 1. Current GRASS-70 Development Version
+rem @echo.
 
-if %SELECTION%==1 (
-set PACKAGE_DIR=%GRASS_RELEASE_PACKAGE_DIR%
-set GRASS_PREFIX=%GRASS_RELEASE_INSTALL_FOLDER%
-)
+rem set /p SELECTION=Enter your selection (1):
 
-if %SELECTION%==2 (
-set PACKAGE_DIR=%GRASS_6_DEV_PACKAGE_DIR%
-set GRASS_PREFIX=%GRASS_6_DEV_INSTALL_FOLDER%
-)
-
-if %SELECTION%==3 (
-set PACKAGE_DIR=%GRASS_7_DEV_PACKAGE_DIR%
-set GRASS_PREFIX=%GRASS_7_DEV_INSTALL_FOLDER%
-)
+rem if %SELECTION%==1 (
+set PACKAGE_DIR=%GRASS_70_DEV_PACKAGE_DIR%
+set GRASS_PREFIX=%GRASS_70_DEV_INSTALL_DIR%
+rem )
 
 @echo.
 @echo -----------------------------------------------------------------------------------------------------------------------
@@ -53,7 +37,7 @@ set GRASS_PREFIX=%GRASS_7_DEV_INSTALL_FOLDER%
 @echo -----------------------------------------------------------------------------------------------------------------------
 @echo.
 
-pause
+rem pause
 
 if exist %PACKAGE_DIR% rmdir /S/Q %PACKAGE_DIR%
 mkdir %PACKAGE_DIR%
@@ -75,6 +59,8 @@ xcopy %GRASS_PREFIX% %PACKAGE_DIR% /S/V/F
 mkdir %PACKAGE_DIR%\extralib
 
 copy %OSGEO4W_DIR%\bin\*.dll %PACKAGE_DIR%\extralib
+del %PACKAGE_DIR%\extralib\libgrass_*6.4*.dll
+del %PACKAGE_DIR%\extralib\libgrass_*6.5*.dll
 rem copy %OSGEO4W_DIR%\pgsql\lib\libpq.dll %PACKAGE_DIR%\extralib
 
 @echo.