Skip to content

Commit a8e7f9f

Browse files
committed
osgeo4w: fix plugin install, add more error checking and include latest updates
also in package.cmd
1 parent 709c285 commit a8e7f9f

File tree

3 files changed

+62
-23
lines changed

3 files changed

+62
-23
lines changed

ms-windows/osgeo4w/httpd.conf.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ LoadModule fcgid_module modules/mod_fcgid.so
22

33
DefaultInitEnv PATH "@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem"
44
DefaultInitEnv QGIS_PREFIX_PATH "@osgeo4w@\apps\@package@"
5+
DefaultInitEnv QT_PLUGIN_PATH "@osgeo4w@\apps\@package@\qtplugins;@osgeo4w@\apps\qt4\plugins"
56
DefaultInitEnv TEMP "@temp@"
67

78
Alias /@package@/ @osgeo4w@/apps/@package@/bin/

ms-windows/osgeo4w/package-nightly.cmd

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ cmake %CMAKE_OPT% ^
163163
-D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/%PACKAGENAME% ^
164164
-D FCGI_INCLUDE_DIR=%O4W_ROOT%/include ^
165165
-D FCGI_LIBRARY=%O4W_ROOT%/lib/libfcgi.lib ^
166-
-D WITH_INTERNAL_JINJA2=FALSE ^
167-
-D WITH_INTERNAL_MARKUPSAFE=FALSE ^
168-
-D WITH_INTERNAL_PYGMENTS=FALSE ^
169-
-D WITH_INTERNAL_DATEUTIL=FALSE ^
170-
-D WITH_INTERNAL_PYTZ=FALSE ^
171-
-D WITH_INTERNAL_SIX=FALSE ^
166+
-D WITH_INTERNAL_JINJA2=FALSE ^
167+
-D WITH_INTERNAL_MARKUPSAFE=FALSE ^
168+
-D WITH_INTERNAL_PYGMENTS=FALSE ^
169+
-D WITH_INTERNAL_DATEUTIL=FALSE ^
170+
-D WITH_INTERNAL_PYTZ=FALSE ^
171+
-D WITH_INTERNAL_SIX=FALSE ^
172172
%SRCDIR%
173173
if errorlevel 1 (echo cmake failed & goto error)
174174

@@ -206,35 +206,48 @@ echo PACKAGE: %DATE% %TIME%
206206

207207
cd ..
208208
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-dev.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
209+
if errorlevel 1 (echo creation of desktop postinstall failed & goto error)
209210
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' preremove-desktop.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
211+
if errorlevel 1 (echo creation of desktop preremove failed & goto error)
210212
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl
213+
if errorlevel 1 (echo creation of desktop template failed & goto error)
211214
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' designer-qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\designer-%PACKAGENAME%.bat.tmpl
215+
if errorlevel 1 (echo creation of designer template failed & goto error)
212216
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' browser.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser.bat.tmpl
213-
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.reg.tmpl >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.reg.tmpl
217+
if errorlevel 1 (echo creation of browser template & goto error)
218+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.reg.tmpl >%PKGDIR%\bin\qgis.reg.tmpl
219+
if errorlevel 1 (echo creation of registry template & goto error)
214220

215-
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
221+
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %PKGDIR%\python\qgis\qgisconfig.py >%PKGDIR%\python\qgis\qgisconfig.py.tmpl
216222
REM if errorlevel 1 (echo creation of qgisconfig.py.tmpl failed & goto error)
217223

218224
REM del %PKGDIR%\python\qgis\qgisconfig.py
219225

220226
touch exclude
221227

222228
move %PKGDIR%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe
229+
if errorlevel 1 (echo move of desktop executable failed & goto error)
223230
move %PKGDIR%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser-bin.exe
231+
if errorlevel 1 (echo move of browser executable failed & goto error)
224232

225-
if not exist %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers mkdir %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers
226-
move %PKGDIR%\qt4\plugins\sqldrivers\qsqlocispatial.dll %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers
227-
move %PKGDIR%\qt4\plugins\sqldrivers\qsqlspatiallite.dll %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers
233+
if not exist %PKGDIR%\qtplugins\sqldrivers mkdir %PKGDIR%\qtplugins\sqldrivers
234+
move %OSGEO4W_ROOT%\apps\qt4\plugins\sqldrivers\qsqlocispatial.dll %PKGDIR%\qtplugins\sqldrivers
235+
if errorlevel 1 (echo move of oci sqldriver failed & goto error)
236+
move %OSGEO4W_ROOT%\apps\qt4\plugins\sqldrivers\qsqlspatialite.dll %PKGDIR%\qtplugins\sqldrivers
237+
if errorlevel 1 (echo move of spatialite sqldriver failed & goto error)
228238

229-
if not exist %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\designer mkdir %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\designer
230-
move %PKGDIR%\qt4\plugins\designer\qgis_customwidgets.dll %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\designer
239+
if not exist %PKGDIR%\qtplugins\designer mkdir %PKGDIR%\qtplugins\designer
240+
move %OSGEO4W_ROOT%\apps\qt4\plugins\designer\qgis_customwidgets.dll %PKGDIR%\qtplugins\designer
241+
if errorlevel 1 (echo move of customwidgets failed & goto error)
231242

232-
if not exist %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\PyQt4\uic\widget-plugins mkdir %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\PyQt4\uic\widget-plugins
233-
move %PKGDIR%\apps\Python27\Lib\site-packages\PyQt4\uic\widget-plugins\qgis_customwidgets.py %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\PyQt4\uic\widget-plugins
243+
if not exist %PKGDIR%\python\PyQt4\uic\widget-plugins mkdir %PKGDIR%\python\PyQt4\uic\widget-plugins
244+
move %OSGEO4W_ROOT%\apps\Python27\Lib\site-packages\PyQt4\uic\widget-plugins\qgis_customwidgets.py %PKGDIR%\python\PyQt4\uic\widget-plugins
245+
if errorlevel 1 (echo move of customwidgets binding failed & goto error)
234246

235247
if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAGENAME%
236248
tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
237249
--exclude-from exclude ^
250+
--exclude "*.pyc" ^
238251
apps/%PACKAGENAME% ^
239252
bin/%PACKAGENAME%-bin.exe ^
240253
bin/%PACKAGENAME%-browser-bin.exe ^

ms-windows/osgeo4w/package.cmd

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,20 +200,29 @@ if errorlevel 1 (echo INSTALL failed & goto error)
200200
echo PACKAGE: %DATE% %TIME%
201201

202202
cd ..
203-
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-common.bat >%OSGEO4W_ROOT%\etc\postinstall\\%PACKAGENAME%-common.bat
204-
203+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-common.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-common.bat
204+
if errorlevel 1 (echo creation of common postinstall failed & goto error)
205205
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-desktop.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
206+
if errorlevel 1 (echo creation of desktop postinstall failed & goto error)
206207
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' preremove-desktop.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
208+
if errorlevel 1 (echo creation of desktop preremove failed & goto error)
207209
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl
210+
if errorlevel 1 (echo creation of desktop template failed & goto error)
211+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' designer-qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\designer-%PACKAGENAME%.bat.tmpl
212+
if errorlevel 1 (echo creation of designer template failed & goto error)
208213
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' browser.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser.bat.tmpl
209-
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.reg.tmpl >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.reg.tmpl
210-
214+
if errorlevel 1 (echo creation of browser template & goto error)
215+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.reg.tmpl >%PKGDIR%\bin\qgis.reg.tmpl
216+
if errorlevel 1 (echo creation of registry template & goto error)
211217
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-server.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-server.bat
218+
if errorlevel 1 (echo creation of server postinstall failed & goto error)
212219
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' preremove-server.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-server.bat
220+
if errorlevel 1 (echo creation of server preremove failed & goto error)
213221
if not exist %OSGEO4W_ROOT%\httpd.d mkdir %OSGEO4W_ROOT%\httpd.d
214222
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' httpd.conf.tmpl >%OSGEO4W_ROOT%\httpd.d\httpd_%PACKAGENAME%.conf.tmpl
223+
if errorlevel 1 (echo creation of httpd.conf template failed & goto error)
215224

216-
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
225+
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %PKGDIR%\python\qgis\qgisconfig.py >%PKGDIR%\python\qgis\qgisconfig.py.tmpl
217226
REM if errorlevel 1 (echo creation of qgisconfig.py.tmpl failed & goto error)
218227

219228
REM del %PKGDIR%\python\qgis\qgisconfig.py
@@ -267,7 +276,23 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-server/%PACKAGENAME
267276
if errorlevel 1 (echo tar server failed & goto error)
268277

269278
move %PKGDIR%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe
279+
if errorlevel 1 (echo move of desktop executable failed & goto error)
270280
move %PKGDIR%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser-bin.exe
281+
if errorlevel 1 (echo move of browser executable failed & goto error)
282+
283+
if not exist %PKGDIR%\qtplugins\sqldrivers mkdir %PKGDIR%\qtplugins\sqldrivers
284+
move %OSGEO4W_ROOT%\apps\qt4\plugins\sqldrivers\qsqlocispatial.dll %PKGDIR%\qtplugins\sqldrivers
285+
if errorlevel 1 (echo move of oci sqldriver failed & goto error)
286+
move %OSGEO4W_ROOT%\apps\qt4\plugins\sqldrivers\qsqlspatialite.dll %PKGDIR%\qtplugins\sqldrivers
287+
if errorlevel 1 (echo move of spatialite sqldriver failed & goto error)
288+
289+
if not exist %PKGDIR%\qtplugins\designer mkdir %PKGDIR%\qtplugins\designer
290+
move %OSGEO4W_ROOT%\apps\qt4\plugins\designer\qgis_customwidgets.dll %PKGDIR%\qtplugins\designer
291+
if errorlevel 1 (echo move of customwidgets failed & goto error)
292+
293+
if not exist %PKGDIR%\python\PyQt4\uic\widget-plugins mkdir %PKGDIR%\python\PyQt4\uic\widget-plugins
294+
move %OSGEO4W_ROOT%\apps\Python27\Lib\site-packages\PyQt4\uic\widget-plugins\qgis_customwidgets.py %PKGDIR%\python\PyQt4\uic\widget-plugins
295+
if errorlevel 1 (echo move of customwidgets binding failed & goto error)
271296

272297
if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAGENAME%
273298
tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
@@ -295,7 +320,8 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
295320
"apps/%PACKAGENAME%/plugins/topolplugin.dll" ^
296321
"apps/%PACKAGENAME%/plugins/zonalstatisticsplugin.dll" ^
297322
"apps/%PACKAGENAME%/qgis_help.exe" ^
298-
"apps/qt4/plugins/sqldrivers/qsqlspatialite.dll" ^
323+
"apps/%PACKAGENAME%/qtplugins/sqldrivers/qsqlspatialite.dll" ^
324+
"apps/%PACKAGENAME%/qtplugins/designer/" ^
299325
"apps/%PACKAGENAME%/python/" ^
300326
"apps/%PACKAGENAME%/resources/customization.xml" ^
301327
"bin/%PACKAGENAME%.bat.tmpl" ^
@@ -317,7 +343,6 @@ if errorlevel 1 (echo tar grass-plugin failed & goto error)
317343
REM grass direct library disabled
318344
REM "apps/%PACKAGENAME%/plugins/libgrass_gis.%GRASS_VERSION%.dll"
319345

320-
321346
tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-globe-plugin/%PACKAGENAME%-globe-plugin-%VERSION%-%PACKAGE%.tar.bz2 ^
322347
--exclude-from exclude ^
323348
--exclude "*.pyc" ^
@@ -327,7 +352,7 @@ if errorlevel 1 (echo tar globe-plugin failed & goto error)
327352

328353
tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-oracle-provider/%PACKAGENAME%-oracle-provider-%VERSION%-%PACKAGE%.tar.bz2 ^
329354
"apps/%PACKAGENAME%/plugins/oracleprovider.dll" ^
330-
apps/qt4/plugins/sqldrivers/qsqlocispatial.dll
355+
"apps/%PACKAGENAME%/qtplugins/sqldrivers/qsqlocispatial.dll"
331356
if errorlevel 1 (echo tar oracle-provider failed & goto error)
332357

333358
tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-devel/%PACKAGENAME%-devel-%VERSION%-%PACKAGE%.tar.bz2 ^

0 commit comments

Comments
 (0)