Changes between Version 30 and Version 31 of PackagingInstructions


Ignore:
Timestamp:
02/07/12 19:43:46 (13 years ago)
Author:
maphew
Comment:

OSGEO4W_ROOT is now set at run-time in o4w_env.bat

Legend:

Unmodified
Added
Removed
Modified
  • PackagingInstructions

    v30 v31  
    166166
    167167= Application batch file template =
    168 Sample of how to start an application with standard environment set. Replace `foo.exe` with your application executable and save as `foobar.bz2:bin/foo.bat.tmpl`. [#Post-InstallActions Post-Install] will set the proper OSGEO4W_ROOT.
     168Sample of how to start an application with standard environment set. Replace `foo.exe` with your application executable and save as `foobar.bz2:bin/foo.bat`. ~~`foobar.bz2:bin/foo.bat.tmpl`. [#Post-InstallActions Post-Install] will set the proper OSGEO4W_ROOT.~~ ''As of [wiki:pkg-msvcrt] v1.0.1-6 (2012-Feb-07) root is determined dynamically at run-time.''
     169
     170If `bin\foo.bat` use:
    169171{{{
    170172@echo off
    171 SET OSGEO4W_ROOT=@osgeo4w@
    172 call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
     173call "%~dp0\o4w_env.bat"
    173174start "Foo window title" /B "%OSGEO4W_ROOT%\bin\foo.exe" %*
     175@echo on
     176}}}
     177
     178If `apps\foo\foo.bat` use:
     179{{{
     180@echo off
     181call "~dp0\..\..\bin\o4w_env.bat
     182start "Foo window title" /B "%OSGEO4W_ROOT%\apps\foo\foo.exe" %*
    174183@echo on
    175184}}}