Skip to content

Commit de8a438

Browse files
committedMar 27, 2019
osgeo4w: fix grass shortcuts in qgis-dev (fixes #21680)
(cherry picked from commit 8e70c08)
1 parent 7bb080a commit de8a438

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed
 

‎ms-windows/osgeo4w/postinstall-dev.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
99
if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%"
1010

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

1515
copy "%OSGEO4W_ROOT%\bin\@package@-bin.exe" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe"
1616
copy "%OSGEO4W_ROOT%\bin\@package@-bin.vars" "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.vars"
1717
textreplace -std -map @grassmajor@ !v! -t bin\@package@-g!v!.bat
1818
call "%OSGEO4W_ROOT%\bin\@package@-g!v!.bat" --postinstall
1919

20-
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)"
21-
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)"
20+
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)"
21+
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)"
2222
)
2323

2424
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"

‎ms-windows/osgeo4w/preremove-dev.bat

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
setlocal enabledelayedexpansion
22

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

6-
del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@ with GRASS %%g (Nightly).lnk"
7-
del "%OSGEO4W_STARTMENU%\QGIS Browser @version@ with GRASS %%g (Nightly).lnk"
8-
del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@ with GRASS %%g (Nightly).lnk"
9-
del "%OSGEO4W_DESKTOP%\QGIS Browser @version@ with GRASS %%g (Nightly).lnk"
7+
del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@ with GRASS !gv! (Nightly).lnk"
8+
del "%OSGEO4W_STARTMENU%\QGIS Browser @version@ with GRASS !gv! (Nightly).lnk"
9+
del "%OSGEO4W_DESKTOP%\QGIS Desktop @version@ with GRASS !gv! (Nightly).lnk"
10+
del "%OSGEO4W_DESKTOP%\QGIS Browser @version@ with GRASS !gv! (Nightly).lnk"
1011
del "%OSGEO4W_ROOT%\bin\@package@-g!v!.bat"
1112
del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.exe"
1213
del "%OSGEO4W_ROOT%\bin\@package@-bin-g!v!.env"

0 commit comments

Comments
 (0)
Please sign in to comment.