浏览代码

wingrass: define osgeo4w dir postfix

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53615 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
81213d02aa
共有 3 个文件被更改,包括 13 次插入7 次删除
  1. 6 6
      mswindows/GRASS-Installer.nsi.tmpl
  2. 1 1
      mswindows/GRASS-Packager.bat.tmpl
  3. 6 0
      mswindows/Makefile

+ 6 - 6
mswindows/GRASS-Installer.nsi.tmpl

@@ -10,11 +10,11 @@
 
 ;Define the source path of the demolocation files
 
-!define DEMOLOCATION_PATH "c:\osgeo4w\usr\src\grass_trunk\demolocation"
+!define DEMOLOCATION_PATH "c:\OSGeo4W@OSGEO4W_DIR_POSTFIX@\usr\src\grass_trunk\demolocation"
 
 ;Define the source of the patched msys.bat
 
-!define MSYS_BATCH "C:\OSGeo4W\usr\src\grass_trunk\mswindows\osgeo4w\msys.bat"
+!define MSYS_BATCH "C:\OSGeo4W@OSGEO4W_DIR_POSTFIX@\usr\src\grass_trunk\mswindows\osgeo4w\msys.bat"
 
 ;Select if you are building a "Development Version" (Devel) or a "Release Version" (Release) of the GRASS Installer
 
@@ -874,15 +874,15 @@ Section "GRASS" SecGRASS
 	      done_create_grass_rc:
 	${EndIf}
 
-	;replace gisbase = "/c/OSGeo4W/apps/grass/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@" in grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@.py with $INSTDIR
+	;replace gisbase
 	Push "$INSTDIR\etc\grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@.py" ; file to modify
-	Push 'gisbase = "/c/OSGeo4W/apps/grass/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@"' ; string that a line must begin with *WS Sensitive*
+	Push 'gisbase = "/c/OSGeo4W@OSGEO4W_DIR_POSTFIX@/apps/grass/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@"' ; string that a line must begin with *WS Sensitive*
 	Push 'gisbase = "$INSTDIR"' ; string to replace whole line with
 	Call ReplaceLineStr
 	
-	;replace config_projshare = "/c/OSGeo4W/share/proj" i n grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@.py with $INSTDIR\proj
+	;replace config_projshare
 	Push "$INSTDIR\etc\grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@.py" ; file to modify
-	Push 'config_projshare = "/c/OSGeo4W/share/proj"' ; string that a line must begin with *WS Sensitive*
+	Push 'config_projshare = "/c/OSGeo4W@OSGEO4W_DIR_POSTFIX@/share/proj"' ; string that a line must begin with *WS Sensitive*
 	Push 'config_projshare = "$INSTDIR\proj"' ; string to replace whole line with
 	Call ReplaceLineStr
                  

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

@@ -14,7 +14,7 @@ rem ----------------------------------------------------------------------------
 
 set PACKAGE_DIR=.\GRASS-@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@-Package
 
-set OSGEO4W_DIR=c:\osgeo4w
+set OSGEO4W_DIR=c:\OSGeo4W@OSGEO4W_DIR_POSTFIX@
 
 set GRASS_PREFIX=%OSGEO4W_DIR%\apps\grass\grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
 set GRASS_BIN_PREFIX=%OSGEO4W_DIR%\bin

+ 6 - 0
mswindows/Makefile

@@ -4,6 +4,10 @@ include $(MODULE_TOPDIR)/include/Make/Other.make
 
 EXTRA_CLEAN_FILES = GRASS-Packager.bat GRASS-Installer.nsi
 
+# OSGeo4W directory postfix, separate OSGeo4W installations are used
+# for building GRASS 6.x and 7.x
+OSGEO4W_DIR_POSTFIX = '_g7'
+
 ifneq ($(MINGW),)
 default: GRASS-Packager.bat GRASS-Installer.nsi
 endif	
@@ -13,6 +17,7 @@ GRASS-Packager.bat: GRASS-Packager.bat.tmpl
 	-e 's#@GRASS_VERSION_MAJOR@#$(GRASS_VERSION_MAJOR)#' \
 	-e 's#@GRASS_VERSION_MINOR@#$(GRASS_VERSION_MINOR)#' \
 	-e 's#@GRASS_VERSION_RELEASE@#$(GRASS_VERSION_RELEASE)#' \
+	-e 's#@OSGEO4W_DIR_POSTFIX@#$(OSGEO4W_DIR_POSTFIX)#' \
 	$< > $@
 
 GRASS-Installer.nsi: GRASS-Installer.nsi.tmpl
@@ -21,4 +26,5 @@ GRASS-Installer.nsi: GRASS-Installer.nsi.tmpl
 	-e 's#@GRASS_VERSION_MAJOR@#$(GRASS_VERSION_MAJOR)#' \
 	-e 's#@GRASS_VERSION_MINOR@#$(GRASS_VERSION_MINOR)#' \
 	-e 's#@GRASS_VERSION_RELEASE@#$(GRASS_VERSION_RELEASE)#' \
+	-e 's#@OSGEO4W_DIR_POSTFIX@#$(OSGEO4W_DIR_POSTFIX)#' \
 	$< > $@