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. |
| 138 | Example from the qgis-dev postinstall: |
| 139 | |
| 140 | {{{ |
| 141 | call "%OSGEO4W_ROOT%\bin\o4w_env.bat" |
| 142 | |
| 143 | if not defined OSGEO4W_DESKTOP for /F "tokens=* USEBACKQ" %%F IN (`getspecialfolder Desktop`) do set OSGEO4W_DESKTOP=%%F |
| 144 | for /F "tokens=* USEBACKQ" %%F IN (`getspecialfolder Documents`) do set DOCUMENTS=%%F |
| 145 | |
| 146 | call "%OSGEO4W_ROOT%\bin\qgis-dev.bat" --postinstall |
| 147 | echo on |
| 148 | |
| 149 | if not %OSGEO4W_MENU_LINKS%==0 if not exist "%OSGEO4W_STARTMENU%" mkdir "%OSGEO4W_STARTMENU%" |
| 150 | if not %OSGEO4W_DESKTOP_LINKS%==0 if not exist "%OSGEO4W_DESKTOP%" mkdir "%OSGEO4W_DESKTOP%" |
| 151 | |
| 152 | if not %OSGEO4W_MENU_LINKS%==0 xxmklink "%OSGEO4W_STARTMENU%\QGIS Desktop 3.21.0 (Nightly).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev-bin.exe" "" "%DOCUMENTS%" |
| 153 | if not %OSGEO4W_DESKTOP_LINKS%==0 xxmklink "%OSGEO4W_DESKTOP%\QGIS Desktop 3.21.0 (Nightly).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev-bin.exe" "" "%DOCUMENTS%" |
| 154 | |
| 155 | if 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" |
| 156 | if 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. |
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. |
| 199 | The 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 | |