@@ -49,7 +49,7 @@ if "%ARCH%"=="x86" goto devenv_x86
4949goto devenv_x86_64
5050
5151:devenv_x86
52- set GRASS_VERSION = 6.4.4
52+ set GRASS_VERSIONS = 6.4.4 7.0.0
5353call " %PF86% \Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
5454if exist " c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" call " c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /x86 /Release
5555path %path% ;%PF86% \Microsoft Visual Studio 10.0\VC\bin
@@ -59,12 +59,16 @@ set CMAKE_OPT=^
5959 -D BUILDNAME=" OSGeo4W-Nightly-VC10-32" ^
6060 -D SIP_BINARY_PATH=%O4W_ROOT% /apps/Python27/sip.exe ^
6161 -D QWT_LIBRARY=%O4W_ROOT% /lib/qwt.lib ^
62+ -D WITH_GRASS6=TRUE ^
63+ -D WITH_GRASS7=TRUE ^
64+ -D GRASS_PREFIX=%O4W_ROOT% /apps/grass/grass-6.4.4 ^
65+ -D GRASS_PREFIX7=%O4W_ROOT% /apps/grass/grass-7.0.0 ^
6266 -D CMAKE_CXX_FLAGS_RELWITHDEBINFO=" /MD /ZI /MP /Od /D NDEBUG /D QGISDEBUG" ^
6367 -D CMAKE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO=%BUILDDIR% \apps\%PACKAGENAME% \pdb
6468goto devenv
6569
6670:devenv_x86_64
67- set GRASS_VERSION = 6.4.3
71+ set GRASS_VERSIONS = 6.4.3
6872call " %PF86% \Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
6973if exist " c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" call " c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /x64 /Release
7074path %path% ;%PF86% \Microsoft Visual Studio 10.0\VC\bin
@@ -77,6 +81,9 @@ set CMAKE_OPT=^
7781 -G " Visual Studio 10 Win64" ^
7882 -D BUILDNAME=" OSGeo4W-Nightly-VC10-64" ^
7983 -D SPATIALINDEX_LIBRARY=%O4W_ROOT% /lib/spatialindex-64.lib ^
84+ -D WITH_GRASS6=TRUE ^
85+ -D WITH_GRASS7=FALSE ^
86+ -D GRASS_PREFIX=%O4W_ROOT% /apps/grass/grass-6.4.3 ^
8087 -D SIP_BINARY_PATH=%O4W_ROOT% /bin/sip.exe ^
8188 -D QWT_LIBRARY=%O4W_ROOT% /lib/qwt5.lib ^
8289 -D CMAKE_CXX_FLAGS_RELWITHDEBINFO=" /MD /Zi /MP /Od /D NDEBUG /D QGISDEBUG" ^
@@ -98,6 +105,8 @@ set SRCDIR=%CD%
98105if " %BUILDDIR:~1 ,1 % " == " :" %BUILDDIR:~0 ,2 %
99106cd %BUILDDIR%
100107
108+ set PKGDIR = %OSGEO4W_ROOT% \apps\%PACKAGENAME%
109+
101110if exist repackage goto package
102111
103112if not exist build.log goto build
@@ -138,7 +147,6 @@ if errorlevel 1 goto error
138147
139148set LIB = %LIB% ;%OSGEO4W_ROOT% \lib
140149set INCLUDE = %INCLUDE% ;%OSGEO4W_ROOT% \include
141- set GRASS_PREFIX = %O4W_ROOT% /apps/grass/grass-%GRASS_VERSION%
142150
143151cmake %CMAKE_OPT% ^
144152 -D SITE=" qgis.org" ^
@@ -150,7 +158,6 @@ cmake %CMAKE_OPT% ^
150158 -D WITH_GLOBE=TRUE ^
151159 -D WITH_TOUCH=TRUE ^
152160 -D WITH_ORACLE=TRUE ^
153- -D WITH_GRASS=TRUE ^
154161 -D WITH_CUSTOM_WIDGETS=TRUE ^
155162 -D CMAKE_BUILD_TYPE=%BUILDCONF% ^
156163 -D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
@@ -194,8 +201,6 @@ if not exist ..\skiptests (
194201 if errorlevel 1 echo TESTS WERE NOT SUCCESSFUL.
195202)
196203
197- set PKGDIR = %OSGEO4W_ROOT% \apps\%PACKAGENAME%
198-
199204if exist %PKGDIR% (
200205 echo REMOVE: %DATE% %TIME%
201206 rmdir /s /q %PKGDIR%
@@ -209,19 +214,25 @@ if errorlevel 1 (echo INSTALL failed & goto error)
209214echo PACKAGE: %DATE% %TIME%
210215
211216cd ..
212- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%GRASS_VERSION% /g' postinstall-dev.bat > %OSGEO4W_ROOT% \etc\postinstall\%PACKAGENAME% .bat
217+
218+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversions@ /%GRASS_VERSIONS% /g' postinstall-dev.bat > %OSGEO4W_ROOT% \etc\postinstall\%PACKAGENAME% .bat
213219if errorlevel 1 (echo creation of desktop postinstall failed & goto error)
214- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion @ /%GRASS_VERSION % /g' preremove-dev.bat > %OSGEO4W_ROOT% \etc\preremove\%PACKAGENAME% .bat
220+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversions @ /%GRASS_VERSIONS % /g' preremove-dev.bat > %OSGEO4W_ROOT% \etc\preremove\%PACKAGENAME% .bat
215221if errorlevel 1 (echo creation of desktop preremove failed & goto error)
216- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%GRASS_VERSION% /g' qgis.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% .bat.tmpl
217- if errorlevel 1 (echo creation of desktop template failed & goto error)
218- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%GRASS_VERSION% /g' designer-qgis.bat.tmpl > %OSGEO4W_ROOT% \bin\designer-%PACKAGENAME% .bat.tmpl
222+
223+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' designer-qgis.bat.tmpl > %OSGEO4W_ROOT% \bin\designer-%PACKAGENAME% .bat.tmpl
219224if errorlevel 1 (echo creation of designer template failed & goto error)
220- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%GRASS_VERSION% /g' browser.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% -browser.bat.tmpl
221- if errorlevel 1 (echo creation of browser template & goto error)
222- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%GRASS_VERSION% /g' qgis.reg.tmpl > %PKGDIR% \bin\qgis.reg.tmpl
225+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' qgis.reg.tmpl > %PKGDIR% \bin\qgis.reg.tmpl
223226if errorlevel 1 (echo creation of registry template & goto error)
224227
228+ for %%g IN (%GRASS_VERSIONS% ) do (
229+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%%g /g' qgis.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% -g%%g .bat.tmpl
230+ if errorlevel 1 (echo creation of desktop template failed & goto error)
231+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion@ /%%g /g' browser.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% -browser-g%%g .bat.tmpl
232+ if errorlevel 1 (echo creation of browser template & goto error)
233+ )
234+
235+
225236REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %PKGDIR%\python\qgis\qgisconfig.py > %PKGDIR%\python\qgis\qgisconfig.py.tmpl
226237REM if errorlevel 1 (echo creation of qgisconfig.py.tmpl failed & goto error)
227238
0 commit comments