Skip to content

Commit f0930ca

Browse files
committedOct 27, 2015
osgeo4w: fetch grass7 path from grass
1 parent 0763208 commit f0930ca

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed
 

‎ms-windows/osgeo4w/package-nightly.cmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ if "%ARCH%"=="x86" goto devenv_x86
5656
goto devenv_x86_64
5757

5858
:devenv_x86
59-
set GRASS_VERSIONS=6.4.4 7.0.1
59+
for /f "usebackq tokens=1" %%a in (`%OSGEO4W_ROOT%\bin\grass70 --config path`) do set GRASS70_PATH=%%a
60+
for %%i in ("%GRASS70_PATH%") do set GRASS70_VERSION=%%~nxi
61+
set GRASS70_VERSION=%GRASS70_VERSION:grass-=%
62+
set GRASS_VERSIONS=6.4.4 %GRASS70_VERSION%
6063
call "%PF86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
6164
if 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
6265
path %path%;%PF86%\Microsoft Visual Studio 10.0\VC\bin
@@ -69,7 +72,7 @@ set CMAKE_OPT=^
6972
-D WITH_GRASS6=TRUE ^
7073
-D WITH_GRASS7=TRUE ^
7174
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-6.4.4 ^
72-
-D GRASS_PREFIX7=%O4W_ROOT%/apps/grass/grass-7.0.1 ^
75+
-D GRASS_PREFIX7=%GRASS70_PATH:\=/% ^
7376
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="/MD /ZI /MP /Od /D NDEBUG /D QGISDEBUG" ^
7477
-D CMAKE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO=%BUILDDIR%\apps\%PACKAGENAME%\pdb
7578
goto devenv
@@ -88,6 +91,7 @@ set CMAKE_OPT=^
8891
-G "Visual Studio 10 Win64" ^
8992
-D SPATIALINDEX_LIBRARY=%O4W_ROOT%/lib/spatialindex-64.lib ^
9093
-D WITH_GRASS=TRUE ^
94+
-D WITH_GRASS6=TRUE ^
9195
-D WITH_GRASS7=FALSE ^
9296
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-6.4.3 ^
9397
-D SIP_BINARY_PATH=%O4W_ROOT%/bin/sip.exe ^

‎ms-windows/osgeo4w/package.cmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ if "%ARCH%"=="x86" goto devenv_x86
5656
goto devenv_x86_64
5757

5858
:devenv_x86
59-
set GRASS_VERSIONS=6.4.4 7.0.1
59+
for /f "usebackq tokens=1" %%a in (`%OSGEO4W_ROOT%\bin\grass70 --config path`) do set GRASS70_PATH=%%a
60+
for %%i in ("%GRASS70_PATH%") do set GRASS70_VERSION=%%~nxi
61+
set GRASS70_VERSION=%GRASS70_VERSION:grass-=%
62+
set GRASS_VERSIONS=6.4.4 %GRASS70_VERSION%
6063
call "%PF86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
6164
if 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
6265
path %path%;%PF86%\Microsoft Visual Studio 10.0\VC\bin
@@ -69,7 +72,7 @@ set CMAKE_OPT=^
6972
-D WITH_GRASS6=TRUE ^
7073
-D WITH_GRASS7=TRUE ^
7174
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-6.4.4 ^
72-
-D GRASS_PREFIX7=%O4W_ROOT%/apps/grass/grass-7.0.1
75+
-D GRASS_PREFIX7=%GRASS70_PATH:\=/%
7376
goto devenv
7477

7578
:devenv_x86_64
@@ -87,6 +90,7 @@ set CMAKE_OPT=^
8790
-D SPATIALINDEX_LIBRARY=%O4W_ROOT%/lib/spatialindex-64.lib ^
8891
-D WITH_GRASS=TRUE ^
8992
-D WITH_GRASS6=TRUE ^
93+
-D WITH_GRASS7=FALSE ^
9094
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-6.4.3 ^
9195
-D SIP_BINARY_PATH=%O4W_ROOT%/bin/sip.exe ^
9296
-D QWT_LIBRARY=%O4W_ROOT%/lib/qwt5.lib ^

0 commit comments

Comments
 (0)
Please sign in to comment.