@@ -63,14 +63,7 @@ set CMAKE_OPT=^
63
63
-D CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=TRUE
64
64
65
65
:cmake
66
- set GRASS7 =
67
- if exist %OSGEO4W_ROOT% \bin\grass74.bat set GRASS7 = %OSGEO4W_ROOT% \bin\grass74.bat
68
- if exist %OSGEO4W_ROOT% \bin\grass76.bat set GRASS7 = %OSGEO4W_ROOT% \bin\grass76.bat
69
- if " %GRASS7% " == " " (echo GRASS7 not found & goto error)
70
-
71
- for /f " usebackq tokens=1" %%a in (`%GRASS7% --config path`) do set GRASS7_PATH = %%a
72
- for %%i in (" %GRASS7_PATH% " ) do set GRASS7_VERSION = %%~nxi
73
- set GRASS7_VERSION = %GRASS7_VERSION:grass- =%
66
+ for %%i in (" %GRASS_PREFIX% " ) do set GRASS7_VERSION = %%~nxi
74
67
set GRASS_VERSIONS = %GRASS7_VERSION%
75
68
76
69
set TAR = tar.exe
@@ -207,8 +200,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
207
200
mkdir " %TEMP% "
208
201
209
202
for %%g IN (%GRASS_VERSIONS% ) do (
210
- set path = !path! ;%OSGEO4W_ROOT% \apps\grass\grass- %%g \lib
211
- set GISBASE = %OSGEO4W_ROOT% \apps\grass\grass- %%g
203
+ set path = !path! ;%OSGEO4W_ROOT% \apps\grass\%%g \lib
204
+ set GISBASE = %OSGEO4W_ROOT% \apps\grass\%%g
212
205
)
213
206
PATH %path% ;%BUILDDIR% \output\plugins
214
207
set QT_PLUGIN_PATH = %BUILDDIR% \output\plugins;%OSGEO4W_ROOT% \apps\qt5\plugins
@@ -265,15 +258,16 @@ if errorlevel 1 (echo creation of httpd.conf template failed & goto error)
265
258
set packages = " " " -common" " -server" " -devel" " -oracle-provider" " -grass-plugin-common"
266
259
267
260
for %%g IN (%GRASS_VERSIONS% ) do (
268
- for /F " delims=." %%i in (" %%g " ) do set v = %%i
261
+ for /f " usebackq tokens=1" %%a in (`%%g --config version`) do set gv = %%a
262
+ for /F " delims=." %%i in (" !gv! " ) do set v = %%i
269
263
set w = !v!
270
264
if !v! == 6 set w =
271
265
272
- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion @ /%%g /g' -e 's/@ grassmajor@ /!v! /g' postinstall-grass.bat > %OSGEO4W_ROOT% \etc\postinstall\%PACKAGENAME% -grass-plugin!w! .bat
266
+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grasspath @ /%%g /g' -e 's/ @ grassversion @ / !gv! /g' -e 's/@ grassmajor@ /!v! /g' postinstall-grass.bat > %OSGEO4W_ROOT% \etc\postinstall\%PACKAGENAME% -grass-plugin!w! .bat
273
267
if errorlevel 1 (echo creation of grass desktop postinstall failed & goto error)
274
- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion @ /%%g /g' -e 's/@ grassmajor@ /!v! /g' preremove-grass.bat > %OSGEO4W_ROOT% \etc\preremove\%PACKAGENAME% -grass-plugin!w! .bat
268
+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grasspath @ /%%g /g' -e 's/ @ grassversion @ / !gv! /g' -e 's/@ grassmajor@ /!v! /g' preremove-grass.bat > %OSGEO4W_ROOT% \etc\preremove\%PACKAGENAME% -grass-plugin!w! .bat
275
269
if errorlevel 1 (echo creation of grass desktop preremove failed & goto error)
276
- sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grassversion @ /%%g /g' -e 's/@ grassmajor@ /!v! /g' qgis-grass.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% -grass!v! .bat.tmpl
270
+ sed -e 's/@ package@ /%PACKAGENAME% /g' -e 's/@ version@ /%VERSION% /g' -e 's/@ grasspath @ /%%g /g' -e 's/ @ grassversion @ / !gv! /g' -e 's/@ grassmajor@ /!v! /g' qgis-grass.bat.tmpl > %OSGEO4W_ROOT% \bin\%PACKAGENAME% -grass!v! .bat.tmpl
277
271
if errorlevel 1 (echo creation of grass desktop template failed & goto error)
278
272
279
273
set packages = !packages! " -grass-plugin!w! "
@@ -437,7 +431,8 @@ if errorlevel 1 (echo tar failed & goto error)
437
431
if errorlevel 1 (echo tar grass-plugin failed & goto error)
438
432
439
433
for %%g IN (%GRASS_VERSIONS% ) do (
440
- for /F " delims=." %%i in (" %%g " ) do set v = %%i
434
+ for /f " usebackq tokens=1" %%a in (`%%g --config version`) do set gv = %%a
435
+ for /F " delims=." %%i in (" !gv! " ) do set v = %%i
441
436
set w = !v!
442
437
if !v! == 6 set w =
443
438
0 commit comments