Skip to content

Commit a19fc89

Browse files
committed
osgeo4w: updates for grass 7.6.1
1 parent ac7f66f commit a19fc89

File tree

6 files changed

+33
-28
lines changed

6 files changed

+33
-28
lines changed

cmake/FindGRASS.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ MACRO (CHECK_GRASS G_PREFIX)
7777
# and then again with no specified paths to search the default
7878
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
7979
# searching for the same item do nothing.
80-
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
81-
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib)
80+
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} grass_${LIB}.${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}.${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
81+
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} grass_${LIB}.${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}.${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}} PATHS ${G_PREFIX}/lib)
8282

8383
IF(LIB_PATH)
8484
SET(GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} ${LIB_PATH})

ms-windows/osgeo4w/httpd.conf.tmpl

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
LoadModule fcgid_module modules/mod_fcgid.so
22

3-
DefaultInitEnv PATH "@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem"
3+
DefaultInitEnv O4W_QT_PREFIX "@osgeo4w@/apps/Qt5"
4+
DefaultInitEnv O4W_QT_BINARIES "@osgeo4w@/apps/Qt5/bin"
5+
DefaultInitEnv O4W_QT_PLUGINS "@osgeo4w@/apps/Qt5/plugins"
6+
DefaultInitEnv O4W_QT_LIBRARIES "@osgeo4w@/apps/Qt5/lib"
7+
DefaultInitEnv O4W_QT_TRANSLATIONS "@osgeo4w@/apps/Qt5/translations"
8+
DefaultInitEnv O4W_QT_HEADERS "@osgeo4w@/apps/Qt5/include"
9+
DefaultInitEnv O4W_QT_DOC "@osgeo4w@/apps/Qt5/doc"
10+
11+
DefaultInitEnv PATH "@osgeo4w@\apps\qt5\bin;@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\@grasspath@\bin;@osgeo4w@\apps\grass\@grasspath@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem"
412
DefaultInitEnv QGIS_PREFIX_PATH "@osgeo4w@\apps\@package@"
5-
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt4\plugins"
13+
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt5\plugins"
614
DefaultInitEnv TEMP "@temp@"
7-
DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python27"
15+
DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python37"
16+
DefaultInitEnv PYTHONPATH "@osgeo4w@\apps\Python37;@osgeo4w@\apps\Python37\Scripts"
817

918
Alias /@package@/ @osgeo4w@/apps/@package@/bin/
1019

ms-windows/osgeo4w/package-nightly.cmd

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ set CMAKE_OPT=^
6868

6969
:cmake
7070
for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi
71-
set GRASS7_VERSION=%GRASS7_VERSION:grass-=%
7271
set GRASS_VERSIONS=%GRASS7_VERSION%
7372

7473
set TAR=tar.exe
@@ -206,8 +205,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
206205
mkdir "%TEMP%"
207206

208207
for %%g IN (%GRASS_VERSIONS%) do (
209-
set path=!path!;%OSGEO4W_ROOT%\apps\grass\grass-%%g\lib
210-
set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-%%g
208+
set path=!path!;%OSGEO4W_ROOT%\apps\grass\%%g\lib
209+
set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g
211210
)
212211
PATH %path%;%BUILDDIR%\output\plugins
213212
set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins
@@ -251,9 +250,10 @@ if errorlevel 1 (echo creation of registry template & goto error)
251250

252251
set batches=
253252
for %%g IN (%GRASS_VERSIONS%) do (
254-
for /F "delims=." %%i in ("%%g") do set v=%%i
253+
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
254+
for /F "delims=." %%i in ("!gv!") do set v=%%i
255255

256-
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-g!v!.bat.tmpl
256+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grasspath@/%%g/g' -e 's/@grassversion@/!gv!/g' qgis-grass.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-g!v!.bat.tmpl
257257
if errorlevel 1 (echo creation of desktop template failed & goto error)
258258
set batches=!batches! bin/%PACKAGENAME%-g!v!.bat.tmpl
259259
)

ms-windows/osgeo4w/package.cmd

+10-15
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,7 @@ set CMAKE_OPT=^
6363
-D CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=TRUE
6464

6565
: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
7467
set GRASS_VERSIONS=%GRASS7_VERSION%
7568

7669
set TAR=tar.exe
@@ -207,8 +200,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
207200
mkdir "%TEMP%"
208201

209202
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
212205
)
213206
PATH %path%;%BUILDDIR%\output\plugins
214207
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)
265258
set packages="" "-common" "-server" "-devel" "-oracle-provider" "-grass-plugin-common"
266259

267260
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
269263
set w=!v!
270264
if !v!==6 set w=
271265

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
273267
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
275269
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
277271
if errorlevel 1 (echo creation of grass desktop template failed & goto error)
278272

279273
set packages=!packages! "-grass-plugin!w!"
@@ -437,7 +431,8 @@ if errorlevel 1 (echo tar failed & goto error)
437431
if errorlevel 1 (echo tar grass-plugin failed & goto error)
438432

439433
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
441436
set w=!v!
442437
if !v!==6 set w=
443438

ms-windows/osgeo4w/postinstall-dev.bat

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
99
if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%"
1010

1111
for %%g in (@grassversions@) do (
12-
for /F "delims=." %%i in ("%%g") do set v=%%i
12+
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
13+
for /F "delims=." %%i in ("%%gv") do set v=%%i
1314

1415
copy "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe"
1516
copy "%OSGEO4W_ROOT%\bin\@package@-bin.vars" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.vars"

ms-windows/osgeo4w/qgis-grass.bat.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@echo off
22
call "%~dp0\o4w_env.bat"
3-
call "%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\etc\env.bat"
3+
call "%OSGEO4W_ROOT%\apps\grass\@grasspath@\etc\env.bat"
44
call qt5_env.bat
55
call py3_env.bat
66
@echo off
7-
path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\bin;%PATH%
7+
path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\@grasspath@\lib;%OSGEO4W_ROOT%\apps\grass\@grasspath@\bin;%PATH%
88
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
99
set GDAL_FILENAME_IS_UTF8=YES
1010
rem Set VSI cache to be used as buffer, see #6448

0 commit comments

Comments
 (0)