4
1
mirror of https://github.com/QuasarApp/CQtDeployer.git synced 2025-05-07 23:19:35 +00:00

fix rpath and path tests

This commit is contained in:
Andrei Yankovich 2020-01-28 15:25:35 +03:00
parent 6c297f30ec
commit 65719da588
7 changed files with 34 additions and 24 deletions

@ -46,7 +46,8 @@
"recOut": "rec",
"verbose": 3,
"qif": false,
"noAutoCheckQmake": false,
"noCheckRPATH": false,
"noCheckPATH": false,
"name": [
[
"package2",

@ -28,7 +28,8 @@
"recOut": "rec",
"verbose": 3,
"qif": false,
"noAutoCheckQmake": false,
"noCheckRPATH": false,
"noCheckPATH": false,
"name": "mainApplication",
"description": "this is description for default package",
"deployVersion": "1.0.0",

@ -863,9 +863,9 @@ bool ConfigParser::initQmake() {
if (qtList.isEmpty()) {
if (isNeededQt()) {
auto& env = DeployCore::_config->envirement;
auto proc = DeployCore::findProcess(env.concatEnv(), "qmake");
if (!QuasarAppUtils::Params::isEndable("noCheckPATH") && isNeededQt()) {
auto env = QProcessEnvironment::systemEnvironment();
auto proc = DeployCore::findProcess(env.value("PATH"), "qmake");
if (proc.isEmpty())
return false;

@ -209,7 +209,8 @@ QString DeployCore::help() {
{ " : which will not be compatible with equipment on users' hosts."},
{ " noTranslations : Skips the translations files." },
{ " | It doesn't work without qmake and inside a snap package" },
{ " -noAutoCheckQmake : Disables automatic search of paths to qmake in executable files." },
{ " noCheckRPATH : Disables automatic search of paths to qmake in executable files." },
{ " noCheckPATH : Disables automatic search of paths to qmake in system PATH." },
{ " -qmlOut [package;val,val] : Sets path to qml out directory" },
{ " -libOut [package;val,val] : Sets path to libraries out directory" },
{ " -trOut [package;val,val] : Sets path to translations out directory" },
@ -276,7 +277,8 @@ QStringList DeployCore::helpKeys() {
"version",
"verbose",
"qif",
"noAutoCheckQmake",
"noCheckRPATH",
"noCheckPATH",
"name",
"description",
"deployVersion",
@ -463,15 +465,13 @@ QString DeployCore::getMSVCVersion(MSVCVersion msvc) {
}
bool DeployCore::isQtLib(const QString &lib) {
if (_config) {
QFileInfo info((lib));
return _config->qtDir.isQt(PathUtils::toFullPath(info.absoluteFilePath()));
QFileInfo info((lib));
if (_config) {
return _config->qtDir.isQt(PathUtils::toFullPath(info.absoluteFilePath()));
}
auto info = QFileInfo(lib);
return isLib(info) && info.fileName().contains("Qt", ONLY_WIN_CASE_INSENSIATIVE);
return isLib(info) && info.fileName().contains("Qt", Qt::CaseInsensitive);
}
bool DeployCore::isExtraLib(const QString &lib) {

@ -64,7 +64,7 @@ bool ELF::getLibInfo(const QString &lib, LibInfo &info) const {
return false;
}
if (!QuasarAppUtils::Params::isEndable("noAutoCheckQmake")) {
if (!QuasarAppUtils::Params::isEndable("noCheckRPATH")) {
auto dynStr = getDynamicString(reader);
for (auto i = dynStr.rbegin(); i != dynStr.rend(); ++i) {

@ -768,7 +768,8 @@ void deploytest::testRelativeLink() {
void deploytest::testCheckQt() {
Deploy *deployer = new Deploy();
QuasarAppUtils::Params::parseParams({"-binDir", TestBinDir, "clear", "noAutoCheckQmake"});
QuasarAppUtils::Params::parseParams({"-binDir", TestBinDir, "clear",
"noCheckRPATH", "noCheckPATH"});
QVERIFY(deployer->prepare());
@ -1143,7 +1144,7 @@ void deploytest::testBinDir() {
runTestParams({"-binDir", TestBinDir, "clear",
"noAutoCheckQmake"}, &comapareTree);
"noCheckRPATH", "noCheckPATH"}, &comapareTree);
}
void deploytest::testConfFile() {
@ -1176,7 +1177,7 @@ void deploytest::testConfFile() {
"./" + DISTRO_DIR + "/quicknanobrowser.sh"});
#endif
runTestParams({"-bin", TestBinDir, "clear" , "noAutoCheckQmake",
runTestParams({"-bin", TestBinDir, "clear" , "noCheckRPATH", "noCheckPATH",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
@ -1189,11 +1190,11 @@ void deploytest::testConfFile() {
#ifdef Q_OS_UNIX
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets",
"clear", "noAutoCheckQmake",
"clear", "noCheckRPATH", "noCheckPATH",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
#else
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestQMLWidgets.exe",
"clear" , "-libDir", "L:/never/absalut/path",
"clear" , "-libDir", "L:/never/absalut/path", "noCheckPATH",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
#endif
@ -1251,11 +1252,11 @@ void deploytest::testConfFile() {
#ifdef Q_OS_UNIX
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets",
"clear" , "noAutoCheckQmake",
"clear" , "noCheckRPATH", "noCheckPATH",
"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree);
#else
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestQMLWidgets.exe",
"clear" ,
"clear" , "noCheckPATH",
"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree);
#endif
@ -1481,7 +1482,12 @@ void deploytest::testQt() {
"-qmake", qmake}, &comapareTree);
// test auto detection of detection qmake from PATH
runTestParams({"-bin", bin, "clear", "noAutoCheckQmake"}, &comapareTree);
runTestParams({"-bin", bin, "clear", "noCheckRPATH"}, &comapareTree);
#ifdef Q_OS_UNIX
// test auto detection of detection qmake from RPATH
runTestParams({"-bin", bin, "clear", "noCheckPATH"}, &comapareTree);
#endif
comapareTree = Modules::qtWithoutTr();

@ -72,7 +72,8 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
| | It doesn't work without qmake and inside a snap package |
| extractPlugins | This flag will cause cqtdeployer to retrieve dependencies from plugins. Starting with version 1.4, this option has been disabled by default, as it can add low-level graphics libraries to the distribution, which will not be compatible with equipment on users' hosts. |
| noOverwrite | Prevents replacing existing files. |
| noAutoCheckQmake | Disables automatic search of paths to qmake in executable files.|
| noCheckRPATH | Disables automatic search of paths to qmake in executable files.|
| noCheckPATH | Disables automatic search of paths to qmake in system PATH. |
| v / version | Shows compiled version |
@ -153,7 +154,8 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3
| noTranslations | Пропускает файлы переводов |
| | не работает без qmake и в snap |
| noOverwrite | Запрещает замену уже существующих файлов. |
| noAutoCheckQmake | Отключает автоматический поиск путей к qmake в исполняемых файлах.|
| noCheckRPATH | Отключает автоматический поиск путей к qmake в исполняемых файлах.|
| noCheckPATH | Отключает автоматический поиск путей к qmake в системном окружении. |
| v / version | Показывает версию приложения |