Changes between Version 1 and Version 2 of PackagingInstructions


Ignore:
Timestamp:
07/28/08 22:13:00 (16 years ago)
Author:
warmerdam
Comment:

Updated to use %OSGEO4W_STARTMENU%

Legend:

Unmodified
Added
Removed
Modified
  • PackagingInstructions

    v1 v2  
    6868= Post-Install Actions =
    6969
    70 Packages may take post-install actions by including a .bat file in the /etc/postinstall directory as part of the package.  The filename should be named etc/postinstall/<package>.bat.  The bat file will be run with the environment variables OSGEO4W_HOME and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path.
     70Packages may take post-install actions by including a .bat file in the /etc/postinstall directory as part of the package.  The filename should be named etc/postinstall/<package>.bat.  The bat file will be run with the environment variables OSGEO4W_STARTMENU, OSGEO4W_HOME and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path.
    7171
    7272One 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::
     
    116116Another postinstall task that packages might do is to create shortcuts that will be available to launch a certain command. As its is the case for the textreplace executable, there is an utility binary xxmklink.exe that is available in the installer (part of the msvcrt package). By typing xxmklink, you can see all the options supported by this utility. Here are some examples on how it can be used in a post install file:
    117117{{{
    118   mkdir "%ALLUSERSPROFILE%\start menu\Programs\OSGeo4W"
    119   mkdir "%ALLUSERSPROFILE%\start menu\Programs\OSGeo4W\Apache"
    120   xxmklink "%ALLUSERSPROFILE%\start menu\Programs\OSGeo4W\Apache\OSGEO4W-Apache-Install.lnk"
     118  mkdir "%ALLUSERSPROFILE%\%OSGEO4W_STARTMENU%\Programs\OSGeo4W"
     119  mkdir "%ALLUSERSPROFILE%\%OSGEO4W_STARTMENU%\Programs\OSGeo4W\Apache"
     120  xxmklink "%ALLUSERSPROFILE%\%OSGEO4W_STARTMENU%\Programs\OSGeo4W\Apache\OSGEO4W-Apache-Install.lnk"
    121121    %OSGEO4W_ROOT%\Apache\bin\httpd.exe " -k install -n \"Apache OSGEO4W Web Server\""
    122122}}}
    123123Using icons:
    124124{{{
    125   xxmklink "%ALLUSERSPROFILE%\start menu\Programs\OSGeo4W\ttt.lnk" cmd.exe "" . "my_desc" 1
     125  xxmklink "%ALLUSERSPROFILE%\%OSGEO4W_STARTMENU%\Programs\OSGeo4W\ttt.lnk" cmd.exe "" . "my_desc" 1
    126126    "%OSGEO4W_ROOT%\OSGeo4W.ico"
    127127}}}