Changes between Version 16 and Version 17 of PackagingInstructions


Ignore:
Timestamp:
Aug 4, 2009, 10:13:00 AM (15 years ago)
Author:
maphew
Comment:

add Table of Contents; add note re: 7z archive bug

Legend:

Unmodified
Added
Removed
Modified
  • PackagingInstructions

    v16 v17  
    11This page describes techniques used for preparing OSGeo4W packages.
    2 
     2[[TOC]]
    33= General =
    44
    55OSGeo4W packages are each bzip2 compressed .tar files intended to be unpacked in the OSGeo4W root directory.  They come with setup.hint files designed to describe dependencies and a package description.
    66
    7 = Package Directory Layout =
     7== Package Directory Layout ==
    88
    99The installed OSGeo4W directory tree is described in DirectoryLayout.
     
    2121Sometimes a single project is packaged as several packages. In this case component packages are normally created as subdirectories of the primary directory. So, for instance the Oracle 10g driver for GDAL is kept in the release/gdal/gdal-oracle10g directory and packaged as gdal-oracle10g-1.5.0-1.tar.bz2.
    2222
    23 = Web Application Package Guidelines =
     23''Note:'' Don't use 7zip, setup.exe can't understand the archives it creates. There is mixed success with gnuwin32 bzip2 and cygwin bzip2. Linux tar/bzip2 has no reported problems. (see ticket:101)
     24
     25== Web Application Package Guidelines ==
    2426
    2527Here are some important guidelines:
     
    5456   <blockquote><p><a href="/foobar/">Foobar demo</a></p></pre>
    5557}}}
    56 = setup.hint =
     58== setup.hint ==
    5759
    5860Each package directory has a setup.hint file which normally contains the short and long description for the package, and the list of other packages on which it depends.  Note that there is normally only one setup.hint file for a package even if several versions of the package exist.  A normal setup.hint file might look like::
     
    6668This indicates the short and long description for the package, the list of categories it will appear in for the installer user interface, and the package it requires.
    6769
    68 = Post-Install Actions =
     70
     71== Post-Install Actions ==
    6972
    7073Packages 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.
     
    7275One 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::
    7376
    74 == !TextReplace Example !#1 ==
     77=== !TextReplace Example !#1 ===
    7578
    7679 * hardcoded paths exist in the /httpd.d/httpd_gmap.conf file of the gmap package:
     
    99102}}}
    100103
    101 == !TextReplace Example !#2 ==
     104=== !TextReplace Example !#2 ===
    102105
    103106{{{
     
    112115This applies the "standard" conversions to file bin/gdal-config.tmpl and puts the results in bin/gdal-config
    113116
    114 = Creating Shortcuts =
     117== Creating Shortcuts ==
    115118
    116119Another 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:
     
    152155}}}
    153156
    154 = Setup.ini =
     157== Setup.ini ==
    155158
    156159The Cygwin Setup.exe actually downloads the [http://download.osgeo.org/osgeo4w/setup.ini setup.ini] file with a list of all packages each time it is run.  This file should be recreated on the server by running the script invoking `osgeo4w-regen.sh` on the web each time packages are uploaded.  This produces a test version of the file (http://download.osgeo.org/osgeo4w/setup_test.ini), which can be used with the setup program by passing the -t commandline option.  Once this has been tested, using the link `osgeo4w-promote.sh` to copy this file to setup.ini, making it live for regular users.
     
    161164 * Promote test setup to live: `http://upload.osgeo.org/cgi-bin/osgeo4w-promote.sh`
    162165
    163 = Documenting =
     166== Documenting ==
    164167
    165168Please ensure that you prepare a wiki page linked off [wiki:PackageListing] with info on your package.  It should include a pointer back to the upstream project, the name of the packager (a link to a page with contact info on the packager), and special notes on where things are placed within OSGeo4W.