diff --git a/Deploy/Deploy.pro b/Deploy/Deploy.pro index 72d38c9..2d6a472 100644 --- a/Deploy/Deploy.pro +++ b/Deploy/Deploy.pro @@ -19,7 +19,7 @@ TEMPLATE = lib DEFINES += DEPLOY_LIBRARY -VERSION = 1.5.0.15 +VERSION = 1.5.0.23 DEFINES += APP_VERSION='\\"$$VERSION\\"' @@ -63,6 +63,7 @@ SOURCES += \ extracter.cpp \ filemanager.cpp \ Distributions/idistribution.cpp \ + generalfiles_type.cpp \ ignorerule.cpp \ metafilemanager.cpp \ packagecontrol.cpp \ @@ -77,6 +78,7 @@ SOURCES += \ qml.cpp \ libinfo.cpp \ qtdir.cpp \ + targetdata.cpp \ targetinfo.cpp \ zipcompresser.cpp @@ -100,6 +102,7 @@ HEADERS += \ extracter.h \ filemanager.h \ Distributions/idistribution.h \ + generalfiles_type.h \ ignorerule.h \ metafilemanager.h \ packagecontrol.h \ @@ -114,6 +117,7 @@ HEADERS += \ qml.h \ libinfo.h \ qtdir.h \ + targetdata.h \ targetinfo.h \ zipcompresser.h diff --git a/Deploy/Distributions/deb.cpp b/Deploy/Distributions/deb.cpp index b3833af..d21a25a 100644 --- a/Deploy/Distributions/deb.cpp +++ b/Deploy/Distributions/deb.cpp @@ -8,7 +8,7 @@ Deb::Deb(FileManager *fileManager): iDistribution(fileManager) { - setLocation("tmp DEB"); + setLocation("defaultDEBTemplate"); } bool Deb::deployTemplate(PackageControl &pkg) { @@ -87,7 +87,7 @@ QProcessEnvironment Deb::processEnvirement() const { QList Deb::runCmd() { QList res; - for (const auto& dir: packageFolders) { + for (const auto& dir: qAsConst(packageFolders)) { res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << dir}); } diff --git a/Deploy/Distributions/idistribution.cpp b/Deploy/Distributions/idistribution.cpp index 8a13106..6f052a8 100644 --- a/Deploy/Distributions/idistribution.cpp +++ b/Deploy/Distributions/idistribution.cpp @@ -11,6 +11,7 @@ #include #include #include +#include iDistribution::~iDistribution() = default; @@ -46,11 +47,17 @@ bool iDistribution::unpackFile(const QFileInfo &resource, QByteArray inputData = file.readAll(); file.close(); - if (!QDir().mkpath(target)) + if (!QDir().mkpath(target)) { + QuasarAppUtils::Params::log(QString("impossible to create path : %0 ").arg(target), + QuasarAppUtils::Error); return false; + } + file.setFileName(target + "/" + resource.fileName()); if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { + QuasarAppUtils::Params::log(QString("impossible to write in file: %0 ").arg(file.fileName()), + QuasarAppUtils::Error); return false; } @@ -195,8 +202,8 @@ bool iDistribution::collectInfo(const DistroModule& pkg, cmdArray += ","; bashArray += " "; } - cmdArray += "\"" + releativeLocation(pkg) + "/" + fileinfo.fileName() + "\""; - bashArray += fileinfo.fileName(); + cmdArray += "\"" + releativeLocation(pkg) + "/" + fileinfo.baseName() + "\""; + bashArray += fileinfo.baseName(); } } cmdArray += "]"; @@ -242,6 +249,10 @@ bool iDistribution::deployIcon(TemplateInfo &info ,const DistroModule& pkg) { QFileInfo iconInfo(pkg.icon()); info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName(); if (!copyFile(pkg.icon(), localData + "/icons/", false)) { + + QuasarAppUtils::Params::log(QString("fail to copy icon: %0 ").arg(pkg.icon()), + QuasarAppUtils::Error); + return false; } } diff --git a/Deploy/Distributions/qif.cpp b/Deploy/Distributions/qif.cpp index 97799b6..68a8d1b 100644 --- a/Deploy/Distributions/qif.cpp +++ b/Deploy/Distributions/qif.cpp @@ -12,7 +12,7 @@ QIF::QIF(FileManager *fileManager) :iDistribution(fileManager){ - setLocation("tmp QIF"); + setLocation("defaultQIFWTemplate"); }; diff --git a/Deploy/Distributions/ziparhive.cpp b/Deploy/Distributions/ziparhive.cpp index bddc027..58b819f 100644 --- a/Deploy/Distributions/ziparhive.cpp +++ b/Deploy/Distributions/ziparhive.cpp @@ -10,10 +10,11 @@ ZipArhive::ZipArhive(FileManager *fileManager) :iDistribution(fileManager) { - setLocation("tmp zip"); + setLocation("defaultZIPTemplate"); } bool ZipArhive::deployTemplate(PackageControl &pkg) { + // default template const DeployConfig *cfg = DeployCore::_config; diff --git a/Deploy/configparser.cpp b/Deploy/configparser.cpp index 4cd758d..17aa839 100644 --- a/Deploy/configparser.cpp +++ b/Deploy/configparser.cpp @@ -45,20 +45,16 @@ bool parsePackagesPrivate(Container& mainContainer, for (const auto& str: inputParamsList) { auto paramsList = str.split(DeployCore::getSeparator(1)); auto first = paramsList.value(0, ""); - auto second = paramsList.value(1, ""); if (paramsList.size() == 1) (valueLink(mainContainer, defaultPackage, DistroModule{defaultPackage}).*adder)(first); else { - - bool skipError = QuasarAppUtils::Params::isEndable("allowEmptyPackages"); first = PathUtils::fullStripPath(first); if (!skipError && !mainContainer.contains(first)) { return false; } - for (int i = 1; i < paramsList.size(); ++i) { (valueLink(mainContainer, first, DistroModule{first}).*adder)(paramsList[i]); } @@ -137,6 +133,20 @@ bool ConfigParser::parseParams() { break; } + case RunMode::Template: { + + QuasarAppUtils::Params::log("Extract defaults Templates ...", + QuasarAppUtils::Info); + + if (!parseDeployMode()) { + QuasarAppUtils::Params::log("Extract defaults Templates is failed!", + QuasarAppUtils::Error); + return false; + } + + break; + } + } DeployCore::_config = &_config; @@ -473,29 +483,32 @@ bool ConfigParser::initPackages() { for (auto& str: tar_packages_array) { - auto pair = str.split(DeployCore::getSeparator(1)); - auto package = PathUtils::fullStripPath(pair.value(0, "")); + auto paramsList = str.split(DeployCore::getSeparator(1)); + auto package = PathUtils::fullStripPath(paramsList.value(0, "")); - auto list = _config.getTargetsListByFilter(pair.value(1, "")); + for (int i = 1; i < paramsList.size(); ++i) { + auto targetPattern = paramsList.value(i); + auto list = _config.getTargetsListByFilter(targetPattern); - if (!list.size()) { - auto warning = QString("You create the %0 package with the %1 pattern, " - "but no matches were found for this pattern. "). - arg(package, pair.value(1, "")); - QuasarAppUtils::Params::log(warning, QuasarAppUtils::Warning); - continue; - } - - for (auto it = list.begin(); it != list.end(); ++it) { - if (!configuredTargets.contains(it.key())) { - configuredTargets.insert(it.key()); - it.value()->setPackage(package); + if (!list.size()) { + auto warning = QString("You create the %0 package with the %1 pattern, " + "but no matches were found for this pattern. "). + arg(package, targetPattern); + QuasarAppUtils::Params::log(warning, QuasarAppUtils::Warning); + continue; } + + for (auto it = list.begin(); it != list.end(); ++it) { + if (!configuredTargets.contains(it.key())) { + configuredTargets.insert(it.key()); + it.value()->setPackage(package); + } + } + + _config.packagesEdit().insert(package, DistroModule{package}); } - _config.packagesEdit().insert(package, DistroModule{package}); - - if (pair.size() != 2) { + if (paramsList.size() < 2) { defaultPackage = package; } } @@ -755,7 +768,10 @@ bool ConfigParser::setTargets(const QStringList &value) { if (targetInfo.isFile()) { - _config.targetsEdit().unite(createTarget(QDir::fromNativeSeparators(i))); + auto target = createTarget(QDir::fromNativeSeparators(i)); + if (!_config.targetsEdit().contains(target.target)) { + _config.targetsEdit().insert(target.target, target.targetInfo); + } isfillList = true; } @@ -807,7 +823,7 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) { } bool result = false; - for (const auto &file : list) { + for (const auto &file : qAsConst(list)) { if (file.isDir()) { result |= setTargetsInDir(file.absoluteFilePath(), recursive); @@ -820,9 +836,13 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) { if (sufix.isEmpty() || name.contains(".dll", Qt::CaseInsensitive) || name.contains(".so", Qt::CaseInsensitive) || name.contains(".exe", Qt::CaseInsensitive)) { - result = true; - _config.targetsEdit().unite(createTarget(QDir::fromNativeSeparators(file.absoluteFilePath()))); + auto target = createTarget(QDir::fromNativeSeparators(file.absoluteFilePath())); + if (!_config.targetsEdit().contains(target.target)) { + _config.targetsEdit().insert(target.target, target.targetInfo); + } + + result = true; } @@ -831,13 +851,13 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) { return result; } -QHash ConfigParser::createTarget(const QString &target) { +TargetData ConfigParser::createTarget(const QString &target) { TargetInfo libinfo; auto key = target; if (_scaner->fillLibInfo(libinfo, key)) { - return {{libinfo.fullPath(), libinfo}}; + return {libinfo.fullPath(), libinfo}; } - return {{key, {}}}; + return {key, {}}; } QHash @@ -884,6 +904,7 @@ void ConfigParser::initIgnoreList() }; _config.ignoreList.addRule(addRuleUnix("libc")); + _config.ignoreList.addRule(addRuleUnix("libstdc++")); _config.ignoreList.addRule(addRuleUnix("ld-")); _config.ignoreList.addRule(addRuleUnix("libpthread")); _config.ignoreList.addRule(addRuleUnix("libm")); @@ -897,7 +918,7 @@ void ConfigParser::initIgnoreList() _config.ignoreList.addRule(addRuleUnix("libBrokenLocale")); _config.ignoreList.addRule(addRuleUnix("libSegFault")); _config.ignoreList.addRule(addRuleUnix("libanl")); - _config.ignoreList.addRule(addRuleUnix("libcrypt")); + _config.ignoreList.addRule(addRuleUnix("libcrypt.so")); _config.ignoreList.addRule(addRuleUnix("/gconv/")); _config.ignoreList.addRule(addRuleUnix("libnss")); } @@ -1436,6 +1457,16 @@ bool ConfigParser::smartMoveTargets() { bool result = true; for (auto i = _config.targets().cbegin(); i != _config.targets().cend(); ++i) { + if (!i.value().isValid()) { + QuasarAppUtils::Params::log(QString("Internal error ocurred in %0. Target not inited.").arg(__FUNCTION__), + QuasarAppUtils::Error); + QuasarAppUtils::Params::log(QString("If you see this message please create a new issue" + " about this problem on the official github page" + " https://github.com/QuasarApp/CQtDeployer/issues/new/choose. "), + QuasarAppUtils::Error); + return false; + } + QFileInfo target(i.key()); QString targetPath = _config.getTargetDir() + "/" + i.value().getPackage(); diff --git a/Deploy/configparser.h b/Deploy/configparser.h index 3afdaab..be85aff 100644 --- a/Deploy/configparser.h +++ b/Deploy/configparser.h @@ -11,6 +11,7 @@ #include "distrostruct.h" #include "envirement.h" #include "ignorerule.h" +#include "targetdata.h" #include "targetinfo.h" #include @@ -99,7 +100,7 @@ private: void readKey(const QString &key, const QJsonObject &obj, const QString &confFileDir) const; void readString(const QString &key, const QString &val, const QString &confFileDir) const; - QHash createTarget(const QString &target); + TargetData createTarget(const QString &target); QHash moveTarget(TargetInfo target, const QString &newLocation); 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/dependenciesscanner.cpp b/Deploy/dependenciesscanner.cpp index 7f1d83a..5b37bd7 100644 --- a/Deploy/dependenciesscanner.cpp +++ b/Deploy/dependenciesscanner.cpp @@ -90,10 +90,13 @@ bool DependenciesScanner::fillLibInfo(LibInfo &info, const QString &file) const case PrivateScaner::PE: { return _peScaner.getLibInfo(file, info); } - case PrivateScaner::ELF: - return _elfScaner.getLibInfo(file, info); - default: return false; + case PrivateScaner::ELF: { + return _elfScaner.getLibInfo(file, info); + } + + default: + return _filesScaner.getLibInfo(file, info); } } diff --git a/Deploy/dependenciesscanner.h b/Deploy/dependenciesscanner.h index d6c76d0..6dfb57a 100644 --- a/Deploy/dependenciesscanner.h +++ b/Deploy/dependenciesscanner.h @@ -14,6 +14,7 @@ #include "pe_type.h" #include "elf_type.h" #include "libinfo.h" +#include "generalfiles_type.h" enum class PrivateScaner: unsigned char { @@ -32,6 +33,7 @@ private: PE _peScaner; ELF _elfScaner; + GeneralFiles _filesScaner; PrivateScaner getScaner(const QString& lib) const; diff --git a/Deploy/deploy.cpp b/Deploy/deploy.cpp index 349377b..5d75556 100644 --- a/Deploy/deploy.cpp +++ b/Deploy/deploy.cpp @@ -87,13 +87,13 @@ bool Deploy::prepare() { bool Deploy::deploy() { + _extracter->clear(); switch (DeployCore::getMode() ) { case RunMode::Deploy: - _extracter->deploy(); - break; - case RunMode::Clear: - _extracter->clear(); + if (!_extracter->deploy()) + return false; + break; default: break; @@ -104,8 +104,17 @@ bool Deploy::deploy() { bool Deploy::packing() { - if (DeployCore::getMode() != RunMode::Deploy) - return true; + switch (DeployCore::getMode() ) { - return _packing->create(); + case RunMode::Deploy: + return _packing->create(); + + case RunMode::Template: + return _packing->extractTemplates(); + + default: + break; + } + + return true; } diff --git a/Deploy/deploy.h b/Deploy/deploy.h index 9c8e324..833632f 100644 --- a/Deploy/deploy.h +++ b/Deploy/deploy.h @@ -18,6 +18,7 @@ class DependenciesScanner; class PluginsParser; class Packing; + enum exitCodes { Good = 0x0, PrepareError = 0x1, diff --git a/Deploy/deployconfig.cpp b/Deploy/deployconfig.cpp index 8f4ce45..6a1beac 100644 --- a/Deploy/deployconfig.cpp +++ b/Deploy/deployconfig.cpp @@ -52,7 +52,7 @@ DistroModule DeployConfig::getDistroFromPackage(const QString &package) const { return _packages.value(package, DistroModule{package}); } -QMultiHash &DeployConfig::targetsEdit() { +QHash &DeployConfig::targetsEdit() { return _targets; } diff --git a/Deploy/deployconfig.h b/Deploy/deployconfig.h index 8eb4213..5f583ef 100644 --- a/Deploy/deployconfig.h +++ b/Deploy/deployconfig.h @@ -95,7 +95,7 @@ public: const QHash& targets() const; const QHash& packages() const; - QMultiHash &targetsEdit(); + QHash &targetsEdit(); QHash& packagesEdit(); /** @@ -125,7 +125,7 @@ private: * key - path * value - create wrapper */ - QMultiHash _targets; + QHash _targets; /** * @brief packages diff --git a/Deploy/deploycore.cpp b/Deploy/deploycore.cpp index 78c8a35..7e2759c 100644 --- a/Deploy/deploycore.cpp +++ b/Deploy/deploycore.cpp @@ -159,6 +159,10 @@ RunMode DeployCore::getMode() { return RunMode::Init; } + if (C("getDefaultTemplate")) { + return RunMode::Template; + } + if (C("bin") || C("extraData")) { return RunMode::Deploy; } @@ -211,6 +215,11 @@ void DeployCore::help() { "(on snap version you need to turn on permission)"}, {"noQt", "Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework."}, {"allowEmptyPackages", "Allows configure the empty packages."}, + {"getDefaultTemplate", "Extracts defaults deb or qif templates." + " All templates extract into targetDirectory." + " For change target directory use the targetDir option." + " Example: cqtdeployer -bin myExecutable getDefaultTemplate qif deb."}, + } }, @@ -241,7 +250,7 @@ void DeployCore::help() { } }, { - "Part 3 Controll of packages options", { + "Part 3 Control of packages options", { {"-targetPackage [package;tar1,package;tar2]", "Creates a new package and adds 'tar1 and tar2' to it." "If you want configure the package that do not have any targets use the allowEmptyPackages option."}, {"-qmlOut [package;path,path]", "Sets path to qml out directory"}, @@ -354,7 +363,8 @@ QStringList DeployCore::helpKeys() { "prefix", "deb", "allowEmptyPackages", - "runScript" + "runScript", + "getDefaultTemplate" }; } diff --git a/Deploy/deploycore.h b/Deploy/deploycore.h index 79c444d..9ae86af 100644 --- a/Deploy/deploycore.h +++ b/Deploy/deploycore.h @@ -108,7 +108,8 @@ enum class RunMode: int { Info, Deploy, Clear, - Init + Init, + Template }; class Extracter; diff --git a/Deploy/elf_type.cpp b/Deploy/elf_type.cpp index b4f866e..8454b61 100644 --- a/Deploy/elf_type.cpp +++ b/Deploy/elf_type.cpp @@ -18,7 +18,7 @@ ELF::ELF() QByteArrayList ELF::getDynamicString(ElfReader& reader) const { auto headers = reader.readHeaders(); - for (const auto §ionHeader : headers.sectionHeaders) { + for (const auto §ionHeader : qAsConst(headers.sectionHeaders)) { if (sectionHeader.name == ".dynstr") { auto arr = reader.readSection(sectionHeader.name).split(0); return arr; diff --git a/Deploy/extracter.cpp b/Deploy/extracter.cpp index e2eb3d3..5ffb4cd 100644 --- a/Deploy/extracter.cpp +++ b/Deploy/extracter.cpp @@ -111,9 +111,8 @@ void Extracter::extractExtraDataTargets() { auto cfg = DeployCore::_config; for (auto i = cfg->packages().cbegin(); i != cfg->packages().cend(); ++i) { auto &dep = _packageDependencyes[i.key()]; - - const auto extraDataList = i.value().extraData(); - for (const auto &target : extraDataList) { + const auto extraData = i.value().extraData(); + for (const auto &target : extraData) { dep.addExtraData(target); } } @@ -137,9 +136,9 @@ void Extracter::copyExtraPlugins(const QString& package) { auto cnf = DeployCore::_config; auto targetPath = cnf->getTargetDir() + "/" + package; auto distro = cnf->getDistroFromPackage(package); + const auto plugins = distro.extraPlugins(); - auto extraPlugins = distro.extraPlugins(); - for (const auto &extraPlugin : extraPlugins) { + for (const auto &extraPlugin : plugins) { info.setFile(extraPlugin); @@ -268,11 +267,13 @@ void Extracter::copyTr() { } } -void Extracter::deploy() { +bool Extracter::deploy() { QuasarAppUtils::Params::log("target deploy started!!", QuasarAppUtils::Info); - clear(); - _cqt->smartMoveTargets(); + if (!_cqt->smartMoveTargets()) { + return false; + } + _scaner->setEnvironment(DeployCore::_config->envirement.environmentList()); extractAllTargets(); extractExtraDataTargets(); @@ -290,6 +291,7 @@ void Extracter::deploy() { if (!extractWebEngine()) { QuasarAppUtils::Params::log("deploy webEngine failed", QuasarAppUtils::Error); + return false; } if (!deployMSVC()) { @@ -300,6 +302,8 @@ void Extracter::deploy() { QuasarAppUtils::Params::log("deploy done!", QuasarAppUtils::Info); + return true; + } bool Extracter::copyTranslations(const QStringList &list, const QString& package) { @@ -405,10 +409,8 @@ bool Extracter::extractQml() { QStringList plugins; QStringList listItems; - - const auto qmlImports = distro.qmlInput(); - - for (const auto &qmlInput: qmlImports) { + const auto qmlInput = distro.qmlInput(); + for (const auto &qmlInput: qmlInput) { QFileInfo info(qmlInput); if (!info.isDir()) { diff --git a/Deploy/extracter.h b/Deploy/extracter.h index 63415d8..7528d29 100644 --- a/Deploy/extracter.h +++ b/Deploy/extracter.h @@ -24,7 +24,7 @@ class DEPLOYSHARED_EXPORT Extracter { public: explicit Extracter(FileManager *fileManager, PluginsParser* pluginsParser, ConfigParser * cqt, DependenciesScanner *_scaner); - void deploy(); + bool deploy(); void clear(); private: diff --git a/Deploy/filemanager.cpp b/Deploy/filemanager.cpp index 02d9688..f963718 100644 --- a/Deploy/filemanager.cpp +++ b/Deploy/filemanager.cpp @@ -352,6 +352,10 @@ bool FileManager::cp(const QString &from, bool FileManager::moveFolder(const QString &from, const QString &to, const QString& ignore) { QFileInfo info(from); + if (to.contains(from)) { + return false; + } + if (!info.exists()) return false; @@ -443,11 +447,7 @@ QString FileManager::changeDistanation(const QString& absalutePath, QString basePath, int depch) { -#if QT_VERSION > QT_VERSION_CHECK(5, 13, 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; diff --git a/Deploy/generalfiles_type.cpp b/Deploy/generalfiles_type.cpp new file mode 100644 index 0000000..49f044a --- /dev/null +++ b/Deploy/generalfiles_type.cpp @@ -0,0 +1,24 @@ +//# +//# Copyright (C) 2021-2021 QuasarApp. +//# Distributed under the lgplv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + +#include "generalfiles_type.h" + +GeneralFiles::GeneralFiles() +{ + +} + +bool GeneralFiles::getLibInfo(const QString &lib, LibInfo &info) const { + + QFileInfo fileInfo(lib); + + info.setPlatform(GeneralFile); + info.setName(fileInfo.fileName()); + info.setPath(fileInfo.absolutePath()); + + return true; +} diff --git a/Deploy/generalfiles_type.h b/Deploy/generalfiles_type.h new file mode 100644 index 0000000..de21469 --- /dev/null +++ b/Deploy/generalfiles_type.h @@ -0,0 +1,26 @@ +//# +//# Copyright (C) 2021-2021 QuasarApp. +//# Distributed under the lgplv3 software license, see the accompanying +//# Everyone is permitted to copy and distribute verbatim copies +//# of this license document, but changing it is not allowed. +//# + +#ifndef GENERALFILES_TYPE_H +#define GENERALFILES_TYPE_H + +#include "igetlibinfo.h" + +/** + * @brief The GeneralFiles class intendet for extract information of general files. + * This is defautl extracte for unknown files types. + */ +class GeneralFiles: public IGetLibInfo +{ +public: + GeneralFiles(); + + // IGetLibInfo interface + bool getLibInfo(const QString &lib, LibInfo &info) const override; +}; + +#endif // GENERALFILES_TYPE_H diff --git a/Deploy/metafilemanager.cpp b/Deploy/metafilemanager.cpp index e4dc4e5..73a1778 100644 --- a/Deploy/metafilemanager.cpp +++ b/Deploy/metafilemanager.cpp @@ -29,7 +29,7 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) { QString content; auto runScript = cnf->getRunScript(targetInfo.fileName()); if (runScript.size()) { - auto script = QFile(runScript); + QFile script(runScript); if (!script.open(QIODevice::ReadOnly)) { return false; } @@ -43,13 +43,18 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) { "@echo off \n" "SET BASE_DIR=%~dp0\n" "SET PATH=%BASE_DIR%" + distro.getLibOutDir() + ";%PATH%;" + systemLibsDir + "\n" - "%2\n" - "call \"%BASE_DIR%" + distro.getBinOutDir() + "%0\" %1 \n"; + "SET CQT_PKG_ROOT=%BASE_DIR%\n" + "SET CQT_RUN_FILE=%BASE_DIR%%5\n" - content = content.arg(targetInfo.fileName()).arg("%*"); - content = content.arg(generateCustoScriptBlok(true)); + "%3\n" + "start \"%0\" %4 \"%BASE_DIR%" + distro.getBinOutDir() + "%1\" %2 \n"; + + content = content.arg(targetInfo.baseName(), targetInfo.fileName(), "%*", + generateCustoScriptBlok(true)); // %0 %1 %2 %3 content = QDir::toNativeSeparators(content); + content = content.arg("/B", targetInfo.baseName()+ ".bat"); // %4 %5 + } QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".bat"; @@ -85,7 +90,7 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { QString content; auto runScript = cnf->getRunScript(targetInfo.fileName()); if (runScript.size()) { - auto script = QFile(runScript); + QFile script(runScript); if (!script.open(QIODevice::ReadOnly)) { return false; } @@ -107,14 +112,17 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { "export QT_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + ":$QT_PLUGIN_PATH\n" "export QTWEBENGINEPROCESS_PATH=\"$BASE_DIR\"" + distro.getBinOutDir() + "QtWebEngineProcess\n" "export QTDIR=\"$BASE_DIR\"\n" + "export CQT_PKG_ROOT=\"$BASE_DIR\"\n" + "export CQT_RUN_FILE=\"$BASE_DIR/%3\"\n" + "export " "QT_QPA_PLATFORM_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + "platforms:$QT_QPA_PLATFORM_PLUGIN_PATH\n" - "%2" - "%3\n" - "\"$BASE_DIR" + distro.getBinOutDir() + "%1\" \"$@\"\n"; + "%1" + "%2\n" + "\"$BASE_DIR" + distro.getBinOutDir() + "%0\" \"$@\"\n"; - content = content.arg(targetInfo.fileName()); + content = content.arg(targetInfo.fileName()); // %0 auto deployedFies = _fileManager->getDeployedFilesStringList(); int ld_index = DeployCore::find("ld-linux", deployedFies); @@ -124,9 +132,12 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { arg(QFileInfo(deployedFies[ld_index]).fileName())); } else { content = content.arg(""); - } + } // %1 + + content = content.arg(generateCustoScriptBlok(false), + targetInfo.baseName()+ ".sh"); // %2 %3 + - content = content.arg(generateCustoScriptBlok(false)); } diff --git a/Deploy/packing.cpp b/Deploy/packing.cpp index 33438dd..08fa855 100644 --- a/Deploy/packing.cpp +++ b/Deploy/packing.cpp @@ -51,8 +51,12 @@ bool Packing::create() { if (!package) return false; - if (!package->deployTemplate(*this)) + if (!package->deployTemplate(*this)) { + QuasarAppUtils::Params::log(QString("Deploy package template error ocured. Package: %0."). + arg(package->getClassName()), + QuasarAppUtils::Error); return false; + } auto commands = package->runCmd(); @@ -121,6 +125,11 @@ bool Packing::create() { bool Packing::movePackage(const QString &package, const QString &newLocation) { + // Disable moving data for extracting defaults templates. + if (QuasarAppUtils::Params::isEndable("getDefaultTemplate")) { + return true; + } + if (moveData(_packagesLocations.value(package), newLocation)) { @@ -135,6 +144,32 @@ bool Packing::copyPackage(const QString &package, const QString &newLocation) { return _fileManager->copyFolder(_packagesLocations[package], newLocation, {}, nullptr, nullptr, true); } +bool Packing::extractTemplates() { + + const DeployConfig *cfg = DeployCore::_config; + + + QuasarAppUtils::Params::log("You use the getDefaultTemplate. All using templates will be extracted into " + cfg->getTargetDir(), + QuasarAppUtils::Info); + + if (!prepareTemplatesForExtract()) { + return false; + } + + for (auto package : qAsConst(_pakages)) { + + if (!package) + return false; + + if (!package->deployTemplate(*this)) + return false; + + delete package; + } + + return true; +} + QStringList Packing::availablePackages() const { return _packagesLocations.keys(); } @@ -160,6 +195,19 @@ bool Packing::collectPackages() { return true; } +bool Packing::prepareTemplatesForExtract() { + const DeployConfig *cfg = DeployCore::_config; + + for (auto it = cfg->packages().begin(); it != cfg->packages().end(); ++it) { + + _packagesLocations.insert(it.key(), + cfg->getTargetDir() + "/" + TMP_PACKAGE_DIR + "/" + it.key()); + } + + _defaultPackagesLocations = _packagesLocations; + return true; +} + bool Packing::moveData(const QString &from, const QString &to, const QString &ignore) const { if (from == to ) diff --git a/Deploy/packing.h b/Deploy/packing.h index 355ba09..909cdaf 100644 --- a/Deploy/packing.h +++ b/Deploy/packing.h @@ -34,12 +34,20 @@ public: bool movePackage(const QString &package, const QString &newLocation) override; bool copyPackage(const QString &package, const QString &newLocation) override; + /** + * @brief extractTemplates This method extract all default temlates. See the getDefaultTemplate for get more information. + * @return true if function finished successful. + */ + bool extractTemplates(); + protected: QStringList availablePackages() const override; private: bool collectPackages(); + bool prepareTemplatesForExtract(); + bool moveData(const QString& from, const QString& to, const QString &ignore = "") const; diff --git a/Deploy/targetdata.cpp b/Deploy/targetdata.cpp new file mode 100644 index 0000000..2bacb3d --- /dev/null +++ b/Deploy/targetdata.cpp @@ -0,0 +1 @@ +#include "targetdata.h" diff --git a/Deploy/targetdata.h b/Deploy/targetdata.h new file mode 100644 index 0000000..94acaf2 --- /dev/null +++ b/Deploy/targetdata.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2018-2021 QuasarApp. + * Distributed under the lgplv3 software license, see the accompanying + * Everyone is permitted to copy and distribute verbatim copies + * of this license document, but changing it is not allowed. + */ + +#ifndef TARGETDATA_H +#define TARGETDATA_H + +#include "targetinfo.h" + + +/** + * @brief The TargetData struct simple info structo about target. + */ +struct TargetData { + QString target; + TargetInfo targetInfo; +}; + +#endif // TARGETDATA_H diff --git a/QIFData/config/configLinux.xml b/QIFData/config/configLinux.xml index e55604f..de5fd26 100644 --- a/QIFData/config/configLinux.xml +++ b/QIFData/config/configLinux.xml @@ -3,7 +3,7 @@ 640px 400px CQtDeployer - 1.5.0.15 + 1.5.0.23 CQtDeployer QuasarApp CQtDeployer diff --git a/QIFData/config/configWin.xml b/QIFData/config/configWin.xml index 8b64b27..b7056d7 100644 --- a/QIFData/config/configWin.xml +++ b/QIFData/config/configWin.xml @@ -3,7 +3,7 @@ 640px 400px CQtDeployer - 1.5.0.15 + 1.5.0.23 CQtDeployer QuasarApp CQtDeployer diff --git a/QIFData/packages/cqtdeployer.1_5/meta/package.xml b/QIFData/packages/cqtdeployer.1_5/meta/package.xml index acd78f3..ac3ce20 100644 --- a/QIFData/packages/cqtdeployer.1_5/meta/package.xml +++ b/QIFData/packages/cqtdeployer.1_5/meta/package.xml @@ -2,11 +2,11 @@ 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.15 + 1.5.0.23 true false - 2020-09-06 + 2021-02-06 201 ru.qm diff --git a/QIFData/scripts/QIF.py b/QIFData/scripts/QIF.py index 49c8bbd..30e322d 100755 --- a/QIFData/scripts/QIF.py +++ b/QIFData/scripts/QIF.py @@ -20,6 +20,8 @@ print("VERSION=" + VERSION) # Command Example : aqt tool linux tools_ifw 4.0 qt.tools.ifw.40 command = ["aqt", "tool", + "-b", + "https://mirrors.ocf.berkeley.edu/qt/", "--outputdir", PATHQIF, PLATFORM, diff --git a/UnitTests/testRes/TestQMLWidgets.sh b/UnitTests/testRes/TestQMLWidgets.sh index f07fdcd..38e46b3 100755 --- a/UnitTests/testRes/TestQMLWidgets.sh +++ b/UnitTests/testRes/TestQMLWidgets.sh @@ -6,6 +6,8 @@ export QML2_IMPORT_PATH="$BASE_DIR"/q/and/q/:$QML2_IMPORT_PATH export QT_PLUGIN_PATH="$BASE_DIR"/plugins/:$QT_PLUGIN_PATH export QTWEBENGINEPROCESS_PATH="$BASE_DIR"/bin/QtWebEngineProcess export QTDIR="$BASE_DIR" +export CQT_PKG_ROOT="$BASE_DIR" +export CQT_RUN_FILE="$BASE_DIR/TestQMLWidgets.sh" export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"/plugins/platforms:$QT_QPA_PLATFORM_PLUGIN_PATH "$BASE_DIR/bin/TestQMLWidgets" "$@" diff --git a/UnitTests/tst_deploytest.cpp b/UnitTests/tst_deploytest.cpp index 1108e5c..57daaf2 100644 --- a/UnitTests/tst_deploytest.cpp +++ b/UnitTests/tst_deploytest.cpp @@ -174,6 +174,8 @@ private slots: void testEmptyPackages(); void testRunScripts(); + void testGetDefaultTemplate(); + void testDeployGeneralFiles(); void customTest(); }; @@ -1100,6 +1102,71 @@ void deploytest::testRunScripts() { } +void deploytest::testGetDefaultTemplate() { + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = TestBinDir + "TestOnlyC"; + + auto comapareTree = utils.createTree( + { + "./" + DISTRO_DIR + "/defaultDEBTemplate/Application/DEBIAN/control", + "./" + DISTRO_DIR + "/defaultDEBTemplate/Application/DEBIAN/postinst", + "./" + DISTRO_DIR + "/defaultDEBTemplate/Application/DEBIAN/prerm", + "./" + DISTRO_DIR + "/defaultDEBTemplate/Application/opt/Application/icons/Icon.png", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/config/config.xml", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/config/controlScript.qs", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/packages/Application/data/icons/Icon.png", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/packages/Application/meta/installscript.qs", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/packages/Application/meta/package.xml" + }); + runTestParams( + {"-bin", bin, + "force-clear", + "getDefaultTemplate", + "deb", + "qif" + }, &comapareTree); +#else + QString bin = TestBinDir + "TestOnlyC.exe"; + + auto comapareTree = utils.createTree( + { + "./" + DISTRO_DIR + "/defaultQIFWTemplate/config/config.xml", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/config/controlScript.qs", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/packages/Application/data/icons/Icon.png", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/packages/Application/meta/installscript.qs", + "./" + DISTRO_DIR + "/defaultQIFWTemplate/packages/Application/meta/package.xml" + }); + runTestParams( + {"-bin", bin, + "force-clear", + "getDefaultTemplate", + "qif" + }, &comapareTree); +#endif + +} + +void deploytest::testDeployGeneralFiles() { + TestUtils utils; + + QString bin = TestBinDir + "/../../CMakeLists.txt"; + + auto comapareTree = utils.createTree( + { + "./" + DISTRO_DIR + "/bin/CMakeLists.txt", + "./" + DISTRO_DIR + "/bin/qt.conf", + + }); + + runTestParams( + {"-bin", bin, + "-binOut", "bin", + "force-clear" + }, &comapareTree); +} + void deploytest::customTest() { // runTestParams({"-confFile", "path", // "qifFromSystem"}); @@ -2567,9 +2634,11 @@ void deploytest::testOutDirs() { runScript = file.readAll(); file.close(); + qDebug() << "runScript =" << runScript; + QVERIFY(runScript.contains("SET BASE_DIR=%~dp0")); QVERIFY(runScript.contains("SET PATH=%BASE_DIR%\\lolLib\\;%PATH%")); - QVERIFY(runScript.contains("call \"%BASE_DIR%\\lol\\TestQMLWidgets.exe\" %*")); + QVERIFY(runScript.contains("start \"TestQMLWidgets\" /B \"%BASE_DIR%\\lol\\TestQMLWidgets.exe\" %*")); #endif diff --git a/docs/en/EnvironmentVariables.md b/docs/en/EnvironmentVariables.md new file mode 100644 index 0000000..6c72183 --- /dev/null +++ b/docs/en/EnvironmentVariables.md @@ -0,0 +1,45 @@ +# Environment variables of the CQtDeployer +This page contains information about environment variables of the default launcher script. + +## Initialization +All environment variables initialized in the default launcher script. So if you use the runScript option then you must be reunited all needed variables manually. + + +## Variables list + +| Variable name | Description | +|---|---| +| CQT_PKG_ROOT | This variable contains path to root of the current package.| +| CQT_RUN_FILE | This variable contains path to the run script of the using application.| + +## Description of definitions + +**Root of the current package** - This root is local root for any separate packages. + + +Example : +``` bash +. +├── pakcage1 << This is local root of the package1 +│ ├── bin +│ ├── lib +│ ├── plugins +│ ├── qml +│ └── translations +├── package2 << This is local root of the package2 +│ ├── bin +│ ├── lib +│ ├── plugins +│ ├── qml +│ └── translations +└── pakcage3 << This is local root of the package3 + ├── bin + ├── lib + ├── plugins + ├── qml + └── translations + +``` + + + diff --git a/docs/en/ExtractDefaultsTemplates.md b/docs/en/ExtractDefaultsTemplates.md new file mode 100644 index 0000000..892fe99 --- /dev/null +++ b/docs/en/ExtractDefaultsTemplates.md @@ -0,0 +1,48 @@ +# Extracting default templates + +Sometimes you need to create your own templates for installers or deb packages. +Fot this you can use the getDefaultTemplate option. This option extracts your distribution's default template to the target directory. This option will generate a template according to your settings. If you use the targetPackage option then a template will be generated for each package you configured. + +### Example: + +``` bash +cqtdeployer -bin myExecutable getDefaultTemplate qif +``` +This command generate template for qt installer framework into DistributionKit folder for your "myExecutable" programm. + +If you want change target location just add the targetDir option +``` bash +cqtdeployer -bin myExecutable getDefaultTemplate qif -targetDir "/distanation/Dir" + +``` + +## Work With multipackage distribution. + +This option support the configFile.json + +### Example : + +#### configFile.json +```json +{ + + "bin": [ + "myClientExecutable", + "myServerExecutable" + ], + + "targetPackage" : [ + ["Client", "myClientExecutable"], + ["Server", "myServerExecutable"] + ], +} +``` + +```bash +cqtdeployer getDefaultTemplate qif -confFile "path/to/configFile.json" +``` + + +## Note +This option support work with all packages except of zip. +If you want get more information about available packages see the packing [page](Package.md). diff --git a/docs/en/Guide.md b/docs/en/Guide.md index 7cbaf6f..703511b 100644 --- a/docs/en/Guide.md +++ b/docs/en/Guide.md @@ -1,5 +1,4 @@ # How to deploy C++ Application -Hi my name is Yankovich Andrei and i an maintainer of the [CQtDeployer tool](https://github.com/QuasarApp/CQtDeployer). In this article i describe deploy processes of c++/qt application with cqtdeployer. diff --git a/docs/en/Home.md b/docs/en/Home.md index 2cbf6d2..e8a3295 100644 --- a/docs/en/Home.md +++ b/docs/en/Home.md @@ -5,17 +5,19 @@ # Main sections -* [Description CQtDeployer](Description) -* [Options](Options) -* [Guide](Guide) -* [Quick guide](QuickGuide) -* [Build and Install](Build-and-Install) -* [Deploy file](DeployConfigFile) -* [Packing](Packing) -* [Change log page](Changelog) -* [Reviews](ReleaseReviews) -* [Compare Features](CompareFeatures) +* [Description CQtDeployer](Description.md) +* [Options](Options.md) +* [Guide](Guide.md) +* [Quick guide](QuickGuide.md) +* [Build and Install](Build-and-Install.md) +* [Deploy file](DeployConfigFile.md) +* [Packing](Packing.md) +* [Change log page](Changelog.md) +* [Reviews](ReleaseReviews.md) +* [Compare Features](CompareFeatures.md) * [Adding extra files](ExtraFiles.md) +* [Retrieving packaging templates](ExtractDefaultsTemplates.md) +* [Default Environment Variables](EnvironmentVariables.md) ## Support the project diff --git a/docs/en/Options.md b/docs/en/Options.md index 3f17836..552bf91 100644 --- a/docs/en/Options.md +++ b/docs/en/Options.md @@ -51,6 +51,7 @@ cqtdeployer -option1 value1 -option2 list, of, values ​​flag1 flag2 flag3 | deploySystem-with-libc | Deploys all libs include libc (only linux). Do not use this option for a gui application, for gui use the deploySystem option. (on snap version you need to turn on permission) | | noQt | Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework. | | allowEmptyPackages | Allows configure the empty packages. | +| getDefaultTemplate | Extracts defaults deb or qif templates. For more information see the extracting default templates [page](ExtractDefaultsTemplates.md) | ### Deploy options diff --git a/docs/ru/EnvironmentVariables.md b/docs/ru/EnvironmentVariables.md new file mode 100644 index 0000000..5e777d7 --- /dev/null +++ b/docs/ru/EnvironmentVariables.md @@ -0,0 +1,43 @@ +# Переменные окружения CQtDeployer +Эта страница содержит информацию о переменных содержащихся в скрипте запуска по умолчанию. + +## Инициализация +Все переменные окружения инициализируются в скрипте запуска по умолчанию. Поэтому, если вы используете опцию runScript, вам необходимо вручную воссоздать все необходимые переменные. + + +## Список стандартных переменных + +| Имя переменной | Описание | +| --- | --- | +| CQT_PKG_ROOT | Эта переменная содержит путь к корню текущего пакета. +| CQT_RUN_FILE | Эта переменная содержит путь к скрипту запуска используемого приложения. | + + +## Описания определений + +**корень текущего пакета** - Этот корень является локальным корнем для любых отдельных пакетов. + + +Пример : +``` bash +. +├── pakcage1 << Это локальный корень пакета package1 +│ ├── bin +│ ├── lib +│ ├── plugins +│ ├── qml +│ └── translations +├── package2 << Это локальный корень пакета package2 +│ ├── bin +│ ├── lib +│ ├── plugins +│ ├── qml +│ └── translations +└── pakcage3 << Это локальный корень пакета package3 + ├── bin + ├── lib + ├── plugins + ├── qml + └── translations + +``` diff --git a/docs/ru/ExtractDefaultsTemplates.md b/docs/ru/ExtractDefaultsTemplates.md new file mode 100644 index 0000000..779c96d --- /dev/null +++ b/docs/ru/ExtractDefaultsTemplates.md @@ -0,0 +1,52 @@ +# Извлечение шаблонов по умолчанию + +Иногда вам нужно создать свои собственные шаблоны для установщиков или пакетов deb. +Для этого вы можете использовать опцию getDefaultTemplate. + +Эта опция извлекает шаблон вашего дистрибутива по умолчанию в целевой каталог. + +Эта опция создаст шаблон в соответствии с вашими настройками. Если вы используете опцию targetPackage, то для каждого настроенного вами пакета будет создан шаблон. + +### Пример: + +```bash +cqtdeployer -bin myExecutable getDefaultTemplate qif +``` +Эта команда создает шаблон для среды установки qt в папке DistributionKit для вашей программы "myExecutable". + +Если вы хотите изменить целевое местоположение, просто добавьте параметр targetDir +```bash +cqtdeployer -bin myExecutable getDefaultTemplate qif -targetDir "/distanation/Dir" + +``` + +## Работа с мультипакетной раздачей. + +Эта опция поддерживает configFile.json + +### Пример: + +#### configFile.json +`` json +{ + + "корзина": [ + "myClientExecutable", + "myServerExecutable" + ], + + "targetPackage": [ + ["Клиент", "myClientExecutable"], + ["Сервер", "myServerExecutable"] + ], +} +`` + +```bash +cqtdeployer getDefaultTemplate qif -confFile "path/to/configFile.json" +``` + + +## Запись +Эта опция поддерживает работу со всеми пакетами, кроме zip. +Если вы хотите получить больше информации о доступных пакетах, смотрите упаковку [страница](Package.md). \ No newline at end of file diff --git a/docs/ru/Guide.md b/docs/ru/Guide.md index d36da55..20bc2b6 100644 --- a/docs/ru/Guide.md +++ b/docs/ru/Guide.md @@ -1,5 +1,4 @@ # Как развернуть приложение C ++ -Привет, меня зовут Янкович Андрей, я сопровождаю [инструмент CQtDeployer](https://github.com/QuasarApp/CQtDeployer). В этой статье я описываю процессы развертывания приложения c++/qt с помощью cqtdeployer. @@ -92,4 +91,4 @@ cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -recursiveDepth 5 -qmlDi ``` cqtdeployer -bin myexecutable -libDir / PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources qif -qmake/path/to/my/qmake -``` \ No newline at end of file +``` diff --git a/docs/ru/Home.md b/docs/ru/Home.md index 961ee21..e9c452e 100644 --- a/docs/ru/Home.md +++ b/docs/ru/Home.md @@ -5,17 +5,19 @@ # Основные разделы -* [Описание CQtDeployer](Description) -* [Параметры](Options) -* [Руководство](Guide) -* [Краткое Руководство](QuickGuide) -* [Сборка и установка](Build-and-Install) -* [Файл развертывания](DeployConfigFile) -* [Упаковка](Packing) -* [Список изменений](Changelog) -* [Обзоры](ReleaseReviews) -* [Сравнение возможностей](CompareFeatures) +* [Описание CQtDeployer](Description.md) +* [Параметры](Options.md) +* [Руководство](Guide.md) +* [Краткое Руководство](QuickGuide.md) +* [Сборка и установка](Build-and-Install.md) +* [Файл развертывания](DeployConfigFile.md) +* [Упаковка](Packing.md) +* [Список изменений](Changelog.md) +* [Обзоры](ReleaseReviews.md) +* [Сравнение возможностей](CompareFeatures.md) * [Добавление дополнительных файлов](ExtraFiles.md) +* [Получение шаблонов упаковки](ExtractDefaultsTemplates.md) +* [Стандартные переменные окружения](EnvironmentVariables.md) ## Поддержите проект diff --git a/docs/ru/Options.md b/docs/ru/Options.md index 0d65d5a..f115e9c 100644 --- a/docs/ru/Options.md +++ b/docs/ru/Options.md @@ -52,6 +52,7 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | deploySystem-with-libc | Копирует все зависимости в том числе и libc, не рекомендуется использовать с gui приложения, в место этого используйте опцию deploySystem | | noQt | Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt. | | allowEmptyPackages | Разрешите настраивать пустые пакеты. | +| getDefaultTemplate | Извлекает deb или qif шаблоны по умолчанию. Для получения дополнительной информации см. [Страницу](ExtractDefaultsTemplates.md) извлечения шаблонов по умолчанию. | ### Параметры развертывания: diff --git a/snap/gui/cqtdeployer.desktop b/snap/gui/cqtdeployer.desktop index 827d926..b468494 100755 --- a/snap/gui/cqtdeployer.desktop +++ b/snap/gui/cqtdeployer.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Version=1.5.0.15 +Version=1.5.0.23 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.15 +X-GNOME-Bugzilla-Version=1.5.0.23 StartupNotify=true Name[ru_RU]=CQtDeployer diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 063b3c6..984855c 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.15' # just for humans, typically '1.2+git' or '1.3.2' +version: '1.5.0.23' # 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. diff --git a/test.pri b/test.pri index 6906d55..46bd05b 100644 --- a/test.pri +++ b/test.pri @@ -15,7 +15,7 @@ deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir !android:test.depends = deployTest unix:!android:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000 -win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o $$PWD/buildLog.log +win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o buildLog.log contains(QMAKE_HOST.os, Linux):{ win32:test.commands =