Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#356 closed defect (fixed)

Bat file location independence

Reported by: anguscarr Owned by: jef
Priority: minor Component: Package
Version: Keywords:


The BAT files in OSGEO4w\bin are not all location independant. I want to set the program up to be location independant, so that I can make a portable version.

List of files I need to change to make this work: qgis-dev.bat qgis.bat qgis-browser.bat grass64.bat qgis-dev-browser.bat

They all initially start with set OSGEO4W_ROOT=<<My install location>> call %OSGEO4W_ROOT%\o4w_env.bat

I changed them to start with call %~dp0\o4w_env.bat

The bat files are now portable (afaik).

Can we change the template files to reflect this change?

Then I can package up an installer for distribution based on my local install. I'm sure there are issues with that, like the MSVC runtime installer, but I will work towards fixing those in the installer.

Change History (4)

comment:1 Changed 9 years ago by maphew

Owner: changed from osgeo4w-dev@… to jef

This is the recommended approach (, though the qgis and grass .bat files probably predate that.

I don't see a downside to this, but Jurgen is package maintainer and in a better position to judge.

comment:2 Changed 9 years ago by jef

Resolution: fixed
Status: newclosed

fixed in qgis 1.8.0-6

comment:3 in reply to:  2 ; Changed 9 years ago by anguscarr

Replying to jef:

fixed in qgis 1.8.0-6

Did you also do qgis-dev?

comment:4 in reply to:  3 Changed 9 years ago by jef

Replying to anguscarr:

Did you also do qgis-dev?

yes. the next nightly build should have it.

Note: See TracTickets for help on using tickets.