Skip to content

Commit 58b7910

Browse files
committed
osgeo4w: fix install in directory with blanks (fixes #8398)
1 parent 1596fe6 commit 58b7910

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
textreplace -std -t bin\@package@.bat
22
textreplace -std -t bin\@package@-browser.bat
33

4+
REM get short path without blanks
5+
for %%i in ("%OSGEO4W_ROOT%") do set O4W_ROOT=%%~fsi
6+
47
if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
5-
if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\QGIS Desktop (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
6-
if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\QGIS Browser (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@-browser.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
8+
if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\QGIS Desktop (@version@).lnk" "%O4W_ROOT%\bin\@package@.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
9+
if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\QGIS Browser (@version@).lnk" "%O4W_ROOT%\bin\@package@-browser.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
710

8-
if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%ALLUSERSPROFILE%\Desktop\QGIS Desktop (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
9-
if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%ALLUSERSPROFILE%\Desktop\QGIS Browser (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@-browser.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
11+
if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%ALLUSERSPROFILE%\Desktop\QGIS Desktop (@version@).lnk" "%O4W_ROOT%\bin\@package@.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
12+
if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%ALLUSERSPROFILE%\Desktop\QGIS Browser (@version@).lnk" "%O4W_ROOT%\bin\@package@-browser.bat" " " \ "QGIS - Desktop GIS (@version@)" 1 "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
1013

11-
set O4W_ROOT=%OSGEO4W_ROOT%
1214
set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\%
1315
textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
1416
"%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
textreplace -std -t bin\@package@.bat
22
textreplace -std -t bin\@package@-browser.bat
33

4+
REM get short path without blanks
5+
for %%i in ("%OSGEO4W_ROOT%") do set O4W_ROOT=%%~fsi
6+
47
if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
5-
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
6-
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Browser @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@-browser.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
8+
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@" "exec hide %O4W_ROOT%\bin\@package@.bat" "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
9+
if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Browser @version@" "exec hide %O4W_ROOT%\bin\@package@-browser.bat" "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
710

8-
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Desktop @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
9-
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Browser @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@-browser.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
11+
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Desktop @version@" "exec hide %O4W_ROOT%\bin\@package@.bat" "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
12+
if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Browser @version@" "exec hide %O4W_ROOT%\bin\@package@-browser.bat" "%O4W_ROOT%\apps\@package@\icons\QGIS.ico"
1013

11-
set O4W_ROOT=%OSGEO4W_ROOT%
1214
set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\%
1315
textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
1416
"%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg"

src/core/qgscontexthelp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ QProcess *QgsContextHelp::start()
7373
}
7474
#endif
7575

76-
process->start( helpPath );
76+
process->start( helpPath, QStringList() );
7777

7878
return process;
7979
}

0 commit comments

Comments
 (0)