Skip to content

Commit

Permalink
crosscompile: Sorting env vars more logically (#1954)
Browse files Browse the repository at this point in the history
* crosscompile: Sorting env vars more logically

* Support a different start-in drive than grass installation
  • Loading branch information
HuidaeCho committed Oct 20, 2021
1 parent 63854f2 commit 5cf8f89
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions mswindows/crosscompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,18 @@ cat<<'EOT' | sed "s/\$version/$version/g" > $dist/grass.bat
@echo off
setlocal EnableDelayedExpansion
set GISBASE=%~dp0
set GISBASE=%GISBASE:~0,-1%
set GRASS_PROJSHARE=%GISBASE%\share\proj
set PROJ_LIB=%GISBASE%\share\proj
set GDAL_DATA=%GISBASE%\share\gdal
rem XXX: Do we need these variables?
rem set GEOTIFF_CSV=%GISBASE%\share\epsg_csv
rem set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf
if defined GRASS_PYTHON (
if not exist "%GRASS_PYTHON%" (
echo.
Expand Down Expand Up @@ -361,9 +373,6 @@ if defined GRASS_PYTHON (
rem XXX: Do we need PYTHONHOME?
rem for %%i in (%GRASS_PYTHON%) do set PYTHONHOME=%%~dpi
set GISBASE=%~dp0
set GISBASE=%GISBASE:~0,-1%
rem If GRASS_SH is externally defined, that shell will be used; Otherwise,
rem GISBASE\etc\sh.bat will be used if it exists; If not, cmd.exe will be used;
rem This check is mainly for supporting BusyBox for Windows (busybox64.exe)
Expand All @@ -373,23 +382,6 @@ if not defined GRASS_SH (
if not exist "!GRASS_SH!" set GRASS_SH=
)
set GRASS_PROJSHARE=%GISBASE%\share\proj
set PROJ_LIB=%GISBASE%\share\proj
set GDAL_DATA=%GISBASE%\share\gdal
rem XXX: Do we need these variables?
rem set GEOTIFF_CSV=%GISBASE%\share\epsg_csv
rem set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf
if not exist "%GISBASE%\etc\fontcap" (
pushd .
set GISRC=dummy
cd %GISBASE%\lib
"%GISBASE%\bin\g.mkfontcap.exe"
popd
)
rem With busybox64.exe and Firefox as the default browser, g.manual fails with
rem "Your Firefox profile cannot be loaded. It may be missing or inaccessible";
rem I tried to set GRASS_HTML_BROWSER to the full path of chrome.exe, but it
Expand All @@ -409,6 +401,15 @@ if "%GRASS_SH%" == "%GISBASE%\etc\sh.bat" if not defined BROWSER (
)
)
if not exist "%GISBASE%\etc\fontcap" (
pushd .
%~d0
cd %GISBASE%\lib
set GISRC=dummy
"%GISBASE%\bin\g.mkfontcap.exe"
popd
)
"%GRASS_PYTHON%" "%GISBASE%\etc\grass$version.py" %*
if %ERRORLEVEL% geq 1 pause
EOT
Expand Down

0 comments on commit 5cf8f89

Please sign in to comment.