mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-28 18:54:33 +00:00
ref #423 fix tests
This commit is contained in:
parent
1e99587e5f
commit
7b3071e0af
@ -608,6 +608,7 @@ QSet<QString> ConfigParser::getQtPathesFromTargets() {
|
||||
}
|
||||
|
||||
bool ConfigParser::isNeededQt() const {
|
||||
|
||||
for (const auto &i: _config.targets()) {
|
||||
if (i.isValid() && i.isDependetOfQt()) {
|
||||
return true;
|
||||
@ -897,6 +898,8 @@ bool ConfigParser::initQmakePrivate(const QString &qmake) {
|
||||
|
||||
bool ConfigParser::initQmake() {
|
||||
|
||||
|
||||
|
||||
if (!isNeededQt()) {
|
||||
QuasarAppUtils::Params::log("deploy only C/C++ libraryes because a qmake is not needed"
|
||||
" for the distribution",
|
||||
|
@ -199,6 +199,7 @@ void DeployCore::help() {
|
||||
" For gui application sue the deploySystem option "
|
||||
"(on snap version you need to turn on permission)"},
|
||||
{"allPlatforms", "deploy all platforms plugins (big size)."},
|
||||
{"noQt", "Ignore the error of initialize of a qmake. Use only if your application does not use the qt framework."},
|
||||
|
||||
}
|
||||
},
|
||||
@ -327,7 +328,8 @@ QStringList DeployCore::helpKeys() {
|
||||
"qifStyle",
|
||||
"qifBanner",
|
||||
"qifLogo",
|
||||
"allPlatforms"
|
||||
"allPlatforms",
|
||||
"noQt"
|
||||
};
|
||||
}
|
||||
|
||||
@ -516,7 +518,14 @@ bool DeployCore::isQtLib(const QString &lib) {
|
||||
* Task https://github.com/QuasarApp/CQtDeployer/issues/422
|
||||
* All qt libs need to contains the Qt label.
|
||||
*/
|
||||
return isLib(info) && info.fileName().contains("Qt", ONLY_WIN_CASE_INSENSIATIVE);
|
||||
bool isQt = isLib(info) && info.fileName().contains("Qt", ONLY_WIN_CASE_INSENSIATIVE);
|
||||
|
||||
if (isQt && QuasarAppUtils::Params::isEndable("noQt") &&
|
||||
!QuasarAppUtils::Params::isEndable("qmake")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isQt;
|
||||
}
|
||||
|
||||
bool DeployCore::isExtraLib(const QString &lib) {
|
||||
|
@ -18,9 +18,11 @@ QSet<QString> ModulesQt515::qtLibs(const QString &distDir) const {
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
res -= utils.createTree({
|
||||
"./" + distDir + "/translations/qtbase_tr.qm",
|
||||
});
|
||||
#else
|
||||
res += utils.createTree({
|
||||
"./" + distDir + "/translations/qtbase_tr.qm",
|
||||
});
|
||||
#endif
|
||||
|
||||
@ -44,7 +46,9 @@ QSet<QString> ModulesQt515::qmlLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/Material/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/Universal/HorizontalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/Universal/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/VerticalHeaderView.qml"
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/designer/InsetSection.qml",
|
||||
"./" + distDir + "/translations/qtdeclarative_tr.qm",
|
||||
});
|
||||
#else
|
||||
res -= utils.createTree({
|
||||
@ -78,7 +82,10 @@ QSet<QString> ModulesQt515::qmlLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/Material/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/Universal/HorizontalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/Universal/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/VerticalHeaderView.qml"
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/VerticalHeaderView.qml",
|
||||
|
||||
"./" + distDir + "/qml/QtQuick/Controls.2/designer/InsetSection.qml",
|
||||
"./" + distDir + "/translations/qtdeclarative_tr.qm",
|
||||
}
|
||||
);
|
||||
#endif
|
||||
@ -130,7 +137,13 @@ QSet<QString> ModulesQt515::testDistroLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/Material/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/Universal/HorizontalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/Universal/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/VerticalHeaderView.qml"
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/designer/InsetSection.qml",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_tr.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtbase_tr.qm",
|
||||
"./" + distDir + "/lolTr/qtbase_tr.qm",
|
||||
|
||||
|
||||
});
|
||||
|
||||
#else
|
||||
@ -153,7 +166,12 @@ QSet<QString> ModulesQt515::testDistroLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/Material/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/Universal/HorizontalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/Universal/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/VerticalHeaderView.qml"
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/package2/ZzZ/q/and/q/QtQuick/Controls.2/designer/InsetSection.qml",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtdeclarative_tr.qm",
|
||||
"./" + distDir + "/package2/ZzZ/translations/qtbase_tr.qm",
|
||||
"./" + distDir + "/lolTr/qtbase_tr.qm",
|
||||
|
||||
});
|
||||
|
||||
res -= utils.createTree({
|
||||
@ -187,7 +205,11 @@ QSet<QString> ModulesQt515::testOutLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/Material/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/Universal/HorizontalHeaderView.qml",
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/Universal/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/VerticalHeaderView.qml"
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/VerticalHeaderView.qml",
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/designer/InsetSection.qml",
|
||||
"./" + distDir + "/translations/qtdeclarative_tr.qm",
|
||||
"./" + distDir + "/translations/qtbase_tr.qm",
|
||||
|
||||
});
|
||||
#else
|
||||
res += utils.createTree({
|
||||
@ -221,7 +243,10 @@ QSet<QString> ModulesQt515::testOutLibs(const QString &distDir) const {
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libvulkan-server.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libwayland-eglstream-controller.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libxcomposite-egl.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libxcomposite-glx.so"
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libxcomposite-glx.so",
|
||||
"./" + distDir + "/q/QtQuick/Controls.2/designer/InsetSection.qml",
|
||||
"./" + distDir + "/translations/qtdeclarative_tr.qm",
|
||||
"./" + distDir + "/translations/qtbase_tr.qm",
|
||||
});
|
||||
#endif
|
||||
return res;
|
||||
|
@ -477,7 +477,12 @@ void deploytest::testExtractLib() {
|
||||
QVERIFY(info.getPlatform() == platforms.value(lib));
|
||||
|
||||
for (const auto &dep : deb.value(lib)) {
|
||||
bool test = info.getDependncies().contains(dep.toUpper());
|
||||
QString depName = dep;
|
||||
if (info.getPlatform() & Platform::Win) {
|
||||
depName = dep.toUpper();
|
||||
}
|
||||
|
||||
bool test = info.getDependncies().contains(depName);
|
||||
QVERIFY(test);
|
||||
}
|
||||
|
||||
@ -1115,7 +1120,7 @@ void deploytest::testBinDir() {
|
||||
|
||||
|
||||
runTestParams({"-binDir", TestBinDir, "clear",
|
||||
"noCheckRPATH", "noCheckPATH"}, &comapareTree);
|
||||
"noCheckRPATH", "noCheckPATH", "noQt"}, &comapareTree);
|
||||
}
|
||||
|
||||
void deploytest::testConfFile() {
|
||||
@ -1148,7 +1153,7 @@ void deploytest::testConfFile() {
|
||||
"./" + DISTRO_DIR + "/quicknanobrowser.sh"});
|
||||
#endif
|
||||
|
||||
runTestParams({"-bin", TestBinDir, "clear" , "noCheckRPATH", "noCheckPATH",
|
||||
runTestParams({"-bin", TestBinDir, "clear" , "noCheckRPATH", "noCheckPATH", "noQt",
|
||||
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
|
||||
|
||||
|
||||
@ -1161,11 +1166,11 @@ void deploytest::testConfFile() {
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets",
|
||||
"clear", "noCheckRPATH", "noCheckPATH",
|
||||
"clear", "noCheckRPATH", "noCheckPATH", "noQt",
|
||||
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
|
||||
#else
|
||||
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestQMLWidgets.exe",
|
||||
"clear" , "-libDir", "L:/never/absalut/path", "noCheckPATH",
|
||||
"clear" , "-libDir", "L:/never/absalut/path", "noCheckPATH", "noQt",
|
||||
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
|
||||
#endif
|
||||
|
||||
@ -1223,11 +1228,11 @@ void deploytest::testConfFile() {
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets",
|
||||
"clear" , "noCheckRPATH", "noCheckPATH",
|
||||
"clear" , "noCheckRPATH", "noCheckPATH", "noQt",
|
||||
"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree);
|
||||
#else
|
||||
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestQMLWidgets.exe",
|
||||
"clear" , "noCheckPATH",
|
||||
"clear" , "noCheckPATH", "noQt",
|
||||
"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree);
|
||||
#endif
|
||||
|
||||
@ -1687,12 +1692,12 @@ void deploytest::testLibDir() {
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-libDir", extraPath,
|
||||
"-recursiveDepth", "5",
|
||||
"noCheckRPATH, noCheckPATH"}, &comapareTree, {}, true);
|
||||
"noCheckRPATH, noCheckPATH", "noQt"}, &comapareTree, {}, true);
|
||||
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-targetDir", "./" + DISTRO_DIR + "2",
|
||||
"-extraLibs", "stdc,gcc",
|
||||
"noCheckRPATH, noCheckPATH"}, &comapareTreeExtraLib, {}, true);
|
||||
"noCheckRPATH, noCheckPATH", "noQt"}, &comapareTreeExtraLib, {}, true);
|
||||
|
||||
//task #258
|
||||
//https://github.com/QuasarApp/CQtDeployer/issues/258
|
||||
@ -1725,7 +1730,7 @@ void deploytest::testLibDir() {
|
||||
#endif
|
||||
runTestParams({"-bin", bin, "clear" ,
|
||||
"-libDir", extraPath,
|
||||
"noCheckRPATH, noCheckPATH"}, &comapareTreeExtraLib, {}, true);
|
||||
"noCheckRPATH, noCheckPATH", "noQt"}, &comapareTreeExtraLib, {}, true);
|
||||
|
||||
QDir(extraPath).removeRecursively();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user