From 5b4fcfc76a30fa6dd990cd3af5829e40d1d37530 Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 11 Jan 2021 19:15:50 +0300 Subject: [PATCH 01/18] fix #396 "move system libs into lib/systemLibs folder" --- Deploy/deploycore.cpp | 4 ++ Deploy/deploycore.h | 7 ++++ Deploy/extra.cpp | 4 +- Deploy/extracter.cpp | 29 +++++++++----- Deploy/extracter.h | 9 ++++- Deploy/metafilemanager.cpp | 9 ++++- Deploy/packing.cpp | 3 +- UnitTests/testRes/TestQMLWidgets.sh | 2 +- UnitTests/tst_deploytest.cpp | 62 ++++++++++++++--------------- 9 files changed, 80 insertions(+), 49 deletions(-) diff --git a/Deploy/deploycore.cpp b/Deploy/deploycore.cpp index 8090739..78c8a35 100644 --- a/Deploy/deploycore.cpp +++ b/Deploy/deploycore.cpp @@ -708,6 +708,10 @@ bool DeployCore::checkSystemBakupSnapInterface() { return QDir(DeployCore::snapRootFS()).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).size(); } +QString DeployCore::systemLibsFolderName() { + return "systemLibs"; +} + uint qHash(WinAPI i) { return static_cast(i); } diff --git a/Deploy/deploycore.h b/Deploy/deploycore.h index 4e073a7..79c444d 100644 --- a/Deploy/deploycore.h +++ b/Deploy/deploycore.h @@ -251,6 +251,13 @@ public: static QString snapRootFS(); static QString transportPathToSnapRoot(const QString &path); static bool checkSystemBakupSnapInterface(); + + /** + * @brief systemLibsFolderName This method return name of the systems librares. + * @return Name of folder with system libraryes. + * @note see https://github.com/QuasarApp/CQtDeployer/issues/396 + */ + static QString systemLibsFolderName(); }; diff --git a/Deploy/extra.cpp b/Deploy/extra.cpp index d375b1e..1871c64 100644 --- a/Deploy/extra.cpp +++ b/Deploy/extra.cpp @@ -63,13 +63,13 @@ bool Extra::contains(const QString &path) const { return true; } - for (auto i: extraPathsMasks) { + for (const auto &i: extraPathsMasks) { if (PathUtils::fixPath(info.absoluteFilePath()).contains(i)) { return true; } } - for (auto i: extraNamesMasks) { + for (const auto &i: extraNamesMasks) { if (PathUtils::fixPath(info.fileName()).contains(i)) { return true; } diff --git a/Deploy/extracter.cpp b/Deploy/extracter.cpp index 7dfcaad..e2eb3d3 100644 --- a/Deploy/extracter.cpp +++ b/Deploy/extracter.cpp @@ -112,7 +112,8 @@ void Extracter::extractExtraDataTargets() { for (auto i = cfg->packages().cbegin(); i != cfg->packages().cend(); ++i) { auto &dep = _packageDependencyes[i.key()]; - for (const auto &target : i.value().extraData()) { + const auto extraDataList = i.value().extraData(); + for (const auto &target : extraDataList) { dep.addExtraData(target); } } @@ -137,7 +138,8 @@ void Extracter::copyExtraPlugins(const QString& package) { auto targetPath = cnf->getTargetDir() + "/" + package; auto distro = cnf->getDistroFromPackage(package); - for (auto extraPlugin : distro.extraPlugins()) { + auto extraPlugins = distro.extraPlugins(); + for (const auto &extraPlugin : extraPlugins) { info.setFile(extraPlugin); @@ -166,7 +168,7 @@ void Extracter::copyExtraPlugins(const QString& package) { QuasarAppUtils::Warning); } - for (const auto& plugin : plugins) { + for (const auto& plugin : qAsConst(plugins)) { extractPluginLib(plugin, package); } } @@ -190,7 +192,7 @@ void Extracter::extractPlugins() { _fileManager->copyFiles(plugins, targetPath + distro.getPluginsOutDir(), 1, DeployCore::debugExtensions(), &listItems); - for (const auto &item : listItems) { + for (const auto &item : qAsConst(listItems)) { extractPluginLib(item, i.key()); } @@ -199,13 +201,18 @@ void Extracter::extractPlugins() { } -void Extracter::copyLibs(const QSet &files, const QString& package) { +void Extracter::copyLibs(const QSet &files, const QString& package, bool system) { auto cnf = DeployCore::_config; auto targetPath = cnf->getTargetDir() + "/" + package; auto distro = cnf->getDistroFromPackage(package); + auto libOutpath = targetPath + distro.getLibOutDir(); + if (system) { + libOutpath += "/" + DeployCore::systemLibsFolderName(); + } + for (const auto &file : files) { - if (!_fileManager->smartCopyFile(file, targetPath + distro.getLibOutDir())) { + if (!_fileManager->smartCopyFile(file, libOutpath)) { QuasarAppUtils::Params::log(file + " not copied"); } } @@ -229,10 +236,10 @@ void Extracter::copyFiles() { for (auto i = cnf->packages().cbegin(); i != cnf->packages().cend(); ++i) { - copyLibs(_packageDependencyes[i.key()].neadedLibs(), i.key()); + copyLibs(_packageDependencyes[i.key()].neadedLibs(), i.key(), false); if (QuasarAppUtils::Params::isEndable("deploySystem")) { - copyLibs(_packageDependencyes[i.key()].systemLibs(), i.key()); + copyLibs(_packageDependencyes[i.key()].systemLibs(), i.key(), true); } @@ -399,7 +406,9 @@ bool Extracter::extractQml() { QStringList plugins; QStringList listItems; - for (const auto &qmlInput: distro.qmlInput()) { + const auto qmlImports = distro.qmlInput(); + + for (const auto &qmlInput: qmlImports) { QFileInfo info(qmlInput); if (!info.isDir()) { @@ -431,7 +440,7 @@ bool Extracter::extractQml() { return false; } - for (const auto &item : listItems) { + for (const auto &item : qAsConst(listItems)) { extractPluginLib(item, i.key()); } diff --git a/Deploy/extracter.h b/Deploy/extracter.h index b99bf2f..63415d8 100644 --- a/Deploy/extracter.h +++ b/Deploy/extracter.h @@ -73,7 +73,14 @@ private: void copyFiles(); void copyTr(); - void copyLibs(const QSet &files, const QString &package); + + /** + * @brief copyLibs This method copy input libraryes into libOut dir. + * @param files This is set of input libs + * @param package This is package id of deployement pacakge. + * @param system This option set for systems libraryes. If This option will be set to true then libOut dir will be changed to libOut/systemLibs. see https://github.com/QuasarApp/CQtDeployer/issues/396. + */ + void copyLibs(const QSet &files, const QString &package, bool system); void copyExtraData(const QSet &files, const QString &package); bool isWebEngine(const QString& package) const; diff --git a/Deploy/metafilemanager.cpp b/Deploy/metafilemanager.cpp index fdf951d..c6d025e 100644 --- a/Deploy/metafilemanager.cpp +++ b/Deploy/metafilemanager.cpp @@ -37,10 +37,12 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) { script.close(); } else { + auto systemLibsDir = distro.getLibOutDir() + DeployCore::systemLibsFolderName(); + content = "@echo off \n" "SET BASE_DIR=%~dp0\n" - "SET PATH=%BASE_DIR%" + distro.getLibOutDir() + ";%PATH%\n" + "SET PATH=%BASE_DIR%" + distro.getLibOutDir() + ";%PATH%;" + systemLibsDir + "\n" "%2\n" "call \"%BASE_DIR%" + distro.getBinOutDir() + "%0\" %1 \n"; @@ -91,11 +93,14 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { script.close(); } else { + + auto systemLibsDir = distro.getLibOutDir() + DeployCore::systemLibsFolderName(); + content = "#!/bin/sh\n" "BASE_DIR=$(dirname \"$(readlink -f \"$0\")\")\n" "export " - "LD_LIBRARY_PATH=\"$BASE_DIR\"" + distro.getLibOutDir() + ":\"$BASE_DIR\":$LD_LIBRARY_PATH\n" + "LD_LIBRARY_PATH=\"$BASE_DIR\"" + distro.getLibOutDir() + ":\"$BASE_DIR\":$LD_LIBRARY_PATH:" + systemLibsDir + "\n" "export QML_IMPORT_PATH=\"$BASE_DIR\"" + distro.getQmlOutDir() + ":$QML_IMPORT_PATH\n" "export QML2_IMPORT_PATH=\"$BASE_DIR\"" + distro.getQmlOutDir() + ":$QML2_IMPORT_PATH\n" "export QT_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + ":$QT_PLUGIN_PATH\n" diff --git a/Deploy/packing.cpp b/Deploy/packing.cpp index 76a1245..33438dd 100644 --- a/Deploy/packing.cpp +++ b/Deploy/packing.cpp @@ -46,7 +46,7 @@ bool Packing::create() { return false; } - for (auto package : _pakages) { + for (auto package : qAsConst(_pakages)) { if (!package) return false; @@ -90,7 +90,6 @@ bool Packing::create() { return false; } - auto exit = QString("exit code = %0").arg(_proc->exitCode()); QString stdoutLog = _proc->readAllStandardOutput(); QString erroutLog = _proc->readAllStandardError(); auto message = QString("message = %0").arg(stdoutLog + " " + erroutLog); diff --git a/UnitTests/testRes/TestQMLWidgets.sh b/UnitTests/testRes/TestQMLWidgets.sh index 02cbab8..9539b2c 100755 --- a/UnitTests/testRes/TestQMLWidgets.sh +++ b/UnitTests/testRes/TestQMLWidgets.sh @@ -1,6 +1,6 @@ #!/bin/sh BASE_DIR=$(dirname "$(readlink -f "$0")") -export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH +export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH:/lib/systemLibs export QML_IMPORT_PATH="$BASE_DIR"/q/and/q/:$QML_IMPORT_PATH export QML2_IMPORT_PATH="$BASE_DIR"/q/and/q/:$QML2_IMPORT_PATH export QT_PLUGIN_PATH="$BASE_DIR"/plugins/:$QT_PLUGIN_PATH diff --git a/UnitTests/tst_deploytest.cpp b/UnitTests/tst_deploytest.cpp index ad27ac6..1108e5c 100644 --- a/UnitTests/tst_deploytest.cpp +++ b/UnitTests/tst_deploytest.cpp @@ -2387,8 +2387,8 @@ void deploytest::testSystemLib() { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/TestOnlyC", - "./" + DISTRO_DIR + "/lib/libgcc_s.so", - "./" + DISTRO_DIR + "/lib/libstdc++.so" + "./" + DISTRO_DIR + "/lib/systemLibs/libgcc_s.so", + "./" + DISTRO_DIR + "/lib/systemLibs/libstdc++.so" }); #else @@ -2397,10 +2397,10 @@ void deploytest::testSystemLib() { { "./" + DISTRO_DIR + "/TestOnlyC.exe", "./" + DISTRO_DIR + "/TestOnlyC.bat", - "./" + DISTRO_DIR + "/libgcc_s_seh-1.dll", - "./" + DISTRO_DIR + "/libstdc++-6.dll", - "./" + DISTRO_DIR + "/libwinpthread-1.dll", - "./" + DISTRO_DIR + "/msvcrt.dll", + "./" + DISTRO_DIR + "/systemLibs/libgcc_s_seh-1.dll", + "./" + DISTRO_DIR + "/systemLibs/libstdc++-6.dll", + "./" + DISTRO_DIR + "/systemLibs/libwinpthread-1.dll", + "./" + DISTRO_DIR + "/systemLibs/msvcrt.dll", "./" + DISTRO_DIR + "/qt.conf" }); @@ -2426,12 +2426,12 @@ void deploytest::testSystemLib() { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/TestOnlyC", - "./" + DISTRO_DIR + "/lib/libgcc_s.so", - "./" + DISTRO_DIR + "/lib/ld-linux-x86-64.so", - "./" + DISTRO_DIR + "/lib/libc.so", - "./" + DISTRO_DIR + "/lib/libm.so", + "./" + DISTRO_DIR + "/lib/systemLibs/libgcc_s.so", + "./" + DISTRO_DIR + "/lib/systemLibs/ld-linux-x86-64.so", + "./" + DISTRO_DIR + "/lib/systemLibs/libc.so", + "./" + DISTRO_DIR + "/lib/systemLibs/libm.so", - "./" + DISTRO_DIR + "/lib/libstdc++.so" + "./" + DISTRO_DIR + "/lib/systemLibs/libstdc++.so" }); runTestParams({"-bin", bin, "clear" , @@ -2462,24 +2462,24 @@ void deploytest::testSystemLib() { comapareTree += utils.createTree( { - "./" + DISTRO_DIR + "/libgcc_s_seh-1.dll", - "./" + DISTRO_DIR + "/libstdc++-6.dll", - "./" + DISTRO_DIR + "/libwinpthread-1.dll", - "./" + DISTRO_DIR + "/msvcrt.dll", + "./" + DISTRO_DIR + "/systemLibs/libgcc_s_seh-1.dll", + "./" + DISTRO_DIR + "/systemLibs/libstdc++-6.dll", + "./" + DISTRO_DIR + "/systemLibs/libwinpthread-1.dll", + "./" + DISTRO_DIR + "/systemLibs/msvcrt.dll", "./" + DISTRO_DIR + "/qt.conf", - "./" + DISTRO_DIR + "/mpr.dll", - "./" + DISTRO_DIR + "/profapi.dll", - "./" + DISTRO_DIR + "/rpcrt4.dll", - "./" + DISTRO_DIR + "/shell32.dll", - "./" + DISTRO_DIR + "/userenv.dll", - "./" + DISTRO_DIR + "/uxtheme.dll", - "./" + DISTRO_DIR + "/version.dll", - "./" + DISTRO_DIR + "/ucrtbase.dll", - "./" + DISTRO_DIR + "/oleaut32.dll", - "./" + DISTRO_DIR + "/bcryptprimitives.dll", - "./" + DISTRO_DIR + "/msvcp_win.dll", - "./" + DISTRO_DIR + "/wtsapi32.dll", - "./" + DISTRO_DIR + "/combase.dll", + "./" + DISTRO_DIR + "/systemLibs/mpr.dll", + "./" + DISTRO_DIR + "/systemLibs/profapi.dll", + "./" + DISTRO_DIR + "/systemLibs/rpcrt4.dll", + "./" + DISTRO_DIR + "/systemLibs/shell32.dll", + "./" + DISTRO_DIR + "/systemLibs/userenv.dll", + "./" + DISTRO_DIR + "/systemLibs/uxtheme.dll", + "./" + DISTRO_DIR + "/systemLibs/version.dll", + "./" + DISTRO_DIR + "/systemLibs/ucrtbase.dll", + "./" + DISTRO_DIR + "/systemLibs/oleaut32.dll", + "./" + DISTRO_DIR + "/systemLibs/bcryptprimitives.dll", + "./" + DISTRO_DIR + "/systemLibs/msvcp_win.dll", + "./" + DISTRO_DIR + "/systemLibs/wtsapi32.dll", + "./" + DISTRO_DIR + "/systemLibs/combase.dll", }); @@ -2487,9 +2487,9 @@ void deploytest::testSystemLib() { #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) comapareTree += utils.createTree( { - "./" + DISTRO_DIR + "/d3d11.dll", - "./" + DISTRO_DIR + "/dxgi.dll", - "./" + DISTRO_DIR + "/win32u.dll", + "./" + DISTRO_DIR + "/systemLibs/d3d11.dll", + "./" + DISTRO_DIR + "/systemLibs/dxgi.dll", + "./" + DISTRO_DIR + "/systemLibs/win32u.dll", }); #endif From ec82eb1b1f5aab8a2f1e07620df563014a3ded14 Mon Sep 17 00:00:00 2001 From: EndrII Date: Tue, 12 Jan 2021 09:30:11 +0300 Subject: [PATCH 02/18] ref# #396 fix runScript --- Deploy/metafilemanager.cpp | 3 ++- UnitTests/testRes/TestQMLWidgets.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Deploy/metafilemanager.cpp b/Deploy/metafilemanager.cpp index c6d025e..e4dc4e5 100644 --- a/Deploy/metafilemanager.cpp +++ b/Deploy/metafilemanager.cpp @@ -100,7 +100,8 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { "#!/bin/sh\n" "BASE_DIR=$(dirname \"$(readlink -f \"$0\")\")\n" "export " - "LD_LIBRARY_PATH=\"$BASE_DIR\"" + distro.getLibOutDir() + ":\"$BASE_DIR\":$LD_LIBRARY_PATH:" + systemLibsDir + "\n" + "LD_LIBRARY_PATH=\"$BASE_DIR\"" + distro.getLibOutDir() + + ":\"$BASE_DIR\":$LD_LIBRARY_PATH:\"$BASE_DIR\"" + systemLibsDir + "\n" "export QML_IMPORT_PATH=\"$BASE_DIR\"" + distro.getQmlOutDir() + ":$QML_IMPORT_PATH\n" "export QML2_IMPORT_PATH=\"$BASE_DIR\"" + distro.getQmlOutDir() + ":$QML2_IMPORT_PATH\n" "export QT_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + ":$QT_PLUGIN_PATH\n" diff --git a/UnitTests/testRes/TestQMLWidgets.sh b/UnitTests/testRes/TestQMLWidgets.sh index 9539b2c..f07fdcd 100755 --- a/UnitTests/testRes/TestQMLWidgets.sh +++ b/UnitTests/testRes/TestQMLWidgets.sh @@ -1,6 +1,6 @@ #!/bin/sh BASE_DIR=$(dirname "$(readlink -f "$0")") -export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH:/lib/systemLibs +export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH:"$BASE_DIR"/lib/systemLibs export QML_IMPORT_PATH="$BASE_DIR"/q/and/q/:$QML_IMPORT_PATH export QML2_IMPORT_PATH="$BASE_DIR"/q/and/q/:$QML2_IMPORT_PATH export QT_PLUGIN_PATH="$BASE_DIR"/plugins/:$QT_PLUGIN_PATH From 881bebfee5e88ca740aac9136a1f42324998b7a4 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Sat, 6 Feb 2021 22:43:24 +0800 Subject: [PATCH 03/18] fix: Qt::SkipEmptyParts was introduced in Qt 5.14 https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum --- Deploy/defines.h | 2 +- Deploy/filemanager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Deploy/defines.h b/Deploy/defines.h index 595aa07..5f31045 100644 --- a/Deploy/defines.h +++ b/Deploy/defines.h @@ -9,7 +9,7 @@ #define DEFINES_H #include -#if QT_VERSION > QT_VERSION_CHECK(5, 13, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #define splitbehavior Qt::SkipEmptyParts #else #define splitbehavior QString::SkipEmptyParts diff --git a/Deploy/filemanager.cpp b/Deploy/filemanager.cpp index 0cb25e4..bd52ad3 100644 --- a/Deploy/filemanager.cpp +++ b/Deploy/filemanager.cpp @@ -447,7 +447,7 @@ QString FileManager::changeDistanation(const QString& absalutePath, QString basePath, int depch) { -#if QT_VERSION > QT_VERSION_CHECK(5, 13, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) auto prefixes = absalutePath.split(QRegExp("[\\/]"), Qt::SkipEmptyParts); #else auto prefixes = absalutePath.split(QRegExp("[\\/]"), QString::SkipEmptyParts); From 17275501cdc5057fa5f10a08b2faa2de396e2a0a Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Sun, 7 Feb 2021 09:10:50 +0800 Subject: [PATCH 04/18] refactor: use macro to reduce repetition Macro "splitbehavior" is defined in ./Deploy/defines.h . --- Deploy/filemanager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Deploy/filemanager.cpp b/Deploy/filemanager.cpp index bd52ad3..f963718 100644 --- a/Deploy/filemanager.cpp +++ b/Deploy/filemanager.cpp @@ -447,11 +447,7 @@ QString FileManager::changeDistanation(const QString& absalutePath, QString basePath, int depch) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) - auto prefixes = absalutePath.split(QRegExp("[\\/]"), Qt::SkipEmptyParts); -#else - auto prefixes = absalutePath.split(QRegExp("[\\/]"), QString::SkipEmptyParts); -#endif + auto prefixes = absalutePath.split(QRegExp("[\\/]"), splitbehavior); depch = std::min(depch, prefixes.size()); while (depch) { auto index = prefixes.size() - depch; From d99f84b57824135cdc6977892621bf2c9f6d5386 Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 8 Feb 2021 14:40:36 +0300 Subject: [PATCH 05/18] update pe parser lib --- Deploy/pe_type.cpp | 2 +- pe | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Deploy/pe_type.cpp b/Deploy/pe_type.cpp index 9e37eeb..fc52355 100644 --- a/Deploy/pe_type.cpp +++ b/Deploy/pe_type.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/pe b/pe index 1195247..ff37651 160000 --- a/pe +++ b/pe @@ -1 +1 @@ -Subproject commit 119524770cd85333a3c3daa4f9e58b2ee4067d9e +Subproject commit ff37651b9d733829c2fb67844e7ee928e6924918 From 41728a4df4d5a51750b82e593c6ab6ba670889b8 Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 8 Feb 2021 15:23:59 +0300 Subject: [PATCH 06/18] update pe (fix build ) --- pe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pe b/pe index ff37651..1db16de 160000 --- a/pe +++ b/pe @@ -1 +1 @@ -Subproject commit ff37651b9d733829c2fb67844e7ee928e6924918 +Subproject commit 1db16dee63b692964b5f889cc3c588e5b4bcc8f9 From dc2e5f50b0bb5d98b5fe61bbe2b1b6b0e2119b2d Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 8 Feb 2021 15:31:01 +0300 Subject: [PATCH 07/18] update pe --- pe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pe b/pe index 1db16de..f681c21 160000 --- a/pe +++ b/pe @@ -1 +1 @@ -Subproject commit 1db16dee63b692964b5f889cc3c588e5b4bcc8f9 +Subproject commit f681c21b7b2c6232b3252a4025a4b94c8d960d65 From 9bddc81a2b286ade2c05dbd95f214de3cc772029 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Sun, 7 Feb 2021 08:16:44 +0800 Subject: [PATCH 08/18] fix: allow testing on Qt 5.12 and later version https://github.com/QuasarApp/CQtDeployer/commit/55d9d6e203ca5ce5e71ee9b1cc321146991ed15d#r46825354 --- CQtDeployer.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CQtDeployer.pro b/CQtDeployer.pro index 83c4bd6..b66950f 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -8,7 +8,7 @@ TEMPLATE = subdirs CONFIG += ordered -lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 14) { +lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { message(Tests is disabled!) DEFINES += WITHOUT_TESTS } From 791b3bf62711ff1c6313063f2eb96d0bece7105a Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Sun, 7 Feb 2021 08:37:55 +0800 Subject: [PATCH 09/18] feat: warn users that the tests are disable Using a warning is more noticeable than a message. --- CQtDeployer.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CQtDeployer.pro b/CQtDeployer.pro index b66950f..fe654b1 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -9,7 +9,7 @@ TEMPLATE = subdirs CONFIG += ordered lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { - message(Tests is disabled!) + warning("Tests are only enabled on Qt 5.12.0 or later version. You are using $$[QT_VERSION].") DEFINES += WITHOUT_TESTS } From 0b5f6b2a8e56021b492f1256f4fd1db62bf8ac46 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Tue, 9 Feb 2021 10:48:58 +0800 Subject: [PATCH 10/18] feat: completely disable tests if WITHOUT_TESTS Don't generate any test targets (test and deployTest) if CONFIG contains WITHOUT_TESTS. --- CQtDeployer.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CQtDeployer.pro b/CQtDeployer.pro index fe654b1..0b94329 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -35,6 +35,8 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { tests/TestQMLWidgets \ tests/quicknanobrowser \ tests/webui + } else { + include($$PWD/test.pri) } CQtDeployer.depends=QuasarAppLib @@ -52,5 +54,4 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { } - include($$PWD/test.pri) From cae9981e5bf62ccd13c1110ff3ddfc5a614448cf Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Tue, 9 Feb 2021 11:47:55 +0800 Subject: [PATCH 11/18] Revert "completely disable tests if WITHOUT_TESTS" This reverts commit 0b5f6b2a8e56021b492f1256f4fd1db62bf8ac46. --- CQtDeployer.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CQtDeployer.pro b/CQtDeployer.pro index 0b94329..fe654b1 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -35,8 +35,6 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { tests/TestQMLWidgets \ tests/quicknanobrowser \ tests/webui - } else { - include($$PWD/test.pri) } CQtDeployer.depends=QuasarAppLib @@ -54,4 +52,5 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { } + include($$PWD/test.pri) From 165b30e464e0e678689dbe398b6abb6761621c9d Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Tue, 9 Feb 2021 11:57:49 +0800 Subject: [PATCH 12/18] feat: create an empty target for Android There is no need to build and test for Android. In order to pass CI, leave an empty test target. --- test.pri | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test.pri b/test.pri index 46bd05b..7b2b264 100644 --- a/test.pri +++ b/test.pri @@ -10,12 +10,14 @@ contains(QMAKE_HOST.os, Linux):{ DEPLOYER=cqtdeployer win32:DEPLOYER=$$(cqtdeployer) +test.commands = deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4 - -!android:test.depends = deployTest -unix:!android:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000 -win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o buildLog.log +!android { + test.depends = deployTest + unix:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000 + win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o buildLog.log +} contains(QMAKE_HOST.os, Linux):{ win32:test.commands = From ff9690b1155d40355a3adbe433cc9cf080298e5b Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Tue, 9 Feb 2021 12:27:09 +0800 Subject: [PATCH 13/18] feat: leave an empty test target if WITHOUT_TESTS Patch for 165b30e464e0e678689dbe398b6abb6761621c9d . If we are on Android, add WITHOUT_TESTS to CONFIG. If CONFIG contains WITHOUT_TESTS, "make test" should not perform any operation. --- CQtDeployer.pro | 1 + test.pri | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CQtDeployer.pro b/CQtDeployer.pro index fe654b1..bd6135e 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -12,6 +12,7 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) { warning("Tests are only enabled on Qt 5.12.0 or later version. You are using $$[QT_VERSION].") DEFINES += WITHOUT_TESTS } +android: DEFINES += WITHOUT_TESTS !android { SUBDIRS += QuasarAppLib \ diff --git a/test.pri b/test.pri index 7b2b264..f7b7895 100644 --- a/test.pri +++ b/test.pri @@ -13,7 +13,7 @@ win32:DEPLOYER=$$(cqtdeployer) test.commands = deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4 -!android { +!contains(DEFINES, WITHOUT_TESTS) { test.depends = deployTest unix:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000 win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o buildLog.log From d419925855e047e9a9a35a004021f8b16eaf8032 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Tue, 9 Feb 2021 22:25:45 +0800 Subject: [PATCH 14/18] refactor: semantically separate irrelevant tests The two parts of the test before and after the removed directive "#else" are almost irrelevant. The one is to deploy system libs and libc on Linux, and the other is to deploy Qt libs and system libs on Windows. --- UnitTests/tst_deploytest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UnitTests/tst_deploytest.cpp b/UnitTests/tst_deploytest.cpp index 57daaf2..bc09d03 100644 --- a/UnitTests/tst_deploytest.cpp +++ b/UnitTests/tst_deploytest.cpp @@ -2514,7 +2514,9 @@ void deploytest::testSystemLib() { QVERIFY(runScript.contains("export LD_PRELOAD=")); -# else +#endif + +#ifdef Q_OS_WIN QString qmake = TestQtDir + "bin/qmake.exe"; bin = TestBinDir + "QtWidgetsProject.exe"; From 3cb7ee820a8816d46ea7f3d5f29549b5807616ae Mon Sep 17 00:00:00 2001 From: EndrII Date: Fri, 12 Feb 2021 16:08:28 +0300 Subject: [PATCH 15/18] fix #524 "added tr option for control custom translations " --- Deploy/configparser.cpp | 11 +++++++++-- Deploy/deployconfig.cpp | 12 ++++++++++++ Deploy/deployconfig.h | 7 +++++++ Deploy/deploycore.cpp | 5 +++-- Deploy/distromodule.cpp | 12 ++++++++++++ Deploy/distromodule.h | 10 ++++++++++ Deploy/extracter.cpp | 19 +++++++++++++++---- Deploy/extracter.h | 2 +- UnitTests/res.qrc | 1 + UnitTests/tst_deploytest.cpp | 21 +++++++++++++++++++++ docs/en/Options.md | 4 +++- docs/ru/Options.md | 1 + 12 files changed, 95 insertions(+), 10 deletions(-) diff --git a/Deploy/configparser.cpp b/Deploy/configparser.cpp index 17aa839..92735ae 100644 --- a/Deploy/configparser.cpp +++ b/Deploy/configparser.cpp @@ -319,8 +319,8 @@ bool ConfigParser::loadFromFile(const QString& confFile) { } auto obj = doc.object(); - - for (const auto &key: obj.keys()) { + const auto keys = obj.keys(); + for (const auto &key: keys) { readKey(key, obj, confFilePath); } @@ -387,6 +387,8 @@ bool ConfigParser::initDistroStruct() { auto extraData = QuasarAppUtils::Params::getStrArg("extraData"). split(DeployCore::getSeparator(0), splitbehavior); + auto trData = QuasarAppUtils::Params::getStrArg("tr"). + split(DeployCore::getSeparator(0), splitbehavior); // init distro stucts for all targets if (binOut.size() && !parsePackagesPrivate(mainDistro, binOut, &DistroModule::setBinOutDir)) { @@ -469,6 +471,11 @@ bool ConfigParser::initDistroStruct() { return false; } + if (trData.size() && !parsePackagesPrivate(mainDistro, trData, &DistroModule::addTr)) { + packagesErrorLog("tr"); + return false; + } + return true; } diff --git a/Deploy/deployconfig.cpp b/Deploy/deployconfig.cpp index 6a1beac..fc1a9dc 100644 --- a/Deploy/deployconfig.cpp +++ b/Deploy/deployconfig.cpp @@ -31,6 +31,18 @@ QString DeployConfig::getTargetDir(const QString &target) const { return targetDir; } +QString DeployConfig::getPackageTargetDir(const QString &package) const { + if (!_packages.contains(package)) { +#ifdef QT_DEBUG + abort(); +#endif + return ""; + } + + return targetDir + "/" + package; + +} + void DeployConfig::setTargetDir(const QString &target) { targetDir = target; diff --git a/Deploy/deployconfig.h b/Deploy/deployconfig.h index 5f583ef..9138989 100644 --- a/Deploy/deployconfig.h +++ b/Deploy/deployconfig.h @@ -72,6 +72,13 @@ public: */ QString getTargetDir(const QString& target = "") const; + /** + * @brief getPackageTargetDir This method return the target dif of the package. + * @param package This is id of the package + * @return target diractory path + */ + QString getPackageTargetDir(const QString& package) const; + /** * @brief setTargetDir * @param target diff --git a/Deploy/deploycore.cpp b/Deploy/deploycore.cpp index 7e2759c..649711c 100644 --- a/Deploy/deploycore.cpp +++ b/Deploy/deploycore.cpp @@ -244,7 +244,7 @@ void DeployCore::help() { {"-runScript [list,parems]", "forces cqtdeployer swap default run script to new from the arguments of option." " This option copy all content from input file and insert all code into runScript.sh or .bat" " Example of use: cqtdeployer -runScript \"myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh\""}, - + {"-tr [list,params]", "Adds qm files into the translations folder."}, {"-verbose [0-3]", "Shows debug log"}, } @@ -364,7 +364,8 @@ QStringList DeployCore::helpKeys() { "deb", "allowEmptyPackages", "runScript", - "getDefaultTemplate" + "getDefaultTemplate", + "tr" }; } diff --git a/Deploy/distromodule.cpp b/Deploy/distromodule.cpp index 88f16d1..5839fc0 100644 --- a/Deploy/distromodule.cpp +++ b/Deploy/distromodule.cpp @@ -156,6 +156,18 @@ void DistroModule::setKey(const QString &key) { _key = key; } +QSet DistroModule::tr() const { + return _tr; +} + +void DistroModule::setTr(const QSet &tr) { + _tr = tr; +} + +void DistroModule::addTr(const QString &tr) { + _tr += tr; +} + QSet DistroModule::extraData() const { return _extraData; } diff --git a/Deploy/distromodule.h b/Deploy/distromodule.h index 14ab916..fdd8561 100644 --- a/Deploy/distromodule.h +++ b/Deploy/distromodule.h @@ -73,6 +73,10 @@ public: void setExtraData(const QSet &extraFiles); void addExtraData(const QString &extraFile); + QSet tr() const; + void setTr(const QSet &tr); + void addTr(const QString &tr); + protected: void setKey(const QString &key); @@ -94,8 +98,14 @@ private: QSet _enabled; QSet _disabled; QSet _extraPlugins; + + // extra data QSet _extraData; + // extra translations + QSet _tr; + + }; #endif // DISTROMODULE_H diff --git a/Deploy/extracter.cpp b/Deploy/extracter.cpp index 5ffb4cd..12ff796 100644 --- a/Deploy/extracter.cpp +++ b/Deploy/extracter.cpp @@ -250,21 +250,28 @@ void Extracter::copyFiles() { } } -void Extracter::copyTr() { +bool Extracter::copyTr() { if (!QuasarAppUtils::Params::isEndable("noTranslations")) { auto cnf = DeployCore::_config; - for (auto i = cnf->packages().cbegin(); i != cnf->packages().cend(); ++i) { if (!copyTranslations(DeployCore::extractTranslation(_packageDependencyes[i.key()].neadedLibs()), i.key())) { QuasarAppUtils::Params::log("Failed to copy standard Qt translations", QuasarAppUtils::Warning); } - } + const auto trFiles = i->tr(); + for (const auto &tr: trFiles) { + if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) { + return false; + } + } + } } + + return true; } bool Extracter::deploy() { @@ -287,7 +294,11 @@ bool Extracter::deploy() { copyFiles(); - copyTr(); + if (!copyTr()) { + QuasarAppUtils::Params::log("Fail to copy translations", QuasarAppUtils::Error); + + return false; + }; if (!extractWebEngine()) { QuasarAppUtils::Params::log("deploy webEngine failed", QuasarAppUtils::Error); diff --git a/Deploy/extracter.h b/Deploy/extracter.h index 7528d29..5673d9f 100644 --- a/Deploy/extracter.h +++ b/Deploy/extracter.h @@ -72,7 +72,7 @@ private: void extractPlugins(); void copyFiles(); - void copyTr(); + bool copyTr(); /** * @brief copyLibs This method copy input libraryes into libOut dir. diff --git a/UnitTests/res.qrc b/UnitTests/res.qrc index c2fba52..f348765 100644 --- a/UnitTests/res.qrc +++ b/UnitTests/res.qrc @@ -18,5 +18,6 @@ testRes/TestQMLWidgets.sh testRes/testMultiPackageConfig.json testRes/customRunScript.sh + testRes/TestTr.qm diff --git a/UnitTests/tst_deploytest.cpp b/UnitTests/tst_deploytest.cpp index 57daaf2..7d5dc89 100644 --- a/UnitTests/tst_deploytest.cpp +++ b/UnitTests/tst_deploytest.cpp @@ -176,6 +176,7 @@ private slots: void testRunScripts(); void testGetDefaultTemplate(); void testDeployGeneralFiles(); + void testTr(); void customTest(); }; @@ -1167,6 +1168,26 @@ void deploytest::testDeployGeneralFiles() { }, &comapareTree); } +void deploytest::testTr() { + TestUtils utils; +#ifdef Q_OS_UNIX + QString bin = TestBinDir + "QtWidgetsProject"; + QString qmake = TestQtDir + "bin/qmake"; + +#else + QString bin = TestBinDir + "QtWidgetsProject.exe"; + QString qmake = TestQtDir + "bin/qmake.exe"; + +#endif + auto comapareTree = TestModule.qtLibs(); + + comapareTree += utils.createTree({"./" + DISTRO_DIR + "/translations/TestTr.qm"}); + + runTestParams({"-bin", bin, "clear" , + "-tr", ":/testResurces/testRes/TestTr.qm", + "-qmake", qmake}, &comapareTree); +} + void deploytest::customTest() { // runTestParams({"-confFile", "path", // "qifFromSystem"}); diff --git a/docs/en/Options.md b/docs/en/Options.md index 552bf91..521d2af 100644 --- a/docs/en/Options.md +++ b/docs/en/Options.md @@ -81,13 +81,14 @@ cqtdeployer -option1 value1 -option2 list, of, values ​​flag1 flag2 flag3 | -recursiveDepth [params] | Sets the Depth of recursive search of libs and ignoreEnv (default 0) | | -targetDir [params] | Sets target directory(by default it is the path to the first deployable file)| | -runScript [list,parems] | forces cqtdeployer swap default run script to new from the arguments of option. This option copy all content from input file and insert all code into runScript.sh or .bat. Example of use: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh"| +| -tr [list,parems] | Adds qm files into the translations folder. | | -verbose [0-3] | Shows debug log | ### Controll of packages options | Option | Descriptiion | |-----------------------------|-----------------------------------------------------------| -| -targetPackage [package;tar1,package;tar2]| Creates a new package and adds 'tar1 and tar2' to it | +| -targetPackage [package;tar1,package;tar2]| Creates a new package and adds 'tar1 and tar2' to it | | -qmlOut [package;path,path] | Sets path to qml out directory | | -libOut [package;path,path] | Sets path to libraries out directory | | -trOut [package;path,path] | Sets path to translations out directory | @@ -105,6 +106,7 @@ cqtdeployer -option1 value1 -option2 list, of, values ​​flag1 flag2 flag3 | -prefix [package;val,val] | Sets the prefix for the package relatively a target directory | | -extraData [package;val,val]| Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure.| + ### Plugins Controll Options | Option | Descriptiion | diff --git a/docs/ru/Options.md b/docs/ru/Options.md index f115e9c..d7f6aa0 100644 --- a/docs/ru/Options.md +++ b/docs/ru/Options.md @@ -75,6 +75,7 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | -recursiveDepth [params] | Устанавливает глубину поиска библиотек и глубину игнорирования окружения для ignoreEnv (по умолчанию 0) | | -targetDir [params] | Устанавливает целевой каталог (по умолчанию это путь к первому развертываемому файлу)| | -runScript [list,parems] | заставляет cqtdeployer заменить сценарий запуска по умолчанию на новый из аргументов параметра. Эта опция копирует все содержимое из входного файла и вставляет весь код в runScript.sh или .bat. Пример использования: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh"| +| -tr [list,parems] | Добавляет qm файлы в папку переводов. | | -verbose [0-3] | Показывает дебаг лога | ### Параметры управлениями пакетами: From c3a0ab67d333f899c5a9b8acc67b8be7e90ee51c Mon Sep 17 00:00:00 2001 From: EndrII Date: Fri, 12 Feb 2021 16:10:22 +0300 Subject: [PATCH 16/18] ref #524 "fix documentation" --- Deploy/deploycore.cpp | 3 ++- docs/en/Options.md | 2 +- docs/ru/Options.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Deploy/deploycore.cpp b/Deploy/deploycore.cpp index 649711c..dca0208 100644 --- a/Deploy/deploycore.cpp +++ b/Deploy/deploycore.cpp @@ -244,7 +244,6 @@ void DeployCore::help() { {"-runScript [list,parems]", "forces cqtdeployer swap default run script to new from the arguments of option." " This option copy all content from input file and insert all code into runScript.sh or .bat" " Example of use: cqtdeployer -runScript \"myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh\""}, - {"-tr [list,params]", "Adds qm files into the translations folder."}, {"-verbose [0-3]", "Shows debug log"}, } @@ -270,6 +269,8 @@ void DeployCore::help() { {"-homePage [package;val,val]", "Sets the home page url for a package"}, {"-prefix [package;val,val]", "Sets the prefix for the package relatively a target directory "}, {"-extraData [package;val,val]", "Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure."}, + {"-tr [package;val,val]", "Adds qm files into the translations folder."}, + } }, diff --git a/docs/en/Options.md b/docs/en/Options.md index 521d2af..c63858a 100644 --- a/docs/en/Options.md +++ b/docs/en/Options.md @@ -81,7 +81,6 @@ cqtdeployer -option1 value1 -option2 list, of, values ​​flag1 flag2 flag3 | -recursiveDepth [params] | Sets the Depth of recursive search of libs and ignoreEnv (default 0) | | -targetDir [params] | Sets target directory(by default it is the path to the first deployable file)| | -runScript [list,parems] | forces cqtdeployer swap default run script to new from the arguments of option. This option copy all content from input file and insert all code into runScript.sh or .bat. Example of use: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh"| -| -tr [list,parems] | Adds qm files into the translations folder. | | -verbose [0-3] | Shows debug log | ### Controll of packages options @@ -105,6 +104,7 @@ cqtdeployer -option1 value1 -option2 list, of, values ​​flag1 flag2 flag3 | -homePage [package;val,val] | Sets the homepage url for a package | | -prefix [package;val,val] | Sets the prefix for the package relatively a target directory | | -extraData [package;val,val]| Adds the extra files or directories like a target. The selected directory will be copy to the extraDataOut location with save own structure.| +| -tr [package;val,val] | Adds qm files into the translations folder. | ### Plugins Controll Options diff --git a/docs/ru/Options.md b/docs/ru/Options.md index d7f6aa0..9535873 100644 --- a/docs/ru/Options.md +++ b/docs/ru/Options.md @@ -75,7 +75,6 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | -recursiveDepth [params] | Устанавливает глубину поиска библиотек и глубину игнорирования окружения для ignoreEnv (по умолчанию 0) | | -targetDir [params] | Устанавливает целевой каталог (по умолчанию это путь к первому развертываемому файлу)| | -runScript [list,parems] | заставляет cqtdeployer заменить сценарий запуска по умолчанию на новый из аргументов параметра. Эта опция копирует все содержимое из входного файла и вставляет весь код в runScript.sh или .bat. Пример использования: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh"| -| -tr [list,parems] | Добавляет qm файлы в папку переводов. | | -verbose [0-3] | Показывает дебаг лога | ### Параметры управлениями пакетами: @@ -99,6 +98,7 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | -homePage [package;val,val] | Установит URL-адрес домашней страницы для пакета | | -prefix [package;val,val] | Устанавливает префикс для пакета относительно целевого каталога | | -extraData [package;val,val]| Добавляет дополнительные файлы или каталоги как цель. Выбранный каталог будет скопирован в расположение extraDataOut с сохранением собственной структуры.| +| -tr [package;val,val] | Добавляет qm файлы в папку переводов. | ### Параметры управления плагинами: From 0e26cb5e1ce59e1c916ad79ede9b824c50bb1148 Mon Sep 17 00:00:00 2001 From: EndrII Date: Fri, 12 Feb 2021 16:16:03 +0300 Subject: [PATCH 17/18] added test tr.qm file --- UnitTests/testRes/TestTr.qm | 1 + 1 file changed, 1 insertion(+) create mode 100755 UnitTests/testRes/TestTr.qm diff --git a/UnitTests/testRes/TestTr.qm b/UnitTests/testRes/TestTr.qm new file mode 100755 index 0000000..5027904 --- /dev/null +++ b/UnitTests/testRes/TestTr.qm @@ -0,0 +1 @@ +TEST TR From 52db06e66bf934f4e67572d74a45bc2a5e877505 Mon Sep 17 00:00:00 2001 From: EndrII Date: Fri, 12 Feb 2021 16:18:21 +0300 Subject: [PATCH 18/18] v1.5.0.24 Alpha --- Deploy/Deploy.pro | 2 +- QIFData/config/configLinux.xml | 2 +- QIFData/config/configWin.xml | 2 +- QIFData/packages/cqtdeployer.1_5/meta/package.xml | 2 +- snap/gui/cqtdeployer.desktop | 4 ++-- snap/snapcraft.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Deploy/Deploy.pro b/Deploy/Deploy.pro index 2d6a472..26a0ce1 100644 --- a/Deploy/Deploy.pro +++ b/Deploy/Deploy.pro @@ -19,7 +19,7 @@ TEMPLATE = lib DEFINES += DEPLOY_LIBRARY -VERSION = 1.5.0.23 +VERSION = 1.5.0.24 DEFINES += APP_VERSION='\\"$$VERSION\\"' diff --git a/QIFData/config/configLinux.xml b/QIFData/config/configLinux.xml index de5fd26..c171144 100644 --- a/QIFData/config/configLinux.xml +++ b/QIFData/config/configLinux.xml @@ -3,7 +3,7 @@ 640px 400px CQtDeployer - 1.5.0.23 + 1.5.0.24 CQtDeployer QuasarApp CQtDeployer diff --git a/QIFData/config/configWin.xml b/QIFData/config/configWin.xml index b7056d7..935c9e7 100644 --- a/QIFData/config/configWin.xml +++ b/QIFData/config/configWin.xml @@ -3,7 +3,7 @@ 640px 400px CQtDeployer - 1.5.0.23 + 1.5.0.24 CQtDeployer QuasarApp CQtDeployer diff --git a/QIFData/packages/cqtdeployer.1_5/meta/package.xml b/QIFData/packages/cqtdeployer.1_5/meta/package.xml index ac3ce20..1b303c3 100644 --- a/QIFData/packages/cqtdeployer.1_5/meta/package.xml +++ b/QIFData/packages/cqtdeployer.1_5/meta/package.xml @@ -2,7 +2,7 @@ CQtDeployer 1.5 Alpha CQtDeployer 1.5 Alpha. Do not use this version because it is unstable and may lead to unwanted bugs or consequences. Use this version exclusively for testing new functionality. - 1.5.0.23 + 1.5.0.24 true false diff --git a/snap/gui/cqtdeployer.desktop b/snap/gui/cqtdeployer.desktop index b468494..874e6b4 100755 --- a/snap/gui/cqtdeployer.desktop +++ b/snap/gui/cqtdeployer.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Version=1.5.0.23 +Version=1.5.0.24 Name=CQtDeployer Comment=CQtDeployer Help. Exec=cqtdeployer @@ -10,6 +10,6 @@ Categories=Application; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=CQtDeployer X-GNOME-Bugzilla-Component=General -X-GNOME-Bugzilla-Version=1.5.0.23 +X-GNOME-Bugzilla-Version=1.5.0.24 StartupNotify=true Name[ru_RU]=CQtDeployer diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 984855c..2dfd109 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -6,7 +6,7 @@ # name: cqtdeployer # you probably want to 'snapcraft register ' -version: '1.5.0.23' # just for humans, typically '1.2+git' or '1.3.2' +version: '1.5.0.24' # just for humans, typically '1.2+git' or '1.3.2' summary: deploy your qt projects # 79 char long summary description: | Console app for deploy qt libs.