Explorar o código

wingrass: change instalation target, see https://trac.osgeo.org/grass/ticket/3732

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74027 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=6) %!d(string=hai) anos
pai
achega
9e5341b169

+ 1 - 1
mswindows/GRASS-Packager.bat.tmpl

@@ -23,7 +23,7 @@ set OSGEO4W_PKG_DIR=C:\OSGeo4W%1
 
 
 set MSYS_BLD_DIR=C:\msys%1\mingw%1
 set MSYS_BLD_DIR=C:\msys%1\mingw%1
 
 
-set GRASS_PREFIX=%OSGEO4W_BLD_DIR%\apps\grass\grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+set GRASS_PREFIX=%OSGEO4W_BLD_DIR%\apps\grass\grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
 
 
 @echo.
 @echo.
 @echo -----------------------------------------------------------------------------------------------------------------------
 @echo -----------------------------------------------------------------------------------------------------------------------

+ 0 - 1
mswindows/Makefile

@@ -17,7 +17,6 @@ GRASS-Packager.bat: GRASS-Packager.bat.tmpl
 	sed \
 	sed \
 	-e 's#@GRASS_VERSION_MAJOR@#$(GRASS_VERSION_MAJOR)#' \
 	-e 's#@GRASS_VERSION_MAJOR@#$(GRASS_VERSION_MAJOR)#' \
 	-e 's#@GRASS_VERSION_MINOR@#$(GRASS_VERSION_MINOR)#' \
 	-e 's#@GRASS_VERSION_MINOR@#$(GRASS_VERSION_MINOR)#' \
-	-e 's#@GRASS_VERSION_RELEASE@#$(GRASS_VERSION_RELEASE)#' \
 	$< > $@
 	$< > $@
 
 
 GRASS-Installer.nsi: GRASS-Installer.nsi.tmpl
 GRASS-Installer.nsi: GRASS-Installer.nsi.tmpl

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

@@ -2,7 +2,7 @@ REM
 REM Environmental variables for GRASS OSGeo4W installer
 REM Environmental variables for GRASS OSGeo4W installer
 REM
 REM
 
 
-set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@
+set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@
 
 
 REM Uncomment if you want to use Bash instead of Cmd
 REM Uncomment if you want to use Bash instead of Cmd
 REM Note that msys package must be also installed
 REM Note that msys package must be also installed

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

@@ -12,7 +12,7 @@ call "%~dp0\o4w_env.bat"
 call py3_env.bat
 call py3_env.bat
 @echo off
 @echo off
 
 
-call %OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\etc\env.bat
+call %OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@\etc\env.bat
 
 
 rem
 rem
 rem Launch GRASS GIS
 rem Launch GRASS GIS

+ 17 - 17
mswindows/osgeo4w/package.sh

@@ -91,7 +91,8 @@ read MAJOR <&3
 read MINOR <&3 
 read MINOR <&3 
 read PATCH <&3 
 read PATCH <&3 
 
 
-export VERSION=$MAJOR.$MINOR.$PATCH
+export VERSION=${MAJOR}.${MINOR}.${PATCH}
+export POSTFIX=${MAJOR}${MINOR}
 
 
 if [[ "$PATCH" == *svn* ]] ; then
 if [[ "$PATCH" == *svn* ]] ; then
     GRASS_EXECUTABLE=grass${MAJOR}${MINOR}svn
     GRASS_EXECUTABLE=grass${MAJOR}${MINOR}svn
@@ -214,25 +215,25 @@ log cleanup
 rm -f diib*
 rm -f diib*
 
 
 log prepare packaging
 log prepare packaging
-mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h \
-    $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
+mv $OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/include/grass/config.h \
+   $OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/include/grass/config.h.mingw
+cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/include/grass/config.h
+cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/include/grass
 mkdir -p $OSGEO4W_ROOT_MSYS/etc/preremove $OSGEO4W_ROOT_MSYS/etc/postinstall
 mkdir -p $OSGEO4W_ROOT_MSYS/etc/preremove $OSGEO4W_ROOT_MSYS/etc/postinstall
-sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT@#$OSGEO4W_ROOT#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+sed -e "s#@POSTFIX@#$POSTFIX#g" \
     mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/${GRASS_EXECUTABLE}.bat
     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#g" \
-    mswindows/osgeo4w/env.bat.tmpl >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/env.bat
-sed -e "s#@VERSION@#$VERSION#g" -e "s#@GRASS_EXECUTABLE@#$GRASS_EXECUTABLE#g" \
+sed -e "s#@POSTFIX@#$POSTFIX#g" \
+    mswindows/osgeo4w/env.bat.tmpl >$OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/etc/env.bat
+sed -e "s#@POSTFIX@#$POSTFIX#g" -e "s#@VERSION@#$VERSION#g" -e "s#@GRASS_EXECUTABLE@#$GRASS_EXECUTABLE#g" \
     mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass${PACKAGE_POSTFIX}.bat
     mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass${PACKAGE_POSTFIX}.bat
-sed -e "s#@VERSION@#$VERSION#g" -e "s#@GRASS_EXECUTABLE@#$GRASS_EXECUTABLE#g" \
+sed -e "s#@POSTFIX@#$POSTFIX#g" -e "s#@VERSION@#$VERSION#g" -e "s#@GRASS_EXECUTABLE@#$GRASS_EXECUTABLE#g" \
     mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass${PACKAGE_POSTFIX}.bat 
     mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass${PACKAGE_POSTFIX}.bat 
 
 
 if [ -n "$PACKAGE_PATCH" ]; then
 if [ -n "$PACKAGE_PATCH" ]; then
     log building vc libraries 
     log building vc libraries 
     OSGEO4W_POSTFIX=$OSGEO4W_POSTFIX sh \
     OSGEO4W_POSTFIX=$OSGEO4W_POSTFIX sh \
-        mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.$VERSION.dll 
-    mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib
+        mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/lib/*.$VERSION.dll 
+    mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass$POSTFIX/lib
     
     
     log creating package
     log creating package
     mkdir -p mswindows/osgeo4w/package
     mkdir -p mswindows/osgeo4w/package
@@ -242,8 +243,7 @@ if [ -n "$PACKAGE_PATCH" ]; then
     cd $OSGEO4W_ROOT_MSYS 
     cd $OSGEO4W_ROOT_MSYS 
 
 
     # update startup script
     # update startup script
-    sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT@#$OSGEO4W_ROOT#g" \
-	-e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+    sed -e "s#@POSTFIX@#$POSTFIX#g" \
 	$SRC/mswindows/osgeo4w/grass.bat.tmpl > bin/${GRASS_EXECUTABLE}.bat.tmpl
 	$SRC/mswindows/osgeo4w/grass.bat.tmpl > bin/${GRASS_EXECUTABLE}.bat.tmpl
     
     
     # bat files - unix2dos
     # bat files - unix2dos
@@ -272,13 +272,13 @@ if [ -n "$PACKAGE_PATCH" ]; then
 	/mingw${MINGW_POSTFIX}/bin/libtre-5.dll \
 	/mingw${MINGW_POSTFIX}/bin/libtre-5.dll \
         /mingw${MINGW_POSTFIX}/bin/zlib1.dll \
         /mingw${MINGW_POSTFIX}/bin/zlib1.dll \
         /mingw${MINGW_POSTFIX}/bin/libstdc++-6.dll \
         /mingw${MINGW_POSTFIX}/bin/libstdc++-6.dll \
-	apps/grass/grass-$VERSION/bin
+	apps/grass/grass$POSTFIX/bin
     cp -uv /mingw${MINGW_POSTFIX}/etc/fonts/fonts.conf \
     cp -uv /mingw${MINGW_POSTFIX}/etc/fonts/fonts.conf \
-	apps/grass/grass-$VERSION/etc
+	apps/grass/grass$POSTFIX/etc
     
     
     # creating grass package
     # creating grass package
     tar -cjf $PDIR/grass$PACKAGE_POSTFIX-$VERSION-$PACKAGE_PATCH.tar.bz2 \
     tar -cjf $PDIR/grass$PACKAGE_POSTFIX-$VERSION-$PACKAGE_PATCH.tar.bz2 \
-	apps/grass/grass-$VERSION \
+	apps/grass/grass$POSTFIX \
 	bin/${GRASS_EXECUTABLE}.bat.tmpl \
 	bin/${GRASS_EXECUTABLE}.bat.tmpl \
 	etc/postinstall/grass${PACKAGE_POSTFIX}.bat \
 	etc/postinstall/grass${PACKAGE_POSTFIX}.bat \
 	etc/preremove/grass${PACKAGE_POSTFIX}.bat
 	etc/preremove/grass${PACKAGE_POSTFIX}.bat

+ 3 - 3
mswindows/osgeo4w/postinstall.bat

@@ -1,7 +1,7 @@
-set ICON=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\gui\icons\grass_osgeo.ico
+set ICON=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@\gui\icons\grass_osgeo.ico
 set BATCH=%OSGEO4W_ROOT%\bin\@GRASS_EXECUTABLE@.bat
 set BATCH=%OSGEO4W_ROOT%\bin\@GRASS_EXECUTABLE@.bat
 textreplace -std -t "%BATCH%"
 textreplace -std -t "%BATCH%"
-textreplace -std -t "%OSGEO4W_ROOT%"\apps\grass\grass-@VERSION@\etc\fontcap
+textreplace -std -t "%OSGEO4W_ROOT%"\apps\grass\grass-@POSTFIX@\etc\fontcap
 
 
 xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@.lnk"       "%BATCH%"  "--gui" \ "Launch GRASS GIS @VERSION@" 1 "%ICON%" 
 xxmklink "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@.lnk"       "%BATCH%"  "--gui" \ "Launch GRASS GIS @VERSION@" 1 "%ICON%" 
 xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@.lnk" "%BATCH%"  "--gui" \ "Launch GRASS GIS @VERSION@" 1 "%ICON%" 
 xxmklink "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@.lnk" "%BATCH%"  "--gui" \ "Launch GRASS GIS @VERSION@" 1 "%ICON%" 
@@ -10,7 +10,7 @@ rem run g.mkfontcap outside a GRASS session during
 rem an OSGeo4W installation for updating paths to fonts
 rem an OSGeo4W installation for updating paths to fonts
 
 
 rem set gisbase
 rem set gisbase
-set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@
+set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@
 
 
 rem set path to freetype dll and its dependencies
 rem set path to freetype dll and its dependencies
 set FREETYPEBASE=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\msys\bin;%GISBASE%\lib
 set FREETYPEBASE=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\msys\bin;%GISBASE%\lib

+ 1 - 1
mswindows/osgeo4w/preremove.bat

@@ -2,4 +2,4 @@ del "%OSGEO4W_STARTMENU%\GRASS GIS @VERSION@.lnk"
 del "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@.lnk"
 del "%ALLUSERSPROFILE%\Desktop\GRASS GIS @VERSION@.lnk"
 
 
 del "%OSGEO4W_ROOT%\bin\@GRASS_EXECUTABLE@.bat"
 del "%OSGEO4W_ROOT%\bin\@GRASS_EXECUTABLE@.bat"
-del "%OSGEO4W_ROOT%"\apps\grass\grass-@VERSION@\etc\fontcap
+del "%OSGEO4W_ROOT%"\apps\grass\grass@POSTFIX@\etc\fontcap