osgeo4w: fix grass shortcuts in qgis-dev (fixes #21680)

This commit is contained in:
Juergen E. Fischer 2019-03-27 10:43:03 +01:00
parent 7f95991edf
commit 8e70c08b18
2 changed files with 10 additions and 9 deletions

View File

@ -9,16 +9,16 @@ 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 "usebackq tokens=1" %%a in (`%%g --config version`) do set gv=%%a
for /F "delims=." %%i in ("%%gv") 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"
textreplace -std -map @grassmajor@ !v! -t bin\@package@-g!v!.bat
call "%OSGEO4W_ROOT%\bin\@package@-g!v!.bat" --postinstall
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@ with GRASS %%g (Nightly)"
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop @version@ with GRASS %%g (Nightly)"
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@ with GRASS !gv! (Nightly)"
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop @version@ with GRASS !gv! (Nightly)"
)
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "Qt Designer with QGIS @version@ custom widgets (Nightly)" "exec hide """%OSGEO4W_ROOT%\bin\@package@-designer.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"

View File

@ -1,12 +1,13 @@
setlocal enabledelayedexpansion
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
del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@ with GRASS %%g (Nightly).lnk"
del "%OSGEO4W_STARTMENU%\QGIS Browser @version@ with GRASS %%g (Nightly).lnk"
del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@ with GRASS %%g (Nightly).lnk"
del "%OSGEO4W_DESKTOP%\QGIS Browser @version@ with GRASS %%g (Nightly).lnk"
del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@ with GRASS !gv! (Nightly).lnk"
del "%OSGEO4W_STARTMENU%\QGIS Browser @version@ with GRASS !gv! (Nightly).lnk"
del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@ with GRASS !gv! (Nightly).lnk"
del "%OSGEO4W_DESKTOP%\QGIS Browser @version@ with GRASS !gv! (Nightly).lnk"
del "%OSGEO4W_ROOT%\bin\@package@-g!v!.bat"
del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe"
del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.env"