From 82b6b0f69963537c716434400b9da3e688a7740a Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 4 Oct 2010 20:20:22 +0000 Subject: [PATCH] Add: copying required QT DLLs (for installer) git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1879 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/share/share.pro | 50 ++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/ground/share/share.pro b/ground/share/share.pro index 1b2ac9c7b..182cdf0e9 100644 --- a/ground/share/share.pro +++ b/ground/share/share.pro @@ -14,34 +14,32 @@ equals(copydata, 1) { } # copying required for installer QT DLLs - win32 { - !debug { - QT_DLLs = libgcc_s_dw2-1.dll mingwm10.dll phonon4.dll QtCore4.dll QtGui4.dll QtNetwork4.dll QtOpenGL4.dll QtSql4.dll QtSvg4.dll QtTest4.dll QtXml4.dll - for(dll, QT_DLLs) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() - } - - # copy imageformats - QT_ImageFormats_DLLs = qgif4.dll qico4.dll qjpeg4.dll qmng4.dll qsvg4.dll qtiff4.dll - for(dll, QT_ImageFormats_DLLs) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/imageformats/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() - } - - # copy iconengine - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon4.dll\") $$targetPath(\"$$GCS_APP_PATH/qsvgicon4.dll\") $$addNewline() - - # copy SDL (if available) - Simple DirectMedia Layer (www.libsdl.org) - SDL_DLL = $$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/SDL.dll\") - exists($$SDL_DLL){ - data_copy.commands += $(COPY_FILE) $$SDL_DLL $$targetPath(\"$$GCS_APP_PATH/SDL.dll\") $$addNewline() - } - - # copy sql driver - data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $$addNewline() - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/sqldrivers/qsqlite4.dll\") $$targetPath(\"$$GCS_APP_PATH/sqldrivers/qsqlite4.dll\") $$addNewline() + CONFIG(release, debug|release) { + QT_DLLs = libgcc_s_dw2-1.dll mingwm10.dll phonon4.dll QtCore4.dll QtGui4.dll QtNetwork4.dll QtOpenGL4.dll QtSql4.dll QtSvg4.dll QtTest4.dll QtXml4.dll + for(dll, QT_DLLs) { + data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() } + + # copy imageformats + QT_ImageFormats_DLLs = qgif4.dll qico4.dll qjpeg4.dll qmng4.dll qsvg4.dll qtiff4.dll + for(dll, QT_ImageFormats_DLLs) { + data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/imageformats/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() + } + + # copy iconengine + data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon4.dll\") $$targetPath(\"$$GCS_APP_PATH/qsvgicon4.dll\") $$addNewline() + + # copy SDL (if available) - Simple DirectMedia Layer (www.libsdl.org) + SDL_DLL = $$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/SDL.dll\") + exists($$SDL_DLL){ + data_copy.commands += $(COPY_FILE) $$SDL_DLL $$targetPath(\"$$GCS_APP_PATH/SDL.dll\") $$addNewline() + } + + # copy sql driver + data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $$addNewline() + data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/sqldrivers/qsqlite4.dll\") $$targetPath(\"$$GCS_APP_PATH/sqldrivers/qsqlite4.dll\") $$addNewline() } data_copy.target = FORCE - QMAKE_EXTRA_TARGETS += data_copy + QMAKE_EXTRA_TARGETS += data_copy }