[GRASS-SVN] r46133 - grass/trunk/mswindows/osgeo4w

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 28 13:15:25 EDT 2011


Author: martinl
Date: 2011-04-28 10:15:25 -0700 (Thu, 28 Apr 2011)
New Revision: 46133

Modified:
   grass/trunk/mswindows/osgeo4w/grass.bat.tmpl
   grass/trunk/mswindows/osgeo4w/grass.tmpl
   grass/trunk/mswindows/osgeo4w/package.sh
Log:
wingrass: fix 'grass.bat' to accept arguments, recover 'grass' script

Modified: grass/trunk/mswindows/osgeo4w/grass.bat.tmpl
===================================================================
--- grass/trunk/mswindows/osgeo4w/grass.bat.tmpl	2011-04-28 16:22:18 UTC (rev 46132)
+++ grass/trunk/mswindows/osgeo4w/grass.bat.tmpl	2011-04-28 17:15:25 UTC (rev 46133)
@@ -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
-call %GRASS_PYTHON% %OSGEO4W_ROOT%\bin\grass at POSTFIX@.py
+%GRASS_PYTHON% %OSGEO4W_ROOT%\bin\grass at POSTFIX@.py %*

Modified: grass/trunk/mswindows/osgeo4w/grass.tmpl
===================================================================
--- grass/trunk/mswindows/osgeo4w/grass.tmpl	2011-04-28 16:22:18 UTC (rev 46132)
+++ grass/trunk/mswindows/osgeo4w/grass.tmpl	2011-04-28 17:15:25 UTC (rev 46133)
@@ -1,15 +1,18 @@
 #!/bin/sh
 
-export GISBASE=@OSGEO4W_ROOT_MSYS@/apps/grass/grass- at VERSION@
-export WINGISBASE=@OSGEO4W_ROOT_MSYS@/apps/grass/grass- at VERSION@
-export GRASS_SH=@OSGEO4W_ROOT_MSYS@/apps/msys/bin/sh.exe
-export GRASS_WISH=@OSGEO4W_ROOT_MSYS@/bin/wish.exe
-export GRASS_PYTHON=@OSGEO4W_ROOT_MSYS@/bin/python.exe
-export PYTHONHOME=@OSGEO4W_ROOT_MSYS@/apps/Python25
-export GRASS_PROJSHARE=@OSGEO4W_ROOT_MSYS@/share/proj
-export GRASS_GUI=wxpython
-export PATH=@OSGEO4W_ROOT_MSYS@/apps/grass/grass- at VERSION@/bin:$PATH
+OSGEO4W_ROOT_MSYS=@OSGEO4W_ROOT_MSYS@
+GISBASE=$OSGEO4W_ROOT_MSYS/apps/grass/grass- at VERSION@
+WINGISBASE=$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
 
-$GRASS_PYTHON @OSGEO4W_ROOT_MSYS@/bin/grass at POSTFIX@.py
+export $OSGEO4W_ROOT_MSYS $GISBASE $WINGISBASE $GRASS_SH $GRASS_WISH $GRASS_PYTHON $PYTHONHOME $GRASS_PROJSHARE
+export $PATH
 
+$GRASS_PYTHON "$OSGEO4W_ROOT_MSYS/bin/grass at POSTFIX@.py" "$@"
+
 exit 0

Modified: grass/trunk/mswindows/osgeo4w/package.sh
===================================================================
--- grass/trunk/mswindows/osgeo4w/package.sh	2011-04-28 16:22:18 UTC (rev 46132)
+++ grass/trunk/mswindows/osgeo4w/package.sh	2011-04-28 17:15:25 UTC (rev 46133)
@@ -136,6 +136,8 @@
 cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass
 sed -e "s#@VERSION@#$VERSION#g" -e "s#@osgeo4w@#$OSGEO4W_ROOT#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
     mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.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$MAJOR$MINOR
 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" \



More information about the grass-commit mailing list