[osgeo4w-dev] [osgeo4w] #356: Bat file location independence

OSGeo4W trac_osgeo4w at osgeo.org
Wed Apr 24 20:23:08 PDT 2013

#356: Bat file location independence
Reporter:  anguscarr  |       Owner:  osgeo4w-dev@…              
    Type:  defect     |      Status:  new                        
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:

 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.

Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/356>
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