From 72e779c3e4511fec3a99e949c7d173c56baff16e Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Wed, 20 Aug 2014 12:06:34 +0200 Subject: [PATCH] osgeo4w: move Qt plugins (sql and designer) into qgis directory --- ms-windows/osgeo4w/package-nightly.cmd | 12 +++++++++--- ms-windows/osgeo4w/postinstall-dev.bat | 3 +++ ms-windows/osgeo4w/preremove-desktop.bat | 3 +++ ms-windows/osgeo4w/qgis.bat.tmpl | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ms-windows/osgeo4w/package-nightly.cmd b/ms-windows/osgeo4w/package-nightly.cmd index 32cee342d925..43b143999a18 100644 --- a/ms-windows/osgeo4w/package-nightly.cmd +++ b/ms-windows/osgeo4w/package-nightly.cmd @@ -208,6 +208,7 @@ cd .. 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 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 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 +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 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 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 @@ -221,6 +222,13 @@ touch exclude move %PKGDIR%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe move %PKGDIR%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser-bin.exe +if not exist %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers mkdir %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers +move %PKGDIR%\qt4\plugins\sqldrivers\qsqlocispatial.dll %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers +move %PKGDIR%\qt4\plugins\sqldrivers\qsqlspatiallite.dll %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\sqldrivers + +if not exist %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\designer mkdir %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\designer +move %PKGDIR%\qt4\plugins\designer\qgis_customwidgets.dll %OSGEO4W_ROOT%\apps\%PACKAGENAME%\qtplugins\designer + if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAGENAME% tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^ --exclude-from exclude ^ @@ -229,9 +237,7 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS bin/%PACKAGENAME%-browser-bin.exe ^ bin/%PACKAGENAME%.bat.tmpl ^ bin/%PACKAGENAME%-browser.bat.tmpl ^ - apps/qt4/plugins/sqldrivers/qsqlocispatial.dll ^ - apps/qt4/plugins/sqldrivers/qsqlspatialite.dll ^ - apps/qt4/plugins/designer/qgis_customwidgets.dll ^ + bin/designer-%PACKAGENAME%.bat.tmpl ^ etc/postinstall/%PACKAGENAME%.bat ^ etc/preremove/%PACKAGENAME%.bat if errorlevel 1 (echo tar failed & goto error) diff --git a/ms-windows/osgeo4w/postinstall-dev.bat b/ms-windows/osgeo4w/postinstall-dev.bat index 3626e07fd3b0..060f87c918f4 100644 --- a/ms-windows/osgeo4w/postinstall-dev.bat +++ b/ms-windows/osgeo4w/postinstall-dev.bat @@ -1,12 +1,15 @@ textreplace -std -t bin\@package@.bat textreplace -std -t bin\@package@-browser.bat +textreplace -std -t bin\designer-@package@.bat if not %OSGEO4W_MENU_LINKS%==0 mkdir "%OSGEO4W_STARTMENU%" if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Desktop @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "QGIS Browser @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@-browser.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" +if not %OSGEO4W_MENU_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "%OSGEO4W_STARTMENU%" "Qt Designer with QGIS @version@ custom widgets" "exec hide """%OSGEO4W_ROOT%\bin\designer-@package@.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Desktop @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "QGIS Browser @version@" "exec hide """%OSGEO4W_ROOT%\bin\@package@-browser.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" +if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%OSGEO4W_ROOT%\bin\nircmd.exe" "~$folder.desktop$" "Qt Designer with QGIS @version@ custom widgets" "exec hide """%OSGEO4W_ROOT%\bin\designer-@package@.bat"" "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico" set O4W_ROOT=%OSGEO4W_ROOT% set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\% diff --git a/ms-windows/osgeo4w/preremove-desktop.bat b/ms-windows/osgeo4w/preremove-desktop.bat index 4a7def96f2b7..13872d37d366 100644 --- a/ms-windows/osgeo4w/preremove-desktop.bat +++ b/ms-windows/osgeo4w/preremove-desktop.bat @@ -1,8 +1,11 @@ del "%OSGEO4W_STARTMENU%\QGIS Desktop @version@.lnk" del "%OSGEO4W_STARTMENU%\QGIS Browser @version@.lnk" +del "%OSGEO4W_STARTMENU%\Qt Designer with QGIS @version@ custom widgets.lnk" del "%ALLUSERSPROFILE%\Desktop\QGIS Desktop @version@.lnk" del "%ALLUSERSPROFILE%\Desktop\QGIS Browser @version@.lnk" +del "%ALLUSERSPROFILE%\Desktop\Qt Designer with QGIS @version@ custom widgets.lnk" del "%OSGEO4W_ROOT%"\bin\@package@.bat del "%OSGEO4W_ROOT%"\bin\@package@-browser.bat +del "%OSGEO4W_ROOT%"\bin\designer-@package@.bat del "%OSGEO4W_ROOT%"\apps\@package@\python\qgis\qgisconfig.py del "%OSGEO4W_ROOT%"\apps\@package@\bin\qgis.reg diff --git a/ms-windows/osgeo4w/qgis.bat.tmpl b/ms-windows/osgeo4w/qgis.bat.tmpl index d4b8f9d386b8..b0482567d1b9 100644 --- a/ms-windows/osgeo4w/qgis.bat.tmpl +++ b/ms-windows/osgeo4w/qgis.bat.tmpl @@ -8,4 +8,5 @@ set GDAL_FILENAME_IS_UTF8=YES rem Set VSI cache to be used as buffer, see #6448 set VSI_CACHE=TRUE set VSI_CACHE_SIZE=1000000 +set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt4\plugins start "QGIS" /B "%OSGEO4W_ROOT%"\bin\@package@-bin.exe %*