Changes between Version 41 and Version 42 of PackagingInstructions


Ignore:
Timestamp:
03/15/16 02:58:39 (9 years ago)
Author:
jef
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PackagingInstructions

    v41 v42  
    7171== Post-Install Actions ==
    7272
    73 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_STARTMENU, OSGEO4W_DESKTOP_LINKS, OSGEO4W_MENU_LINKS, OSGEO4W_HOME, and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path.
     73Packages 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_DESKTOP, OSGEO4W_DESKTOP_LINKS, OSGEO4W_MENU_LINKS, OSGEO4W_HOME, and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path.
    7474
    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::
     
    132132A Desktop icon:
    133133{{{
    134   if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%ALLUSERSPROFILE%\Desktop\OpenEV.lnk" "%OSGEO4W_ROOT%\bin\openev.bat"
     134  if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%OSGEO4W_DESKTOP%\OpenEV.lnk" "%OSGEO4W_ROOT%\bin\openev.bat"
    135135     " " \ "OSGeo4W OpenEV" 1 "%OSGEO4W_ROOT%\apps\openev\icon.ico"
    136136}}}
     
    148148if 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"
    149149
    150 if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Desktop 1.9.0" "exec hide %O4W_ROOT%\bin\qgis-dev.bat" "%O4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
    151 if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Browser 1.9.0" "exec hide %O4W_ROOT%\bin\qgis-dev-browser.bat" "%O4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
     150if not %OSGEO4W_DESKTOP_LINKS%==0 mkdir "%OSGEO4W_DESKTOP%"
     151if 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"
     152if 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"
    152153}}}
    153154
     
    158159== Pre-Remove Actions ==
    159160
    160 Packages may also take pre-remove actions by including a .bat file in the /etc/preremove directory as part of the package.  The filename should be named etc/preremove/<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.
     161Packages may also take pre-remove actions by including a .bat file in the /etc/preremove directory as part of the package.  The filename should be named etc/preremove/<package>.bat.  The bat file will be run with the environment variables OSGEO4W_STARTMENU, OSGEO4W_DESKTOP, OSGEO4W_HOME and OSGEO4W_HOME_MSYS defined, and with OSGEO4W_HOME/bin already in the path.
    161162
    162163A common application for this would be the removal of the shortcuts created in the post install actions.