Bläddra i källkod

wingrass: fix 'grass.bat' to accept arguments, recover 'grass' script

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46133 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 år sedan
förälder
incheckning
bd56669f91
3 ändrade filer med 17 tillägg och 12 borttagningar
  1. 1 1
      mswindows/osgeo4w/grass.bat.tmpl
  2. 14 11
      mswindows/osgeo4w/grass.tmpl
  3. 2 0
      mswindows/osgeo4w/package.sh

+ 1 - 1
mswindows/osgeo4w/grass.bat.tmpl

@@ -2,4 +2,4 @@
 SET OSGEO4W_ROOT=@osgeo4w@
 call %OSGEO4W_ROOT%\bin\o4w_env.bat
 call %OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\etc\env.bat
-call %GRASS_PYTHON% %OSGEO4W_ROOT%\bin\grass@POSTFIX@.py
+%GRASS_PYTHON% %OSGEO4W_ROOT%\bin\grass@POSTFIX@.py %*

+ 14 - 11
mswindows/osgeo4w/grass.tmpl

@@ -1,15 +1,18 @@
 #!/bin/sh
 
-export GISBASE=@OSGEO4W_ROOT_MSYS@/apps/grass/grass-@VERSION@
-export WINGISBASE=@OSGEO4W_ROOT_MSYS@/apps/grass/grass-@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-@VERSION@/bin:$PATH
-
-$GRASS_PYTHON @OSGEO4W_ROOT_MSYS@/bin/grass@POSTFIX@.py
+OSGEO4W_ROOT_MSYS=@OSGEO4W_ROOT_MSYS@
+GISBASE=$OSGEO4W_ROOT_MSYS/apps/grass/grass-@VERSION@
+WINGISBASE=$OSGEO4W_ROOT_MSYS/apps/grass/grass-@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-@VERSION@/bin:$PATH
+
+export $OSGEO4W_ROOT_MSYS $GISBASE $WINGISBASE $GRASS_SH $GRASS_WISH $GRASS_PYTHON $PYTHONHOME $GRASS_PROJSHARE
+export $PATH
+
+$GRASS_PYTHON "$OSGEO4W_ROOT_MSYS/bin/grass@POSTFIX@.py" "$@"
 
 exit 0

+ 2 - 0
mswindows/osgeo4w/package.sh

@@ -136,6 +136,8 @@ cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSIO
 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" \