[osgeo4w-dev] [osgeo4w] #804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer
OSGeo4W
trac_osgeo4w at osgeo.org
Thu Nov 16 02:06:10 PST 2023
#804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer
------------------------------------------------+--------------------------
Reporter: ascottwwf | Owner: osgeo4w-
| dev@…
Type: defect | Status: new
Priority: normal | Component: Installer
Version: 1.0 | Resolution:
Keywords: QGIS LTR OSGeo4W scripted installer |
------------------------------------------------+--------------------------
Comment (by ascottwwf):
I have just retried this with the latest 3.28.12 LTR version (on a Windows
10 Sandbox) and unfortunately I am still getting the same issue.
But, I may have already discovered a fix...
If after the install, I open a command prompt on the machine and then re-
run:
{{{
%OSGEO4W_ROOT%\etc\postinstall\qgis-ltr.bat --postinstall
}}}
I get:
{{{
C:\ProgramData\OSGeo4W_v2>call "\bin\o4w_env.bat"
The system cannot find the path specified.
C:\ProgramData\OSGeo4W_v2>if not defined OSGEO4W_DESKTOP for /F "tokens=*
USEBACKQ" %F IN (`getspecialfolder Desktop`) do set OSGEO4W_DESKTOP=%F
'getspecialfolder' is not recognized as an internal or external command,
operable program or batch file.
C:\ProgramData\OSGeo4W_v2>for /F "tokens=* USEBACKQ" %F IN
(`getspecialfolder Documents`) do set DOCUMENTS=%F
'getspecialfolder' is not recognized as an internal or external command,
operable program or batch file.
C:\ProgramData\OSGeo4W_v2>set APPNAME=QGIS Desktop 3.28.12
C:\ProgramData\OSGeo4W_v2>for %i in ("") do set
QGIS_WIN_APP_NAME=%~ni\QGIS Desktop 3.28.12
C:\ProgramData\OSGeo4W_v2>set QGIS_WIN_APP_NAME=\QGIS Desktop 3.28.12
}}}
It appears the command cannot correctly resolve the path, so if I change
to the %OSGEO4W_ROOT% folder and run by calling the batch file, I get the
same results:
{{{
call "\bin\qgis-ltr.bat" --postinstall
The system cannot find the path specified.
}}}
But, if I change to the %OSGEO4W_ROOT% folder and run:
{{{
call ".\bin\qgis-ltr.bat" --postinstall
}}}
It works...
N.B. Pre-fixing the `.` ahead of the path allows the command to run....
and QGIS will then run / load.
The question now is why does this work on some machines but not others ?
and what causes the failure? - Seems like some devices can not resolve the
path as it is specified in the script.
Does this diagnosis help at all?
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/804#comment:12>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the osgeo4w-dev
mailing list