Skip to content

Commit

Permalink
osgeo4w: updates for grass 7.6.1
Browse files Browse the repository at this point in the history
(cherry picked from commit a19fc89)
  • Loading branch information
jef-n committed Mar 23, 2019
1 parent 514ccce commit 5f7d4f5
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 28 deletions.
4 changes: 2 additions & 2 deletions cmake/FindGRASS.cmake
Expand Up @@ -77,8 +77,8 @@ MACRO (CHECK_GRASS G_PREFIX)
# and then again with no specified paths to search the default
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
# searching for the same item do nothing.
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib)
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)
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)

IF(LIB_PATH)
SET(GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} ${LIB_PATH})
Expand Down
15 changes: 12 additions & 3 deletions ms-windows/osgeo4w/httpd.conf.tmpl
@@ -1,10 +1,19 @@
LoadModule fcgid_module modules/mod_fcgid.so

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"
DefaultInitEnv O4W_QT_PREFIX "@osgeo4w@/apps/Qt5"
DefaultInitEnv O4W_QT_BINARIES "@osgeo4w@/apps/Qt5/bin"
DefaultInitEnv O4W_QT_PLUGINS "@osgeo4w@/apps/Qt5/plugins"
DefaultInitEnv O4W_QT_LIBRARIES "@osgeo4w@/apps/Qt5/lib"
DefaultInitEnv O4W_QT_TRANSLATIONS "@osgeo4w@/apps/Qt5/translations"
DefaultInitEnv O4W_QT_HEADERS "@osgeo4w@/apps/Qt5/include"
DefaultInitEnv O4W_QT_DOC "@osgeo4w@/apps/Qt5/doc"

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"
DefaultInitEnv QGIS_PREFIX_PATH "@osgeo4w@\apps\@package@"
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt4\plugins"
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt5\plugins"
DefaultInitEnv TEMP "@temp@"
DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python27"
DefaultInitEnv PYTHONHOME "@osgeo4w@\apps\Python37"
DefaultInitEnv PYTHONPATH "@osgeo4w@\apps\Python37;@osgeo4w@\apps\Python37\Scripts"

Alias /@package@/ @osgeo4w@/apps/@package@/bin/

Expand Down
10 changes: 5 additions & 5 deletions ms-windows/osgeo4w/package-nightly.cmd
Expand Up @@ -68,7 +68,6 @@ set CMAKE_OPT=^

:cmake
for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi
set GRASS7_VERSION=%GRASS7_VERSION:grass-=%
set GRASS_VERSIONS=%GRASS7_VERSION%

set TAR=tar.exe
Expand Down Expand Up @@ -206,8 +205,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
mkdir "%TEMP%"

for %%g IN (%GRASS_VERSIONS%) do (
set path=!path!;%OSGEO4W_ROOT%\apps\grass\grass-%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-%%g
set path=!path!;%OSGEO4W_ROOT%\apps\grass\%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g
)
PATH %path%;%BUILDDIR%\output\plugins
set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins
Expand Down Expand Up @@ -250,9 +249,10 @@ if errorlevel 1 (echo creation of registry template & goto error)

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

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
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
if errorlevel 1 (echo creation of desktop template failed & goto error)
set batches=!batches! bin/%PACKAGENAME%-g!v!.bat.tmpl
)
Expand Down
25 changes: 10 additions & 15 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -63,14 +63,7 @@ set CMAKE_OPT=^
-D CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=TRUE

:cmake
set GRASS7=
if exist %OSGEO4W_ROOT%\bin\grass74.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass74.bat
if exist %OSGEO4W_ROOT%\bin\grass76.bat set GRASS7=%OSGEO4W_ROOT%\bin\grass76.bat
if "%GRASS7%"=="" (echo GRASS7 not found & goto error)

for /f "usebackq tokens=1" %%a in (`%GRASS7% --config path`) do set GRASS7_PATH=%%a
for %%i in ("%GRASS7_PATH%") do set GRASS7_VERSION=%%~nxi
set GRASS7_VERSION=%GRASS7_VERSION:grass-=%
for %%i in ("%GRASS_PREFIX%") do set GRASS7_VERSION=%%~nxi
set GRASS_VERSIONS=%GRASS7_VERSION%

set TAR=tar.exe
Expand Down Expand Up @@ -207,8 +200,8 @@ if exist "%TEMP%" rmdir /s /q "%TEMP%"
mkdir "%TEMP%"

for %%g IN (%GRASS_VERSIONS%) do (
set path=!path!;%OSGEO4W_ROOT%\apps\grass\grass-%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass-%%g
set path=!path!;%OSGEO4W_ROOT%\apps\grass\%%g\lib
set GISBASE=%OSGEO4W_ROOT%\apps\grass\%%g
)
PATH %path%;%BUILDDIR%\output\plugins
set QT_PLUGIN_PATH=%BUILDDIR%\output\plugins;%OSGEO4W_ROOT%\apps\qt5\plugins
Expand Down Expand Up @@ -265,15 +258,16 @@ if errorlevel 1 (echo creation of httpd.conf template failed & goto error)
set packages="" "-common" "-server" "-devel" "-oracle-provider" "-grass-plugin-common"

for %%g IN (%GRASS_VERSIONS%) do (
for /F "delims=." %%i in ("%%g") do set v=%%i
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("!gv!") do set v=%%i
set w=!v!
if !v!==6 set w=

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
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
if errorlevel 1 (echo creation of grass desktop postinstall failed & goto error)
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
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
if errorlevel 1 (echo creation of grass desktop preremove failed & goto error)
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
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
if errorlevel 1 (echo creation of grass desktop template failed & goto error)

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

for %%g IN (%GRASS_VERSIONS%) do (
for /F "delims=." %%i in ("%%g") do set v=%%i
for /f "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("!gv!") do set v=%%i
set w=!v!
if !v!==6 set w=

Expand Down
3 changes: 2 additions & 1 deletion ms-windows/osgeo4w/postinstall-dev.bat
Expand Up @@ -9,7 +9,8 @@ if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%"

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

copy "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe"
copy "%OSGEO4W_ROOT%\bin\@package@-bin.vars" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.vars"
Expand Down
4 changes: 2 additions & 2 deletions ms-windows/osgeo4w/qgis-grass.bat.tmpl
@@ -1,10 +1,10 @@
@echo off
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\etc\env.bat"
call "%OSGEO4W_ROOT%\apps\grass\@grasspath@\etc\env.bat"
call qt5_env.bat
call py3_env.bat
@echo off
path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\bin;%PATH%
path %OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\@grasspath@\lib;%OSGEO4W_ROOT%\apps\grass\@grasspath@\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
Expand Down

0 comments on commit 5f7d4f5

Please sign in to comment.