Skip to content

Commit

Permalink
crosscompile: Support for BusyBox for Windows (OSGeo#1946)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuidaeCho authored Oct 16, 2021
1 parent 6376395 commit 182c2d0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mswindows/crosscompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,15 @@ rem For portable installation, use %~d0 for the changing drive letter
rem set GRASS_PYTHON=%~d0\Python39\python.exe
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.exe will be used if it exists; If not, cmd.exe will be
rem used; This check is mainly for supporting BusyBox for Windows
rem (https://frippery.org/busybox/)
if not defined GRASS_SH set GRASS_SH=%GISBASE%\etc\sh.exe
if not exist "%GRASS_SH%" set GRASS_SH=
set GRASS_PROJSHARE=%GISBASE%\share\proj
set PROJ_LIB=%GISBASE%\share\proj
Expand All @@ -313,7 +322,7 @@ 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 (
if not exist "%GISBASE%\etc\fontcap" (
pushd .
set GISRC=dummy
cd %GISBASE%\lib
Expand All @@ -325,7 +334,7 @@ if not exist "%GRASS_PYTHON%" (
set GRASS_PYTHON=
for /f usebackq %%i in (`where python.exe`) do if "!GRASS_PYTHON!"=="" set GRASS_PYTHON=%%i
)
if "%GRASS_PYTHON%"=="" (
if not defined GRASS_PYTHON (
echo.
echo python.exe not found in PATH
echo Please set GRASS_PYTHON in %~f0
Expand Down

0 comments on commit 182c2d0

Please sign in to comment.