[GRASS-SVN] r49316 - in grass/branches/releasebranch_6_4/mswindows:
. osgeo4w
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 20 14:24:24 EST 2011
Author: martinl
Date: 2011-11-20 11:24:24 -0800 (Sun, 20 Nov 2011)
New Revision: 49316
Modified:
grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi
grass/branches/releasebranch_6_4/mswindows/GRASS-Packager.bat
grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl
grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl
grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl
grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh
grass/branches/releasebranch_6_4/mswindows/osgeo4w/postinstall.bat
grass/branches/releasebranch_6_4/mswindows/osgeo4w/preremove.bat
Log:
winGRASS: update scripts for packaging
Modified: grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/GRASS-Installer.nsi 2011-11-20 19:24:24 UTC (rev 49316)
@@ -31,18 +31,18 @@
;Version variables
-!define RELEASE_VERSION_NUMBER "6.4.1"
-!define RELEASE_SVN_REVISION "36599"
-!define RELEASE_BINARY_REVISION "1"
-!define RELEASE_GRASS_COMMAND "grass64"
-!define RELEASE_GRASS_BASE "GRASS 6.4"
+!define SVN_REVISION "36599"
+!define BINARY_REVISION "1"
+!if ${INSTALLER_TYPE} == "Release"
+ !define VERSION_NUMBER "6.4.2"
+ !define GRASS_COMMAND "grass64"
+ !define GRASS_BASE "GRASS 6.4"
+!else
+ !define VERSION_NUMBER "6.4.SVN"
+ !define GRASS_COMMAND "grass64svn"
+ !define GRASS_BASE "GRASS 6.4.SVN"
+!endif
-!define DEVEL_VERSION_NUMBER "6.4.SVN"
-!define DEVEL_SVN_REVISION "36599"
-!define DEVEL_BINARY_REVISION "1"
-!define DEVEL_GRASS_COMMAND "grass64svn"
-!define DEVEL_GRASS_BASE "GRASS 6.4.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-64-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-64-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 64"
+!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 64 SVN"
- !define PACKAGE_FOLDER ".\GRASS-64-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.4"
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.4"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GRASS_BASE}" "UninstallString" "$INSTALL_DIR\Uninstall-GRASS.exe"
!if ${INSTALLER_TYPE} == "Release"
@@ -653,7 +642,7 @@
FileWrite $0 '$\r$\n'
FileWrite $0 'cd "%USERPROFILE%"'
FileWrite $0 '$\r$\n'
- FileWrite $0 '"%WINGISBASE%\etc\Init.bat" %*'
+ FileWrite $0 '"%GISBASE%\etc\Init.bat" %*'
FileClose $0
done_create_grass_command.bat:
Modified: grass/branches/releasebranch_6_4/mswindows/GRASS-Packager.bat
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/GRASS-Packager.bat 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/GRASS-Packager.bat 2011-11-20 19:24:24 UTC (rev 49316)
@@ -12,11 +12,10 @@
rem Set the script variables
rem --------------------------------------------------------------------------------------------------------------------------
+set PACKAGE_DIR=.\GRASS-64-Package
+
set OSGEO4W_DIR=c:\osgeo4w
-rem set PACKAGE_DIR=.\GRASS-64-Release-Package
-set PACKAGE_DIR=.\GRASS-64-Devel-Package
-rem set GRASS_PREFIX=%OSGEO4W_DIR%\apps\grass\grass-6.4.2
set GRASS_PREFIX=%OSGEO4W_DIR%\apps\grass\grass-6.4.2svn
set SVN_PATH=c:\Subversion
Modified: grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl 2011-11-20 19:24:24 UTC (rev 49316)
@@ -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/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl 2011-11-20 19:24:24 UTC (rev 49316)
@@ -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/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl 2011-11-20 19:24:24 UTC (rev 49316)
@@ -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/releasebranch_6_4/mswindows/osgeo4w/package.sh
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh 2011-11-20 19:24:24 UTC (rev 49316)
@@ -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"
@@ -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" -e "s#@osgeo4w@#$OSGEO4W_ROOT#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/releasebranch_6_4/mswindows/osgeo4w/postinstall.bat
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/postinstall.bat 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/postinstall.bat 2011-11-20 19:24:24 UTC (rev 49316)
@@ -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/releasebranch_6_4/mswindows/osgeo4w/preremove.bat
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/preremove.bat 2011-11-20 19:12:41 UTC (rev 49315)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/preremove.bat 2011-11-20 19:24:24 UTC (rev 49316)
@@ -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