Forráskód Böngészése

mswindows: Update crosscompile.sh to 8.0 (#1876)

* mswindows: Update crosscompile.sh to 8.0

* mswindows: Drop more versions

* Python 38 => 39

* Keep $version in etc/grass$version.py to avoid import conflicts
Huidae Cho 3 éve
szülő
commit
38c084ad0b
1 módosított fájl, 7 hozzáadás és 7 törlés
  1. 7 7
      mswindows/crosscompile.sh

+ 7 - 7
mswindows/crosscompile.sh

@@ -289,17 +289,17 @@ done
 
 
 version=`sed -n '/^INST_DIR[ \t]*=/{s/^.*grass//; p}' include/Make/Platform.make`
 version=`sed -n '/^INST_DIR[ \t]*=/{s/^.*grass//; p}' include/Make/Platform.make`
 
 
-rm -f $dist/grass$version.tmp
-cp -a bin.$arch/grass$version.py $dist/etc
+rm -f $dist/grass.tmp
+cp -a bin.$arch/grass.py $dist/etc/grass$version.py
 
 
-cat<<'EOT' > $dist/grass$version.bat
+cat<<'EOT' | sed "s/\$version/$version/g" > $dist/grass.bat
 @echo off
 @echo off
 
 
 rem Change this variable to override auto-detection of python.exe in PATH
 rem Change this variable to override auto-detection of python.exe in PATH
-set GRASS_PYTHON=C:\Python38\python.exe
+set GRASS_PYTHON=C:\Python39\python.exe
 
 
 rem For portable installation, use %~d0 for the changing drive letter
 rem For portable installation, use %~d0 for the changing drive letter
-rem set GRASS_PYTHON=%~d0\Python38\python.exe
+rem set GRASS_PYTHON=%~d0\Python39\python.exe
 
 
 set GISBASE=%~dp0
 set GISBASE=%~dp0
 set GRASS_PROJSHARE=%GISBASE%\share\proj
 set GRASS_PROJSHARE=%GISBASE%\share\proj
@@ -334,10 +334,10 @@ if "%GRASS_PYTHON%"=="" (
 rem XXX: Do we need PYTHONHOME?
 rem XXX: Do we need PYTHONHOME?
 rem for %%i in (%GRASS_PYTHON%) do set PYTHONHOME=%%~dpi
 rem for %%i in (%GRASS_PYTHON%) do set PYTHONHOME=%%~dpi
 
 
-"%GRASS_PYTHON%" "%GISBASE%\etc\grass80.py" %*
+"%GRASS_PYTHON%" "%GISBASE%\etc\grass$version.py" %*
 if %ERRORLEVEL% geq 1 pause
 if %ERRORLEVEL% geq 1 pause
 EOT
 EOT
-unix2dos $dist/grass$version.bat
+unix2dos $dist/grass.bat
 
 
 # package if requested
 # package if requested
 if [ $package -eq 1 ]; then
 if [ $package -eq 1 ]; then