Changes between Version 42 and Version 43 of PackagingInstructions


Ignore:
Timestamp:
Jun 19, 2021, 2:26:47 PM (7 months ago)
Author:
jef
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PackagingInstructions

    v42 v43  
    99The installed OSGeo4W directory tree is described in DirectoryLayout.
    1010
    11 OSGeo4W packages are generally structured like packages for Cygwin as described at http://cygwin.com/setup.html . And support two architectures x86 (32bit) and x86_64 (64bit).
     11OSGeo4W packages are generally structured like packages for Cygwin as described at http://cygwin.com/setup.html . And support x86_64 (64bit).
    1212
    1313Packages prepared for OSGeo4W are currently uploaded to (requires shell access to [http://wiki.osgeo.org/wiki/Download_Server OSGeo download server]):
    1414
    15  upload.osgeo.org:/osgeo/download/osgeo4w/release/<arch>/<package>
    16 
    17 This tree can be reviewed at: http://download.osgeo.org/osgeo4w/<arch>/release
     15 upload.osgeo.org:/osgeo/download/osgeo4w/v2/release/x86_64/<package>
     16
     17This tree can be reviewed at: http://download.osgeo.org/osgeo4w/v2/x86_64/release
    1818
    1919[[Image(package-name.png, right)]]Each package directory should have a single setup.hint file, and one or more versions of that package as a .tar.bz2 file.  These should normally have names like gdal-1.5.0-7.tar.bz2 where "1.5.0" is the version of GDAL that was packaged, and "-1" indicates the version of the packaging attempt.  The directory can also contain corresponding source snapshots named like gdal-1.5.0-7-src.tar.bz2.   Note that the basename should exactly match the directory in which the package is found.  So the "gdal" directory has gdal-<version>-<revision>.tar.bz2 package files.
     
    2828
    2929 * the /osgeo4w/apps/ directory exists to hold applications.  Your application must be installed in a subdirectory of the /osgeo4w/apps/ directory, preferably with a meaningful name (in lowercase).
    30  * the Apache alias "/ms_tmp/" exists to access temporary web-accessible files, which points to the directory /osgeo4w/tmp/ms_tmp/
    31  * the Apache alias "/cgi-bin/" points to the /osgeo4w/bin/ folder.  e.g. mapserv.exe lives in the /bin folder.
    3230 * the /osgeo4w/httpd.d/ directory exists to hold Apache Alias Files.  This directory is automatically scanned by Apache when it starts.  The following is an alias example for an application named 'foobar':
    3331
     
    138136The environment variables {{{OSGEO4W_MENU_LINKS}}} and {{{OSGEO4W_DESKTOP_LINKS}}} are set by the installer (since 1.0.6-5) and reflect whether or not the corresponding option was checked.
    139137
    140 Alternativly the msvcrt package shortcuts can be created with {{{nircmd}}} (see [http://www.nirsoft.net/utils/nircmd.html nircmd]).  Example from the qgis-dev postinstall:
    141 
    142 {{{
    143 REM get short path without blanks
    144 for %%i in ("%OSGEO4W_ROOT%") do set O4W_ROOT=%%~fsi
    145 
    146 if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%"
    147 if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop 1.9.0" "exec hide %O4W_ROOT%\bin\qgis-dev.bat" "%O4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
    148 if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Browser 1.9.0" "exec hide %O4W_ROOT%\bin\qgis-dev-browser.bat" "%O4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
    149 
    150 if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%"
    151 if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_DESKTOP%" "QGIS Desktop 1.9.0" "exec hide %O4W_ROOT%\bin\qgis-dev.bat" "%O4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
    152 if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_DESKTOP%" "QGIS Browser 1.9.0" "exec hide %O4W_ROOT%\bin\qgis-dev-browser.bat" "%O4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
    153 }}}
    154 
    155 ''Note:'' that this also uses {{{nircmd}}} to start the batch job, which has the advantage that there is no command line window flashing up when a desktop application starts.
     138Example from the qgis-dev postinstall:
     139
     140{{{
     141call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
     142
     143if not defined OSGEO4W_DESKTOP for /F "tokens=* USEBACKQ" %%F IN (`getspecialfolder Desktop`) do set OSGEO4W_DESKTOP=%%F
     144for /F "tokens=* USEBACKQ" %%F IN (`getspecialfolder Documents`) do set DOCUMENTS=%%F
     145
     146call "%OSGEO4W_ROOT%\bin\qgis-dev.bat" --postinstall
     147echo on
     148
     149if not %OSGEO4W_MENU_LINKS%==0 if not exist "%OSGEO4W_STARTMENU%" mkdir "%OSGEO4W_STARTMENU%"
     150if not %OSGEO4W_DESKTOP_LINKS%==0 if not exist "%OSGEO4W_DESKTOP%" mkdir "%OSGEO4W_DESKTOP%"
     151
     152if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\QGIS Desktop 3.21.0 (Nightly).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev-bin.exe" "" "%DOCUMENTS%"
     153if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%OSGEO4W_DESKTOP%\QGIS Desktop 3.21.0 (Nightly).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev-bin.exe" "" "%DOCUMENTS%"
     154
     155if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\Qt Designer with QGIS 3.21.0 custom widgets (Nightly).lnk" "%OSGEO4W_ROOT%\bin\bgspawn.exe" "\"%OSGEO4W_ROOT%\bin\qgis-dev-designer.bat\"" "%DOCUMENTS%" "" 1 "%OSGEO4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
     156if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%OSGEO4W_DESKTOP%\Qt Designer with QGIS 3.21.0 custom widgets (Nightly).lnk" "%OSGEO4W_ROOT%\bin\bgspawn.exe" "\"%OSGEO4W_ROOT%\bin\qgis-dev-designer.bat\"" "%DOCUMENTS%" "" 1 "%OSGEO4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
     157}}}
     158
     159''Note:'' that this also uses {{{bgspawn}}} to the batch jobs, which has the advantage that there is no command line window flashing up when a desktop application starts.
    156160
    157161The postinstall scripts can run any DOS command or installed binary with desired arguments.
     
    193197== Setup.ini ==
    194198
    195 The setup.exe actually downloads one of the setup.ini files ([http://download.osgeo.org/osgeo4w/x86/setup.ini 32bit] or [http://download.osgeo.org/osgeo4w/x86_64/setup.ini 64bit]) with a list of all packages each time it is run.  These files 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 versions of these files (http://download.osgeo.org/osgeo4w/<arch>/setup_test.ini), which can be used with the setup program (by invoking setup-test.bat in the OSGeo4W shell).  Once this has been tested, using the link `osgeo4w-promote.sh` to copy this file to setup.ini, making it live for regular users.
    196 
    197  * Generate test versions of setup.ini: `http://upload.osgeo.org/cgi-bin/osgeo4w-regen.sh`
    198  * Verify package version numbers (see top of PackageListing)
    199  * Test by invoking setup-test.bat in the OSGeo4W shell
    200  * Promote test setup to live: `http://upload.osgeo.org/cgi-bin/osgeo4w-promote.sh`
    201 
    202 ''Note:'' the nightly build of QGIS (package {{{qgis-dev}}}) is build and uploaded around 00:00 UTC / 16:00 PST in the process the {{{setup.ini}}}} is updated and promoted automatically.
     199The setup.exe actually downloads one of the setup.ini files ([http://download.osgeo.org/osgeo4w/v2/x86_64/setup.ini 64bit]) with a list of all packages each time it is run.  These files should be recreated on the server by running the script invoking ``http://upload.osgeo.org/cgi-bin/osgeo4w-regen-v2.sh` on the web each time packages are uploaded.
     200
    203201== Documenting ==
    204202