Feature request #21127
Use relative paths in qgis-bin.env
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||28945|
In file OSGEO4W_ROOT\bin\qgis-bin.env the drive letter of the QGIS installation is hard coded.
To allow for portable edition (changing drive letters) of QGIS using relative paths or variables like OSGEO4W_ROOT is preferable.
#1 Updated by Jürgen Fischer over 2 years ago
- Status changed from Open to Feedback
.env is created by the
.exe when it's invoked with the
--postinstall parameter and dumps the current values of the environment variables listed in
.vars to it. The point of the
.env is that QGIS doesn't need environment variables to start - this is required for pinning as that automatically starts the pinned
.exe and doesn't know about the batch files used for a regular start. The
.exe will source the
.env automatically. For portable installations you could change the batch file to delete the
.env and run the
--postinstall upfront (on regular installations this is done once in
#2 Updated by Michiel Nass over 2 years ago
I normally start QGIS via batch file
The last line of that batch file I edited to make it portable and it reads:
start "QGIS" /B "%OSGEO4W_ROOT%\bin\qgis-bin.exe" --profiles-path "%OSGEO4W_ROOT%\qgisini" %*
Do i understand correctly I have to replace the last line with the following two lines?
start "QGIS" /B "%OSGEO4W_ROOT%\bin\qgis-bin.exe" --profiles-path "%OSGEO4W_ROOT%\qgisini" --postinstall %*