Changes between Version 31 and Version 32 of PackagingInstructions


Ignore:
Timestamp:
02/08/12 14:37:07 (13 years ago)
Author:
maphew
Comment:

remove 2nd textreplace example, as hardcoding OSGEO4W_ROOT no longer needed in batch files

Legend:

Unmodified
Added
Removed
Modified
  • PackagingInstructions

    v31 v32  
    7575One very common thing to do in postinstall actions is to insert/update configuration files to include the installed path to the OSGeo4W tree.  This is normally done with a postinstall file, and here are 2 examples::
    7676
    77 === !TextReplace Example !#1 ===
     77=== !TextReplace Example ===
    7878
    7979 * hardcoded paths exist in the /httpd.d/httpd_gmap.conf file of the gmap package:
     
    102102}}}
    103103
    104 === !TextReplace Example !#2 ===
    105 
    106 As of April 2008 textreplace will update files in place, so the infile/outfile syntax is not needed:
    107 {{{
    108 textreplace -std -t bin/o4w_env.bat
    109 }}}
    110 will apply the standard mapping change; this:
    111 {{{
    112 #!html
    113 <blockquote><pre>@echo off
    114 set OSGEO4W_ROOT=<b>@osgeo4w@</b>
    115 PATH=%OSGEO4W_ROOT%\bin;%PATH%
    116 for %%f in ("%OSGEO4W_ROOT%"\etc\ini\*.bat) do call "%%f"
    117 @echo on</pre></blockquote>
    118 }}}
    119 to this:
    120 {{{
    121 #!html
    122 <blockquote><pre>@echo off
    123 set OSGEO4W_ROOT=<b>X:\Path\to\OSGeo4W</b>
    124 PATH=%OSGEO4W_ROOT%\bin;%PATH%
    125 for %%f in ("%OSGEO4W_ROOT%"\etc\ini\*.bat) do call "%%f"
    126 @echo on</pre></blockquote>
     104Note: As of April 2008 textreplace will update files in place, so the infile/outfile syntax is not needed. Also `-std` is shorthand for for `-map @osgeo4w@ %OSGEO4W_ROOT%` so the above becomes simply:
     105{{{
     106textreplace -std -t httpd.d/httpd_gmap.conf
    127107}}}
    128108