From f8bb22b0dfedb0dcec504c6d8c8b921abba97bb5 Mon Sep 17 00:00:00 2001 From: Nate Weibley Date: Fri, 16 Oct 2015 10:53:37 -0400 Subject: [PATCH] Switch to windeployqt to pull in install dependencies --- QGCSetup.pri | 58 +++++++--------------------------------------------- 1 file changed, 7 insertions(+), 51 deletions(-) diff --git a/QGCSetup.pri b/QGCSetup.pri index 3251240a5..edc628869 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -156,67 +156,18 @@ MacBuild { WindowsBuild { BASEDIR_WIN = $$replace(BASEDIR, "/", "\\") DESTDIR_WIN = $$replace(DESTDIR, "/", "\\") - D_DIR = $$[QT_INSTALL_LIBEXECS] - DLL_DIR = $$replace(D_DIR, "/", "\\") # Copy dependencies DebugBuild: DLL_QT_DEBUGCHAR = "d" ReleaseBuild: DLL_QT_DEBUGCHAR = "" COPY_FILE_LIST = \ $$BASEDIR\\libs\\lib\\sdl\\win32\\SDL.dll \ - $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \ - $$DLL_DIR\\icu*.dll \ - $$DLL_DIR\\Qt5Core$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Gui$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Location$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Multimedia$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5MultimediaWidgets$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Network$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5OpenGL$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Positioning$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5PrintSupport$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Qml$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Quick$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5QuickWidgets$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Sensors$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5SerialPort$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Sql$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Svg$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Test$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5WebKit$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5WebKitWidgets$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Widgets$${DLL_QT_DEBUGCHAR}.dll \ - $$DLL_DIR\\Qt5Xml$${DLL_QT_DEBUGCHAR}.dll -# readd this with Qt 5.5 -# $$DLL_DIR\\d3dcompiler*.dll \ -# $$DLL_DIR\\libEGL$${DLL_QT_DEBUGCHAR}.dll \ -# $$DLL_DIR\\libGLESv2$${DLL_QT_DEBUGCHAR}.dll \ -# $$DLL_DIR\\opengl32sw.dll \ + $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll + for(COPY_FILE, COPY_FILE_LIST) { QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\" } - # Copy platform plugins - P_DIR = $$[QT_INSTALL_PLUGINS] - PLUGINS_DIR_WIN = $$replace(P_DIR, "/", "\\") - QMAKE_POST_LINK += $$escape_expand(\\n) mkdir -p "$$DESTDIR_WIN\\platforms" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$PLUGINS_DIR_WIN\\platforms\\qwindows$${DLL_QT_DEBUGCHAR}.dll\" \"$$DESTDIR_WIN\\platforms\\qwindows$${DLL_QT_DEBUGCHAR}.dll\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\imageformats\" \"$$DESTDIR_WIN\\imageformats\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\sqldrivers\" \"$$DESTDIR_WIN\\sqldrivers\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\bearer\" \"$$DESTDIR_WIN\\bearer\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\iconengines\" \"$$DESTDIR_WIN\\iconengines\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\printsupport\" \"$$DESTDIR_WIN\\printsupport\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\qmltooling\" \"$$DESTDIR_WIN\\qmltooling\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$PLUGINS_DIR_WIN\\geoservices\" \"$$DESTDIR_WIN\\geoservices\" - - # Copy Qml libraries - Q_DIR = $$[QT_INSTALL_QML] - QML_DIR_WIN = $$replace(Q_DIR, "/", "\\") - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtGraphicalEffects\" \"$$DESTDIR_WIN\\QtGraphicalEffects\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtQuick\" \"$$DESTDIR_WIN\\QtQuick\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtQuick.2\" \"$$DESTDIR_WIN\\QtQuick.2\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtLocation\" \"$$DESTDIR_WIN\\QtLocation\" - QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$QML_DIR_WIN\\QtPositioning\" \"$$DESTDIR_WIN\\QtPositioning\" ReleaseBuild { # Copy Visual Studio DLLs @@ -237,4 +188,9 @@ WindowsBuild { error("Visual studio version not supported, installation cannot be completed.") } } + + DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe)) + QMAKE_POST_LINK += $$escape_expand(\\n) windeployqt --no-compiler-runtime --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET} + } + -- 2.22.0