[GRASS-SVN] r49296 - in grass/branches/develbranch_6/mswindows: . osgeo4w

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 19 07:24:55 EST 2011


Author: martinl
Date: 2011-11-19 04:24:55 -0800 (Sat, 19 Nov 2011)
New Revision: 49296

Modified:
   grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi
   grass/branches/develbranch_6/mswindows/GRASS-Packager.bat
   grass/branches/develbranch_6/mswindows/osgeo4w/env.bat.tmpl
   grass/branches/develbranch_6/mswindows/osgeo4w/grass.bat.tmpl
   grass/branches/develbranch_6/mswindows/osgeo4w/grass.tmpl
   grass/branches/develbranch_6/mswindows/osgeo4w/package.sh
   grass/branches/develbranch_6/mswindows/osgeo4w/postinstall.bat
   grass/branches/develbranch_6/mswindows/osgeo4w/preremove.bat
Log:
winGRASS: update instalation scripts


Modified: grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi
===================================================================
--- grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi	2011-11-19 12:24:55 UTC (rev 49296)
@@ -31,18 +31,18 @@
 
 ;Version variables
 
-!define RELEASE_VERSION_NUMBER "6.5.0"
-!define RELEASE_SVN_REVISION "365995"
-!define RELEASE_BINARY_REVISION "1"
-!define RELEASE_GRASS_COMMAND "grass65"
-!define RELEASE_GRASS_BASE "GRASS 6.5"
+!define SVN_REVISION "36599"
+!define BINARY_REVISION "1"
+!if ${INSTALLER_TYPE} == "Release"
+	!define VERSION_NUMBER "6.5.0"
+	!define GRASS_COMMAND "grass65"
+	!define GRASS_BASE "GRASS 6.5"
+!else
+	!define VERSION_NUMBER "6.5.SVN"
+	!define GRASS_COMMAND "grass65svn"
+	!define GRASS_BASE "GRASS 6.5.SVN"
+!endif
 
-!define DEVEL_VERSION_NUMBER "6.5.SVN"
-!define DEVEL_SVN_REVISION "36599"
-!define DEVEL_BINARY_REVISION "1"
-!define DEVEL_GRASS_COMMAND "grass65svn"
-!define DEVEL_GRASS_BASE "GRASS 6.5.SVN"
-
 ;----------------------------------------------------------------------------------------------------------------------------
 
 ;Don't modify the following lines
@@ -58,26 +58,15 @@
 
 ;Set the installer variables, depending on the selected version to build
 
+!define PACKAGE_FOLDER ".\GRASS-65-Package"
 !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-65-Release-Package"
-!else if ${INSTALLER_TYPE} == "Devel"
-	!define VERSION_NUMBER "${DEVEL_VERSION_NUMBER}"
-	!define SVN_REVISION "${DEVEL_SVN_REVISION}"
-	!define BINARY_REVISION "${DEVEL_BINARY_REVISION}"
-	!define GRASS_COMMAND "${DEVEL_GRASS_COMMAND}"
-	!define GRASS_BASE "${DEVEL_GRASS_BASE}"
+	!define CHECK_INSTALL_NAME "GRASS 65"
+!else
 	!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 65 SVN"
-	!define PACKAGE_FOLDER ".\GRASS-65-Devel-Package"
 !endif
 
 ;----------------------------------------------------------------------------------------------------------------------------
@@ -554,7 +543,7 @@
 	
 	;HKEY_LOCAL_MACHINE Install entries
 	;Set the Name, Version and Revision of GRASS + PublisherInfo + InstallPath	
-	WriteRegStr HKLM "Software\${GRASS_BASE}" "Name" "GRASS"
+	WriteRegStr HKLM "Software\${GRASS_BASE}" "Name" "GRASS 6.5"
 	WriteRegStr HKLM "Software\${GRASS_BASE}" "VersionNumber" "${VERSION_NUMBER}"
 	WriteRegStr HKLM "Software\${GRASS_BASE}" "SvnRevision" "${SVN_REVISION}"
 	WriteRegStr HKLM "Software\${GRASS_BASE}" "BinaryRevision" "${BINARY_REVISION}"
@@ -563,7 +552,7 @@
 	WriteRegStr HKLM "Software\${GRASS_BASE}" "InstallPath" "$INSTALL_DIR"
 	
 	;HKEY_LOCAL_MACHINE Uninstall entries
-	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "DisplayName" "GRASS"
+	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "DisplayName" "GRASS 6.5"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "UninstallString" "$INSTALL_DIR\Uninstall-GRASS.exe"
 	
 	!if ${INSTALLER_TYPE} == "Release"

Modified: grass/branches/develbranch_6/mswindows/GRASS-Packager.bat
===================================================================
--- grass/branches/develbranch_6/mswindows/GRASS-Packager.bat	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/GRASS-Packager.bat	2011-11-19 12:24:55 UTC (rev 49296)
@@ -12,7 +12,7 @@
 rem Set the script variables
 rem --------------------------------------------------------------------------------------------------------------------------
 
-set PACKAGE_DIR=.\GRASS-65-Devel-Package
+set PACKAGE_DIR=.\GRASS-65-Package
 
 set OSGEO4W_DIR=c:\osgeo4w
 

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/env.bat.tmpl
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/env.bat.tmpl	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/env.bat.tmpl	2011-11-19 12:24:55 UTC (rev 49296)
@@ -1,5 +1,4 @@
 set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
-set WINGISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
 set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
 set GRASS_WISH=%OSGEO4W_ROOT%\bin\wish.exe
 set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/grass.bat.tmpl
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/grass.bat.tmpl	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/grass.bat.tmpl	2011-11-19 12:24:55 UTC (rev 49296)
@@ -2,4 +2,4 @@
 SET OSGEO4W_ROOT=@osgeo4w@
 call %OSGEO4W_ROOT%\bin\o4w_env.bat
 call %OSGEO4W_ROOT%\apps\grass\grass- at VERSION@\etc\env.bat
-"%WINGISBASE%"\etc\init.bat %*
+"%GISBASE%"\etc\init.bat %*

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/grass.tmpl
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/grass.tmpl	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/grass.tmpl	2011-11-19 12:24:55 UTC (rev 49296)
@@ -1,25 +1,17 @@
-#! /bin/sh
-#############################################################################
-#
-# MODULE:   	GRASS Initialization
-# AUTHOR(S):	Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
-# PURPOSE:  	The source file for this shell script is in
-#   	    	lib/init/grass.src and is the grass startup script. It
-#   	    	requires a source file because the definition of GISBASE
-#   	    	is not known until compile time and is substituted from the
-#   	    	Makefile. Any command line options are passed to Init.sh.
-# COPYRIGHT:    (C) 2000-2005, 2011 by the GRASS Development Team
-#
-#               This program is free software under the GNU General Public
-#   	    	License (>=v2). Read the file COPYING that comes with GRASS
-#   	    	for details.
-#
-#############################################################################
+#!/bin/sh
 
-trap "echo 'User break!' ; exit" 2 3 9 15
+OSGEO4W_ROOT_MSYS=@OSGEO4W_ROOT_MSYS@
+GISBASE=$OSGEO4W_ROOT_MSYS/apps/grass/grass- at VERSION@
+GRASS_SH=$OSGEO4W_ROOT_MSYS/apps/msys/bin/sh.exe
+GRASS_WISH=$OSGEO4W_ROOT_MSYS/bin/wish.exe
+GRASS_PYTHON=$OSGEO4W_ROOT_MSYS/bin/python.exe
+PYTHONHOME=$OSGEO4W_ROOT_MSYS/apps/Python25
+GRASS_PROJSHARE=$OSGEO4W_ROOT_MSYS/share/proj
+PATH=$OSGEO4W_ROOT_MSYS/apps/grass/grass- at VERSION@/bin:$PATH
 
-# Set the GISBASE variable
-GISBASE="@osgeo4w@/apps/grass/grass- at VERSION@"
-export GISBASE
+export $OSGEO4W_ROOT_MSYS $GISBASE $GRASS_SH $GRASS_WISH $GRASS_PYTHON $PYTHONHOME $GRASS_PROJSHARE
+export $PATH
 
 exec "$GISBASE/etc/Init.sh" "$@"
+
+exit 0

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/package.sh
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/package.sh	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/package.sh	2011-11-19 12:24:55 UTC (rev 49296)
@@ -67,6 +67,12 @@
 
 export VERSION=$MAJOR.$MINOR.$PATCH
 
+if [ "$PATCH" == "svn" ]; then
+    GRASS_EXECUTABLE=grass${MAJOR}${MINOR}svn
+else
+    GRASS_EXECUTABLE=grass${MAJOR}${MINOR}
+fi
+
 export GRASS_PYTHON="/c/OSGeo4W/bin/python.exe"
 export PYTHONHOME="/c/OSGeo4W/apps/Python25"
 
@@ -128,7 +134,7 @@
 fi
 
 log make 
-make -k || ( cat error.log >&3 && false ) 
+# make -k || ( cat error.log >&3 && false ) 
 
 log make install
 make install
@@ -138,14 +144,16 @@
     $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
 cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h
 cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass
-sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT@#$OSGEO4W_ROOT#g" \
-    mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.bat
+sed -e "s#@VERSION@#$VERSION#g" \
+    mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/${GRASS_EXECUTABLE}.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT_MSYS@#$OSGEO4W_ROOT_MSYS#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+    mswindows/osgeo4w/grass.tmpl >$OSGEO4W_ROOT_MSYS/bin/${GRASS_EXECUTABLE}
 sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT_MSYS@#$OSGEO4W_ROOT#g" \
     mswindows/osgeo4w/env.bat.tmpl >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/env.bat
-sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
-    mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$MAJOR$MINOR.bat 
-sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
-    mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$MAJOR$MINOR.bat 
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@GRASS_EXECUTABLE@#$GRASS_EXECUTABLE#g" \
+    mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/${GRASS_EXECUTABLE}.bat 
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@GRASS_EXECUTABLE@#$GRASS_EXECUTABLE#g" \
+    mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/${GRASS_EXECUTABLE}.bat 
 
 if [ -f /c/mingw/bin/libgnurx-0.dll ]; then
     cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
@@ -170,23 +178,23 @@
     cd $OSGEO4W_ROOT_MSYS 
 
     sed -e "s#@VERSION@#$VERSION#g" \
-	$SRC/mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.bat.tmpl
+	$SRC/mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/${GRASS_EXECUTABLE}.bat.tmpl
     sed -e "s#@VERSION@#$VERSION#g" \
-	$SRC/mswindows/osgeo4w/grass.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.tmpl
+	$SRC/mswindows/osgeo4w/grass.tmpl >$OSGEO4W_ROOT_MSYS/bin/${GRASS_EXECUTABLE}.tmpl
 
     # grass package
     tar -cjf $PDIR/grass$PACKAGE_NAME-$VERSION-$PACKAGE.tar.bz2 \
-    apps/grass/grass-$VERSION \
-    bin/grass$MAJOR$MINOR.bat.tmpl \
-    bin/grass$MAJOR$MINOR.tmpl \
-    bin/libintl3.dll \
-    bin/libiconv2.dll \
-    bin/regex2.dll \
-    etc/postinstall/grass$MAJOR$MINOR.bat \
-    etc/preremove/grass$MAJOR$MINOR.bat
+	apps/grass/grass-$VERSION \
+	bin/${GRASS_EXECUTABLE}.bat.tmpl \
+	bin/${GRASS_EXECUTABLE}.tmpl \
+	bin/libintl3.dll \
+	bin/libiconv2.dll \
+	bin/regex2.dll \
+	etc/postinstall/${GRASS_EXECUTABLE}.bat \
+	etc/preremove/${GRASS_EXECUTABLE}.bat
     
-    rm bin/grass$MAJOR$MINOR.tmpl
-    rm bin/grass$MAJOR$MINOR.bat.tmpl
+    rm bin/${GRASS_EXECUTABLE}.tmpl
+    rm bin/${GRASS_EXECUTABLE}.bat.tmpl
     
     # grass-devel package (obsolete)
     ###tar -cjf $PDIR/grass-devel-$VERSION-$PACKAGE.tar.bz2 \

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/postinstall.bat
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/postinstall.bat	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/postinstall.bat	2011-11-19 12:24:55 UTC (rev 49296)
@@ -1,7 +1,7 @@
 set ICON=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@\etc\gui\icons\grass.ico
-set BATCH=%OSGEO4W_ROOT%\bin\grass at POSTFIX@.bat
-textreplace -std -t "%OSGEO4W_ROOT%"\bin\grass at POSTFIX@.bat
-textreplace -std -t "%OSGEO4W_ROOT%"\bin\grass at POSTFIX@
+set BATCH=%OSGEO4W_ROOT%\bin\@GRASS_EXECUTABLE at .bat
+textreplace -std -t "%OSGEO4W_ROOT%"\bin\@GRASS_EXECUTABLE at .bat
+textreplace -std -t "%OSGEO4W_ROOT%"\bin\@GRASS_EXECUTABLE@
 textreplace -std -t "%OSGEO4W_ROOT%"\apps\grass\grass- at VERSION@\etc\fontcap
 
 mkdir "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@" 
@@ -11,5 +11,5 @@
 
 xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION at .lnk" "%BATCH%" "-wx" \ "Launch GRASS GIS @VERSION@ with wxGUI" 1 "%ICON%" 
 
-del "%OSGEO4W_ROOT%"\bin\grass at POSTFIX@.bat.tmpl
-del "%OSGEO4W_ROOT%"\bin\grass at POSTFIX@.tmpl
+del "%OSGEO4W_ROOT%"\bin\@GRASS_EXECUTABLE at .bat.tmpl
+del "%OSGEO4W_ROOT%"\bin\@GRASS_EXECUTABLE at .tmpl

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/preremove.bat
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/preremove.bat	2011-11-19 12:21:22 UTC (rev 49295)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/preremove.bat	2011-11-19 12:24:55 UTC (rev 49296)
@@ -5,6 +5,6 @@
 
 del "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION at .lnk"
 
-del "%OSGEO4W_ROOT%"\bin\grass at POSTFIX@.bat
-del "%OSGEO4W_ROOT%"\bin\grass at POSTFIX@  
-del "%OSGEO4W_ROOT%"\apps\grass\grass- at VERSION@\etc\fontcap 
+del "%OSGEO4W_ROOT%"\bin\@GRASS_EXECUTABLE at .bat
+del "%OSGEO4W_ROOT%"\bin\@GRASS_EXECUTABLE@
+del "%OSGEO4W_ROOT%"\apps\grass\grass- at VERSION@\etc\fontcap



More information about the grass-commit mailing list