From 8c13c97c77ec1267bfcd5058f826a82e64165547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20H=C3=B6her?= Date: Fri, 11 Aug 2017 22:37:47 +0200 Subject: [PATCH] Add test for qmake option --- tests/tests.sh | 18 ++++++++++++++++++ tools/linuxdeployqt/shared.cpp | 12 ++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/tests/tests.sh b/tests/tests.sh index 01a8c79..1d615df 100644 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -79,6 +79,24 @@ killall QtWidgetsApplication && echo "SUCCESS" cd ../../../ +############################################################################### +# Test bundling the sample Qt Widgets Application passing in the qmake exe +############################################################################### + +cd tests/QtWidgetsApplication/build/ +mkdir -p explicitqmake + +cp QtWidgetsApplication explicitqmake/ +../../../linuxdeployqt-*-x86_64.AppImage explicitqmake/QtWidgetsApplication \ + -qmake=$(which qmake) +ldd explicitqmake/QtWidgetsApplication +find explicitqmake/ +LD_DEBUG=libs explicitqmake/QtWidgetsApplication & +sleep 5 +killall QtWidgetsApplication && echo "SUCCESS" + +cd ../../../ + ############################################################################### # Test bundling the sample Qt Quick Controls 2 Application that comes with Qt Creator ############################################################################### diff --git a/tools/linuxdeployqt/shared.cpp b/tools/linuxdeployqt/shared.cpp index d8ef4fa..09597f8 100644 --- a/tools/linuxdeployqt/shared.cpp +++ b/tools/linuxdeployqt/shared.cpp @@ -50,13 +50,13 @@ bool runStripEnabled = true; bool bundleAllButCoreLibs = false; bool fhsLikeMode = false; QString fhsPrefix; -static bool alwaysOwerwriteEnabled = false; -static QStringList librarySearchPath; -static bool appstoreCompliant = false; +bool alwaysOwerwriteEnabled = false; +QStringList librarySearchPath; +bool appstoreCompliant = false; int logLevel = 1; -static int qtDetected = 0; -static bool qtDetectionComplete = 0; // As long as Qt is not detected yet, ldd may encounter "not found" messages, continue anyway -static bool deployLibrary = false; +int qtDetected = 0; +bool qtDetectionComplete = 0; // As long as Qt is not detected yet, ldd may encounter "not found" messages, continue anyway +bool deployLibrary = false; using std::cout; using std::endl;