diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a3bb5fa..90876a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,9 @@ # QuassarApp operation rules + ## General rules + ### QuasarApp internal developers + * if there is no instruction to complete the task, separate you new branch from the version branch (for example v1.x). * Realize the task * At the end of the work, create a pull request to the branch from which you created the branch. @@ -8,6 +11,7 @@ Example: I made corrections for version 1.5 and created a new branch from branch v1.5, which means that I should create a pull request to branch v1.5, ### External QuasarApp Developers + * Making Fork repository. * Switch to the branch of the version in which you need to perform the correction (example of the names of the branch with the version: v1.x). * Realize the task @@ -18,26 +22,26 @@ I made corrections for version 1.5 and created a new branch from branch v1.5, wh ### Forbidden -* Using 'push force'. All conflicts need to be solved by a new commite. +* Using 'push force'. All conflicts need to be solved by a new commit. * Push code directly to master. -* Break the code design rules. If some aspect is not described, you need to write in the same style as it was written before you. +* Break the code design rules. If some aspect is not described, you need to write in the same style as it was written before your change. * Move the code for no particular reason. - ## Making Pull Request The content of the pull request must include: -* The number of the task that solves (if performed according to the task) +* The number of the task that is solved (if performed according to the task) * A complete description of everything that was done in the task. * In the case when a pull creation is created and you still work on the task, change the header of the pool request by adding a WIP tag to the beginning (example [WIP] MyTask) -* Pull Request must always be assigned to the branch from which you separated. +* Pull Request must always be assigned to the branch from which you branched (started to work). ## Making Tasks -If necessary, assign a task to someone + +If necessary, assign a task to someone. You must: -* Create relevant discussion on github, selected repository. +* Create relevant discussion on github for the specific repository. * Completely describe the problem or task. -* If you have a solution to the problem fully describe what and how to do. +* If you have a solution to the problem, then describe in detail what and how it should be done. ## Code Guideline diff --git a/CQtDeployer.pro b/CQtDeployer.pro index ddcc264..da35d8a 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2021 QuasarApp. +# Copyright (C) 2018-2022 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. @@ -11,7 +11,19 @@ CONFIG += ordered 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 + DEFINES += WITHOUT_TR } + +unix:gcc { + COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion") + COMPILER_MAJOR_VERSION = $$COMPILER_VERSION + lessThan(COMPILER_MAJOR_VERSION, 5): { + warning("The PE parser library is disabled. For build the PE parser library require gcc 5 or later version.") + DEFINES += DISABLE_PE + } + message(Version GCC : $$COMPILER_VERSION) +} + android: DEFINES += WITHOUT_TESTS !android { @@ -30,6 +42,10 @@ android: DEFINES += WITHOUT_TESTS unix:SUBDIRS += tests/quicknanobrowser unix:SUBDIRS += tests/webui + contains(DEFINES, DISABLE_PE) { + SUBDIRS -= Pe + DEFINES += WITHOUT_TESTS + } contains(DEFINES, WITHOUT_TESTS) { SUBDIRS -= UnitTests \ @@ -48,6 +64,9 @@ android: DEFINES += WITHOUT_TESTS Pe.file = $$PWD/pe/pe-parser-library/pe-parser-library.pro include('$$PWD/QIFData/installerCQtDeployer.pri') + !contains(QMAKE_HOST.arch, arm.*):{ + include($$PWD/test.pri) + } DISTFILES += \ snap/snapcraft.yaml \ @@ -56,5 +75,4 @@ android: DEFINES += WITHOUT_TESTS } - include($$PWD/test.pri) diff --git a/CQtDeployer/CQtDeployer.pro b/CQtDeployer/CQtDeployer.pro index d6a4e0d..d26c484 100644 --- a/CQtDeployer/CQtDeployer.pro +++ b/CQtDeployer/CQtDeployer.pro @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2021 QuasarApp. +# Copyright (C) 2018-2022 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. @@ -31,8 +31,9 @@ include('$$PWD/../QuasarAppLib/QuasarLib.pri') include('$$PWD/../Deploy/Deploy.pri') include('$$PWD/../zip/zip.pri') -include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') - +!contains(DEFINES, DISABLE_PE) { + include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') +} TARGET = cqtdeployer diff --git a/CQtDeployer/main.cpp b/CQtDeployer/main.cpp index fbbb40b..cc2425a 100644 --- a/CQtDeployer/main.cpp +++ b/CQtDeployer/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -21,10 +21,9 @@ int main(int argc, char *argv[]) { QCoreApplication::setApplicationName("CQtDeployer"); - if (!QuasarAppUtils::Params::parseParams(argc, argv)) { - QuasarAppUtils::Params::log("Wrong parameters", QuasarAppUtils::Warning); - DeployCore::help(); - exit(0); + if (!QuasarAppUtils::Params::parseParams(argc, argv, DeployCore::avilableOptions())) { + QuasarAppUtils::Params::log("Wrong parameters. Please use the 'help' of 'h' option to show the help page.", QuasarAppUtils::Warning); + exit(4); } Deploy deploy; diff --git a/Deploy/Deploy.pri b/Deploy/Deploy.pri index e833bf7..740c1b4 100644 --- a/Deploy/Deploy.pri +++ b/Deploy/Deploy.pri @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2021 QuasarApp. +# Copyright (C) 2018-2022 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. diff --git a/Deploy/Deploy.pro b/Deploy/Deploy.pro index be4d306..7591bf9 100644 --- a/Deploy/Deploy.pro +++ b/Deploy/Deploy.pro @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2021 QuasarApp. +# Copyright (C) 2018-2022 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. @@ -19,7 +19,7 @@ TEMPLATE = lib DEFINES += DEPLOY_LIBRARY -VERSION = 1.5.0.36 +VERSION = 1.5.4.17 DEFINES += APP_VERSION='\\"$$VERSION\\"' @@ -41,7 +41,9 @@ CONFIG(release, debug|release): { } include('$$PWD/../QuasarAppLib/QuasarLib.pri') -include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') +!contains(DEFINES, DISABLE_PE) { + include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri') +} include('$$PWD/../zip/zip.pri') diff --git a/Deploy/DeployResources.qrc b/Deploy/DeployResources.qrc index 602f56a..c0e29d8 100644 --- a/Deploy/DeployResources.qrc +++ b/Deploy/DeployResources.qrc @@ -26,4 +26,8 @@ <file>Distributions/Templates/Icon.png</file> <file>Distributions/Templates/Icon.ico</file> </qresource> + <qresource prefix="/Scripts"> + <file>ScriptsTemplates/windows.bat</file> + <file>ScriptsTemplates/linux.sh</file> + </qresource> </RCC> diff --git a/Deploy/Distributions/Templates/deb/DEBIAN/postinst b/Deploy/Distributions/Templates/deb/DEBIAN/postinst index caeaebe..75d600c 100755 --- a/Deploy/Distributions/Templates/deb/DEBIAN/postinst +++ b/Deploy/Distributions/Templates/deb/DEBIAN/postinst @@ -1,8 +1,9 @@ #!/bin/bash APPS=$BASH_ARRAY_APPLICATIONS +APPS_SHORTCUTS=$BASH_ARRAY_SHORTCUTS_APPLICATIONS -TARGET_DIR=/opt/$PREFIX/ +TARGET_DIR=$CQT_INSTALL_DEB_DIR/$PREFIX/ #creating shortcut DEST_FILE= @@ -20,7 +21,7 @@ function createShortCut { echo "Encoding=UTF-8" >> $DEST_FILE echo "Name=$DEST_NAME" >> $DEST_FILE echo "Type=Application" >> $DEST_FILE - echo "Icon=/opt/$ICON" >> $DEST_FILE + echo "Icon=$CQT_INSTALL_DEB_DIR/icons/${SRC_FILE%%.*}.png" >> $DEST_FILE echo "Terminal=false" >> $DEST_FILE echo "Exec=$SRC_FILE" >> $DEST_FILE @@ -35,14 +36,20 @@ do DEST_NAME=$app - SRC_FILE="$TARGET_DIR/$app.sh" - DEST_FILE="/usr/share/applications/$app.desktop" - createShortCut - if [ ! -e /usr/bin/"${app,,}" ]; then ln -s "$TARGET_DIR/$app.sh" /usr/bin/"${app,,}" echo "${app,,}" fi done +for app in "${APPS_SHORTCUTS[@]}" +do + + DEST_NAME=$app + + SRC_FILE="$TARGET_DIR/$app" + DEST_FILE="/usr/share/applications/${app%.*}.desktop" + createShortCut +done + diff --git a/Deploy/Distributions/Templates/deb/DEBIAN/prerm b/Deploy/Distributions/Templates/deb/DEBIAN/prerm index 0e0a2e6..64b778a 100755 --- a/Deploy/Distributions/Templates/deb/DEBIAN/prerm +++ b/Deploy/Distributions/Templates/deb/DEBIAN/prerm @@ -1,15 +1,18 @@ #!/bin/bash APPS=$BASH_ARRAY_APPLICATIONS +APPS_SHORTCUTS=$BASH_ARRAY_SHORTCUTS_APPLICATIONS for app in "${APPS[@]}" do - SRC_FILE="$TARGET_DIR/$app.sh" - rm "/usr/share/applications/$app.desktop" - if [ -e /usr/bin/"${app,,}" ]; then rm /usr/bin/"${app,,}" echo "Remove ${app,,}" fi done + +for app in "${APPS_SHORTCUTS[@]}" +do + rm "/usr/share/applications/${app%.*}.desktop" +done diff --git a/Deploy/Distributions/Templates/qif/Styles/quasar.css b/Deploy/Distributions/Templates/qif/Styles/quasar.css index f5282ce..7ff14bd 100644 --- a/Deploy/Distributions/Templates/qif/Styles/quasar.css +++ b/Deploy/Distributions/Templates/qif/Styles/quasar.css @@ -1,6 +1,5 @@ .QWidget { background-color: rgb(255, 255, 255); - min-width: 640px; } .QLabel { diff --git a/Deploy/Distributions/Templates/qif/config custom designe/config.xml b/Deploy/Distributions/Templates/qif/config custom designe/config.xml index 461812f..b852a78 100644 --- a/Deploy/Distributions/Templates/qif/config custom designe/config.xml +++ b/Deploy/Distributions/Templates/qif/config custom designe/config.xml @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <Installer> - <WizardDefaultWidth>800px</WizardDefaultWidth> - <WizardDefaultHeight>500px</WizardDefaultHeight> <Name>$NAME</Name> <Version>$VERSION</Version> <Title>$NAME</Title> <Publisher>$PUBLISHER</Publisher> <StartMenuDir>$NAME</StartMenuDir> - <TargetDir>@HomeDir@/$NAME</TargetDir> + <TargetDir>$CQT_INSTALL_DIR/$NAME</TargetDir> <InstallActionColumnVisible>true</InstallActionColumnVisible> <RemoveTargetDir>true</RemoveTargetDir> <ControlScript>controlScript.qs</ControlScript> diff --git a/Deploy/Distributions/Templates/qif/config/config.xml b/Deploy/Distributions/Templates/qif/config/config.xml index bc7901d..14fd970 100644 --- a/Deploy/Distributions/Templates/qif/config/config.xml +++ b/Deploy/Distributions/Templates/qif/config/config.xml @@ -5,7 +5,7 @@ <Title>$NAME</Title> <Publisher>$PUBLISHER</Publisher> <StartMenuDir>$NAME</StartMenuDir> - <TargetDir>@HomeDir@/$NAME</TargetDir> + <TargetDir>$CQT_INSTALL_DIR/$NAME</TargetDir> <InstallActionColumnVisible>true</InstallActionColumnVisible> <RemoveTargetDir>true</RemoveTargetDir> <ControlScript>controlScript.qs</ControlScript> diff --git a/Deploy/Distributions/Templates/qif/packages/default/meta/installscript.qs b/Deploy/Distributions/Templates/qif/packages/default/meta/installscript.qs index 554f184..98b8018 100644 --- a/Deploy/Distributions/Templates/qif/packages/default/meta/installscript.qs +++ b/Deploy/Distributions/Templates/qif/packages/default/meta/installscript.qs @@ -2,6 +2,13 @@ function Component() { } +function getBasename(file) { + if (!file.length) + return "" + + return file.split('.')[0]; +} + function generateShortCutCmd(cmd) { var prefix = "$PREFIX"; @@ -12,9 +19,9 @@ function generateShortCutCmd(cmd) { component.addOperation( "CreateShortcut", - "@TargetDir@/" + prefix + "/" + cmd + ".bat", - "@DesktopDir@/" + cmd + ".lnk", - "iconPath=@TargetDir@/$ICON", + "@TargetDir@/" + prefix + "/" + cmd, + "@DesktopDir@/" + getBasename(cmd) + ".lnk", + "iconPath=@TargetDir@/" + prefix + "/icons/" + getBasename(cmd) + ".ico", "iconId=0"); } @@ -23,14 +30,14 @@ function generateShortCutCmd(cmd) { if (systemInfo.kernelType === "linux") { console.log("create icons!!! on LINUX"); component.addOperation("CreateDesktopEntry", - "@HomeDir@/.local/share/applications/" + cmd + ".desktop", + "@HomeDir@/.local/share/applications/" + getBasename(cmd) + ".desktop", "Version=@Version@\n Type=Application\n Terminal=false\n - Exec=\"@TargetDir@/" + prefix + "/" + cmd + ".sh\"\n - Name=" + cmd + "\n - Icon=@TargetDir@/$ICON\n - Name[en_US]=" + cmd); + Exec=\"@TargetDir@/" + prefix + "/" + cmd + "\"\n + Name=" + getBasename(cmd) + "\n + Icon=@TargetDir@/" + prefix + "/icons/" + getBasename(cmd) + ".png\n + Name[en_US]=" + getBasename(cmd)); console.log("create icons!!! on LINUX done"); } @@ -41,8 +48,9 @@ Component.prototype.createOperations = function() { component.createOperations(); var cmdArray = ["array", "of", "cmds"]; // will be changed in cqtdeployer + var shortcutsCmdArray = ["array", "of", "shortcut", "cmds"]; // will be changed in cqtdeployer - cmdArray.forEach( function (item){ + shortcutsCmdArray.forEach( function (item){ generateShortCutCmd(item); }); diff --git a/Deploy/Distributions/deb.cpp b/Deploy/Distributions/deb.cpp index bca26f2..7380cd3 100644 --- a/Deploy/Distributions/deb.cpp +++ b/Deploy/Distributions/deb.cpp @@ -60,8 +60,7 @@ bool Deb::deployTemplate(PackageControl &pkg) { QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning); } - outFiles.push_back(DeployCore::_config->getTargetDir() + "/" + info.Name + ".deb"); - packageFolders.push_back(local); + inouts.push_back({local, cfg->getTargetDir() + "/" + info.debOut}); } return true; @@ -117,35 +116,23 @@ QProcessEnvironment Deb::processEnvirement() const { QList<SystemCommandData> Deb::runCmd() { QList<SystemCommandData> res; - for (const auto& dir: qAsConst(packageFolders)) { - res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << dir}); + for (const auto& inout: qAsConst(inouts)) { + res.push_back({"dpkg-deb", QStringList{"--build", "--verbose"} << inout.input << inout.output}); } return res; } QStringList Deb::outPutFiles() const { - return outFiles; -} - -bool Deb::cb() const { - const DeployConfig* cfg = DeployCore::_config; - - QString from = cfg->getTargetDir() + "/" + getLocation() + "/"; - QString to = cfg->getTargetDir() + "/" + getLocation() + "/../"; - auto const outputFiles = outPutFiles(); - for (const QString& file : outputFiles) { - if(!moveData(from + PathUtils::getName(file), to, "")) { - return false; - } + QStringList result; + for (const auto& inout: qAsConst(inouts)) { + result.push_back(inout.output); } - - return true; + return result; } QString Deb::dataLocation(const DistroModule &module) const { - return location(module) + "/opt/" + releativeLocation(module); - + return location(module) + module.installDirDEB() + "/" + releativeLocation(module); } QString Deb::location(const DistroModule &module) const { diff --git a/Deploy/Distributions/deb.h b/Deploy/Distributions/deb.h index 031b4fe..8075e50 100644 --- a/Deploy/Distributions/deb.h +++ b/Deploy/Distributions/deb.h @@ -3,6 +3,14 @@ #include "idistribution.h" +/** + * @brief The DebInOut struct contains input and output value of the debian packages. + */ +struct DebInOut { + QString input; + QString output; +}; + /** * @brief The deb class contains methods for create a debian pacakge. */ @@ -21,7 +29,6 @@ public: QProcessEnvironment processEnvirement() const override; QList<SystemCommandData> runCmd() override; QStringList outPutFiles() const override; - bool cb() const override; // iDistribution interface protected: @@ -30,8 +37,7 @@ protected: QString releativeLocation(const DistroModule &module) const override; private: - QStringList outFiles; - QStringList packageFolders; + QList<DebInOut> inouts; }; #endif // DEB_H diff --git a/Deploy/Distributions/idistribution.cpp b/Deploy/Distributions/idistribution.cpp index 48b7a86..33b6377 100644 --- a/Deploy/Distributions/idistribution.cpp +++ b/Deploy/Distributions/idistribution.cpp @@ -70,10 +70,11 @@ bool iDistribution::unpackFile(const QFileInfo &resource, inputText.replace("$DESCRIPTION", info.Description); inputText.replace("$VERSION", info.Version); inputText.replace("$RELEASEDATA", info.ReleaseData); - inputText.replace("$ICON", info.Icon); inputText.replace("$PUBLISHER", info.Publisher); inputText.replace("$HOMEPAGE", info.Homepage); inputText.replace("$PREFIX", info.Prefix); + inputText.replace("$CQT_INSTALL_DIR", info.InstallDeirQIFW()); + inputText.replace("$CQT_INSTALL_DEB_DIR", info.InstallDirDEB); for (auto it = info.Custom.cbegin(); it != info.Custom.cend(); ++it) { @@ -160,7 +161,7 @@ bool iDistribution::collectInfoWithDeployIcons(const DistroModule &pkg, return false; } - return deployIcon(info, pkg); + return deployIcon(pkg); } @@ -192,27 +193,58 @@ bool iDistribution::collectInfo(const DistroModule& pkg, if (!pkg.homePage().isEmpty()) info.Homepage = pkg.homePage(); + info.InstallDirDEB = "/opt"; + if (!pkg.installDirDEB().isEmpty()) + info.InstallDirDEB = pkg.installDirDEB(); + + info.debOut = info.Name + ".deb"; + if (!pkg.debOut().isEmpty()) + info.debOut = pkg.debOut(); + + info.zipOut = info.Name + ".zip"; + if (!pkg.zipOut().isEmpty()) + info.zipOut = pkg.zipOut(); + info.Prefix = releativeLocation(pkg); QString cmdArray = "["; - QString bashArray = ""; + QString bashArray = "("; + QString cmdShortCutsArray = "["; + QString bashShortCutsArray = "("; int initSize = cmdArray.size(); for (const auto &target :pkg.targets()) { - auto fileinfo = QFileInfo(target); - if (fileinfo.suffix().compare("exe", ONLY_WIN_CASE_INSENSIATIVE) == 0 || fileinfo.suffix().isEmpty()) { + const DeployConfig *cfg = DeployCore::_config; + auto fileinfo = QFileInfo(target); + auto targetInfo = cfg->targets().value(target); + + if (targetInfo.getShortCut()) { + if (cmdArray.size() > initSize) { cmdArray += ","; bashArray += " "; + cmdShortCutsArray += ","; + bashShortCutsArray += " "; } + cmdArray += "\"" + fileinfo.baseName() + "\""; bashArray += "\"" + fileinfo.baseName() + "\""; + + + cmdShortCutsArray += "\"" + targetInfo.getRunScriptFile() + "\""; + bashShortCutsArray += "\"" + targetInfo.getRunScriptFile() + "\""; } } + cmdArray += "]"; + bashArray += ")"; + cmdShortCutsArray += "]"; + bashShortCutsArray += ")"; info.Custom = {{"[\"array\", \"of\", \"cmds\"]", cmdArray}}; + info.Custom["[\"array\", \"of\", \"shortcut\", \"cmds\"]"] = cmdShortCutsArray; + info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray; info.Custom["$BASH_ARRAY_APPLICATIONS"] = bashArray; if (info.Name.isEmpty()) { @@ -239,31 +271,48 @@ QString iDistribution::getName(const DistroModule& pkg) const { return name; } -bool iDistribution::deployIcon(TemplateInfo &info, const DistroModule& pkg) { +bool iDistribution::deployIcon(const DistroModule& pkg) { auto localData = dataLocation(pkg); const DeployConfig *cfg = DeployCore::_config; - info.Icon = "icons/Icon.png"; - QSet<QString> icons; + QuasarAppUtils::Params::log(QString("Deploy icons for package %0. count targets: %1"). + arg(pkg.name()).arg(pkg.targets().count()), + QuasarAppUtils::Debug); + for (const auto& target: pkg.targets()) { - auto icon = cfg->targets().value(target).getIcon(); + auto targetObject = cfg->targets().value(target); + + if (!targetObject.isValid()) { + QuasarAppUtils::Params::log(QString("The target '%0' is not detected in the target list." + " Available Target List : %1" + " So icon will be copy by Default."). + arg(target, cfg->targets().keys().join(',')), + QuasarAppUtils::Warning); + } + + auto icon = targetObject.getIcon(); QuasarAppUtils::Params::log(QString("%0: %1").arg(target, icon), QuasarAppUtils::Debug); - if (icons.contains(icon)) - break; + if (!targetObject.getShortCut()) { + QuasarAppUtils::Params::log(QString("%0: %1 Ignored").arg(target, icon), + QuasarAppUtils::Debug); + continue; + } QFileInfo iconInfo(icon); - info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName(); - if (!copyFile(icon, localData + "/icons/", false)) { + QFileInfo runScript(targetObject.getRunScriptFile()); + + QString dist = localData + "/icons/" + runScript.baseName() + "." + iconInfo.suffix(); + + if (!copyFile(icon, dist, true)) { QuasarAppUtils::Params::log(QString("Failed to copy icon: %0.").arg(icon), QuasarAppUtils::Error); return false; } - icons += icon; } return true; diff --git a/Deploy/Distributions/idistribution.h b/Deploy/Distributions/idistribution.h index 07dfa17..c690b92 100644 --- a/Deploy/Distributions/idistribution.h +++ b/Deploy/Distributions/idistribution.h @@ -105,7 +105,7 @@ protected: * @param pkg This is package info * @return true if this method finished successful. */ - bool deployIcon(TemplateInfo &info, const DistroModule &pkg); + bool deployIcon(const DistroModule &pkg); /** * @brief dataLocation This method should be retrun location of application or package files. diff --git a/Deploy/Distributions/qif.cpp b/Deploy/Distributions/qif.cpp index 8d47ded..f53df58 100644 --- a/Deploy/Distributions/qif.cpp +++ b/Deploy/Distributions/qif.cpp @@ -59,26 +59,43 @@ QList<SystemCommandData> QIF::runCmd() { SystemCommandData cmd; + QString binarycreator = QuasarAppUtils::Params::getArg("binarycreator"); + if (binarycreator.isEmpty()) binarycreator = DeployCore::findProcess(toolKitEnv().concatEnv(), base); if (binarycreator.isEmpty()) { cmd.command = base; } else { - cmd.command = binarycreator; + auto commandsList = binarycreator.split(' '); + cmd.command = commandsList.first(); + cmd.arguments = commandsList.mid(1,-1); } auto location = DeployCore::_config->getTargetDir() + "/" + getLocation(); - cmd.arguments = QStringList{ + cmd.arguments += QStringList{ "-c", - location + "/config/config.xml", + QuasarAppUtils::Params::getArg("qifConfig", location + "/config/config.xml"), "-p", - location + "/packages/", - "-v", - installerFile() + QuasarAppUtils::Params::getArg("qifPackages", location + "/packages/"), + "-v" }; + QString resources = QuasarAppUtils::Params::getArg("qifResources"); + if (resources.size()) { + cmd.arguments.push_back("-r"); + cmd.arguments.push_back(resources); + } + + cmd.arguments.push_back(installerFile()); + + QString customFormat = QuasarAppUtils::Params::getArg("qifArchiveFormat"); + if (customFormat.size()) { + cmd.arguments.push_back("--af"); + cmd.arguments.push_back(customFormat); + } + return {cmd}; } @@ -248,6 +265,10 @@ QString QIF::installerFile() const { #else QString sufix = ".exe"; #endif + QString qifOut = QuasarAppUtils::Params::getArg("qifOut"); + if (qifOut.size()) { + return DeployCore::_config->getTargetDir() + "/" + qifOut; + } return DeployCore::_config->getTargetDir() + "/Installer" + generalInfo.Name + sufix; } @@ -287,5 +308,5 @@ bool QIF::initDefaultConfiguratuin() { const DeployConfig *cfg = DeployCore::_config; // init default configuration - return collectInfo(DistroModule{cfg->getDefaultPackage()}, generalInfo); + return collectInfo(cfg->getDistroFromPackage(cfg->getDefaultPackage()), generalInfo); } diff --git a/Deploy/Distributions/qif.h b/Deploy/Distributions/qif.h index 198b88b..88908fe 100644 --- a/Deploy/Distributions/qif.h +++ b/Deploy/Distributions/qif.h @@ -51,7 +51,6 @@ private: */ bool initDefaultConfiguratuin(); - QString binarycreator; TemplateInfo generalInfo; }; diff --git a/Deploy/Distributions/templateinfo.cpp b/Deploy/Distributions/templateinfo.cpp index f398944..a74f6e8 100644 --- a/Deploy/Distributions/templateinfo.cpp +++ b/Deploy/Distributions/templateinfo.cpp @@ -1 +1,6 @@ #include "templateinfo.h" +#include "quasarapp.h" + +QString TemplateInfo::InstallDeirQIFW() const { + return QuasarAppUtils::Params::getArg("installDirQIFW", "@HomeDir@"); +} diff --git a/Deploy/Distributions/templateinfo.h b/Deploy/Distributions/templateinfo.h index 715cd87..1f503a2 100644 --- a/Deploy/Distributions/templateinfo.h +++ b/Deploy/Distributions/templateinfo.h @@ -5,16 +5,23 @@ #include <QHash> #include <deploy_global.h> +/** + * @brief The TemplateInfo struct This structure contains information about distribution packages. + */ struct DEPLOYSHARED_EXPORT TemplateInfo { QString Name; QString Description; QString Version; QString ReleaseData; - QString Icon; QString Publisher; QString Homepage; QString Prefix; + QString InstallDirDEB; + QString zipOut; + QString debOut; + + QString InstallDeirQIFW() const; QHash<QString, QString> Custom; diff --git a/Deploy/Distributions/ziparhive.cpp b/Deploy/Distributions/ziparhive.cpp index 07495cb..a21a004 100644 --- a/Deploy/Distributions/ziparhive.cpp +++ b/Deploy/Distributions/ziparhive.cpp @@ -38,7 +38,7 @@ bool ZipArhive::deployTemplate(PackageControl &pkg) { return false; } - auto arr = cfg->getTargetDir() + "/" + info.Name + ".zip"; + auto arr = cfg->getTargetDir() + "/" + info.zipOut; if (!zipWorker.compress(local, arr)) { return false; } diff --git a/Deploy/ScriptsTemplates/linux.sh b/Deploy/ScriptsTemplates/linux.sh new file mode 100644 index 0000000..a4e9afe --- /dev/null +++ b/Deploy/ScriptsTemplates/linux.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +# This is default bat run script of The CQtDeployer project. +# This file contains key word that will replaced after deploy project. +# +# #################################################################### +# +# All variables has the CQT_ prefix +# BIN_PATH - are releative path to executable files of a deployed distribution. +# LIB_PATH - are releative path to libraryes of a deployed distribution. +# QML_PATH - are releative path to qml libraryes of a deployed distribution. +# PLUGIN_PATH - are releative path to qt plugins of a deployed distribution. +# BIN_PATH - are releative path to targets of a deployed distribution. + +# SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution. +# BASE_NAME - are base name of the executable that will be launched after run this script. +# CUSTOM_SCRIPT_BLOCK - This is code from the customScript option +# RUN_COMMAND - This is command for run application. Requred BASE_DIR variable. +# +# #################################################################### + +BASE_DIR=$(dirname "$(readlink -f "$0")") +export PATH="$BASE_DIR"CQT_BIN_PATH:$PATH +export LD_LIBRARY_PATH="$BASE_DIR"CQT_LIB_PATH:"$BASE_DIR":$LD_LIBRARY_PATH +export QML_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML_IMPORT_PATH +export QML2_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML2_IMPORT_PATH +export QT_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH:$QT_PLUGIN_PATH +export QTWEBENGINEPROCESS_PATH="$BASE_DIR"CQT_BIN_PATH/QtWebEngineProcess +export QTDIR="$BASE_DIR" +export CQT_PKG_ROOT="$BASE_DIR" +export CQT_RUN_FILE="$BASE_DIR/CQT_BASE_NAME.sh" + +export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH/platforms:$QT_QPA_PLATFORM_PLUGIN_PATH + +CQT_CUSTOM_SCRIPT_BLOCK + +CQT_RUN_COMMAND diff --git a/Deploy/ScriptsTemplates/windows.bat b/Deploy/ScriptsTemplates/windows.bat new file mode 100644 index 0000000..8fdbfd6 --- /dev/null +++ b/Deploy/ScriptsTemplates/windows.bat @@ -0,0 +1,23 @@ +:: This is default bat run script of The CQtDeployer project. +:: This file contains key word that will replaced after deploy project. + +:: #################################################################### +:: All variables has the CQT_ prefix +:: BIN_PATH - are releative path to executable files of a deployed distribution. +:: LIB_PATH - are releative path to libraryes of a deployed distribution. +:: SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution. +:: BASE_NAME - are base name of the executable that will be launched after run this script. +:: CUSTOM_SCRIPT_BLOCK - This is code from the customScript option +:: RUN_COMMAND - This is command for run application. Requred BASE_DIR variable. + +:: #################################################################### + +@echo off +SET BASE_DIR=%~dp0 +SET PATH=%BASE_DIR%CQT_BIN_PATH;%BASE_DIR%CQT_LIB_PATH;%PATH%;CQT_SYSTEM_LIB_PATH +SET CQT_PKG_ROOT=%BASE_DIR% +SET CQT_RUN_FILE=%BASE_DIR%CQT_BASE_NAME.bat + +CQT_CUSTOM_SCRIPT_BLOCK + +CQT_RUN_COMMAND diff --git a/Deploy/configparser.cpp b/Deploy/configparser.cpp index f7f4085..bf371d4 100644 --- a/Deploy/configparser.cpp +++ b/Deploy/configparser.cpp @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -71,11 +71,11 @@ void parseTargetPrivate(DeployConfig& conf, auto &cointainer = conf.targetsEdit(); - for (const auto &iconPair: inputParams) { - auto pair = iconPair.split(DeployCore::getSeparator(1), splitbehavior); + for (const auto &targetPair: inputParams) { + auto pair = targetPair.split(DeployCore::getSeparator(1), splitbehavior); if (pair.size() == 1) { - QuasarAppUtils::Params::log(QString("Set new default icon for all tagets: " + pair.value(0)), + QuasarAppUtils::Params::log(QString("Set new default property for all tagets: " + pair.value(0)), QuasarAppUtils::Debug); for (auto& editableTarget: cointainer) { (editableTarget.*adder)(pair.value(0)); @@ -96,7 +96,7 @@ void parseTargetPrivate(DeployConfig& conf, } for (const auto &target: targetsMap) { - QuasarAppUtils::Params::log(QString("Set new icon for %0 taget. Icon: %1"). + QuasarAppUtils::Params::log(QString("Set new property for %0 taget."). arg(pair.value(0), pair.value(1)), QuasarAppUtils::Debug); (target->*adder)(pair.value(1)); @@ -104,6 +104,40 @@ void parseTargetPrivate(DeployConfig& conf, } } +template <typename Enabler> +bool enableOptionFotTargetPrivate(DeployConfig& conf, + const QStringList &inputParams, + Enabler enabler) { + + for (const auto &iconPair: inputParams) { + auto pair = iconPair.split(DeployCore::getSeparator(1), splitbehavior); + + if (pair.size() != 1) { + QuasarAppUtils::Params::log(QString("Failed parese list of option values, This option support only single leve list. " + " Example: use -Option val1,val2,val3 "), + QuasarAppUtils::Error); + return false; + } + + const auto targetsMap = conf.getTargetsListByFilter(pair.value(0)); + + if (!targetsMap.size()) { + QuasarAppUtils::Params::log(QString("Not found any targets for the %0 selector"). + arg(pair.value(0)), + QuasarAppUtils::Warning); + } + + for (const auto &target: targetsMap) { + QuasarAppUtils::Params::log(QString("Set new property for %0 taget."). + arg(pair.value(0)), + QuasarAppUtils::Debug); + (target->*enabler)(); + } + } + + return true; +} + bool ConfigParser::parseParams() { auto path = QuasarAppUtils::Params::getArg("confFile"); @@ -165,7 +199,7 @@ bool ConfigParser::parseParams() { QuasarAppUtils::Params::log("Deploy ...", QuasarAppUtils::Info); - if (!parseDeployMode()) { + if (!parseDeployMode(true)) { QuasarAppUtils::Params::log("Deploy failed!", QuasarAppUtils::Error); return false; @@ -178,7 +212,7 @@ bool ConfigParser::parseParams() { QuasarAppUtils::Params::log("Extract defaults Templates ...", QuasarAppUtils::Info); - if (!parseDeployMode()) { + if (!parseDeployMode(false)) { QuasarAppUtils::Params::log("Extract defaults Templates is failed!", QuasarAppUtils::Error); return false; @@ -239,9 +273,7 @@ QJsonValue ConfigParser::writeKeyArray(int separatorLvl, const QString ¶mete void ConfigParser::writeKey(const QString& key, QJsonObject& obj, const QString& confFileDir) const { - if (QuasarAppUtils::Params::isEndable(key)) { - obj[key] = writeKeyArray(0, QuasarAppUtils::Params::getArg(key), confFileDir); - } + obj[key] = writeKeyArray(0, QuasarAppUtils::Params::getArg(key), confFileDir); } QString ConfigParser::readKeyArray(int separatorLvl, const QJsonArray &array, @@ -323,9 +355,10 @@ bool ConfigParser::createFromDeploy(const QString& confFile) const { auto info = QFileInfo(confFile); - const auto keys = DeployCore::helpKeys(); + const auto keys = QuasarAppUtils::Params::getUserParamsMap().keys(); for (const auto &key :keys) { - writeKey(key, obj, info.absolutePath()); + if (key != "confFile") + writeKey(key, obj, info.absolutePath()); } if (!QFile::exists(info.absolutePath()) && @@ -429,6 +462,15 @@ bool ConfigParser::initDistroStruct() { auto trData = QuasarAppUtils::Params::getArg("tr"). split(DeployCore::getSeparator(0), splitbehavior); + auto installDirDeb = QuasarAppUtils::Params::getArg("installDirDeb"). + split(DeployCore::getSeparator(0), splitbehavior); + + auto debOut = QuasarAppUtils::Params::getArg("debOut"). + split(DeployCore::getSeparator(0), splitbehavior); + + auto zipOut = QuasarAppUtils::Params::getArg("zipOut"). + split(DeployCore::getSeparator(0), splitbehavior); + // init distro stucts for all targets if (binOut.size() && !parsePackagesPrivate(mainDistro, binOut, &DistroModule::setBinOutDir)) { packagesErrorLog("binOut"); @@ -510,12 +552,26 @@ bool ConfigParser::initDistroStruct() { return false; } + if (installDirDeb.size() && !parsePackagesPrivate(mainDistro, installDirDeb, &DistroModule::setInstallDirDEB)) { + packagesErrorLog("installDirDeb"); + return false; + } + + if (debOut.size() && !parsePackagesPrivate(mainDistro, debOut, &DistroModule::setDebOut)) { + packagesErrorLog("debOut"); + return false; + } + + if (zipOut.size() && !parsePackagesPrivate(mainDistro, zipOut, &DistroModule::setZipOut)) { + packagesErrorLog("zipOut"); + return false; + } + return true; } bool ConfigParser::initPackages() { defaultPackage = "Application"; - QSet<QString> configuredTargets; if (QuasarAppUtils::Params::isEndable("targetPackage")) { @@ -578,35 +634,6 @@ bool ConfigParser::initPackages() { return true; } -bool ConfigParser::initRunScripts() { - const auto list = QuasarAppUtils::Params::getArg("runScript").split(DeployCore::getSeparator(0), splitbehavior); - - for (const auto& line: list) { - auto pair = line.split(DeployCore::getSeparator(1), splitbehavior); - if (pair.size() != 2) { - QuasarAppUtils::Params::log("Syntax error of the runScript option." - " Example of use :" - " -runScript \"myTarget;path/To/Target/RunScript.sh," - "mySecondTarget;path/To/Target/SecondRunScript.sh\"", - QuasarAppUtils::Error); - return false; - } - - QFileInfo script(pair.value(1)); - - if (!script.isFile()) { - QuasarAppUtils::Params::log(QString("The %0 file does not exist.").arg(script.absoluteFilePath()), - QuasarAppUtils::Error); - return false; - } - - _config.registerRunScript(pair.value(0), - script.absoluteFilePath()); - } - - return true; -} - bool ConfigParser::initQmlInput() { auto qmlDir = QuasarAppUtils::Params::getArg("qmlDir"). @@ -633,7 +660,21 @@ void ConfigParser::packagesErrorLog(const QString &option) { QuasarAppUtils::Error); } -bool ConfigParser::parseDeployMode() { +void ConfigParser::initCustomPlatform() { + const auto platforms = QuasarAppUtils::Params::getArg("platform"). + split(DeployCore::getSeparator(0), splitbehavior); + + Platform customPlatform = Platform::UnknownPlatform; + + for (const auto& platform: platforms) { + customPlatform = customPlatform | DeployCore::getPlatformFromString(platform); + } + + _config.setCustomPlatform(customPlatform); + +} + +bool ConfigParser::parseDeployMode(bool checkBin) { if (QuasarAppUtils::Params::isEndable("deploySystem-with-libc")) { QuasarAppUtils::Params::log("You are using a deprecated option \"deploySystem-with-libc\"." @@ -648,6 +689,8 @@ bool ConfigParser::parseDeployMode() { setTargetDir(); + initCustomPlatform(); + auto bin = QuasarAppUtils::Params::getArg("bin"). split(DeployCore::getSeparator(0), splitbehavior); @@ -661,7 +704,7 @@ bool ConfigParser::parseDeployMode() { split(DeployCore::getSeparator(0), splitbehavior); - if (!(_config.targets().count() || xData.count())) { + if (checkBin && !(_config.targets().count() || xData.count())) { QuasarAppUtils::Params::log("Failed to initialize targets or extra data!", QuasarAppUtils::Error); @@ -683,11 +726,6 @@ bool ConfigParser::parseDeployMode() { } } - - if (!initRunScripts()) { - return false; - } - initIgnoreEnvList(); initEnvirement(); initIgnoreList(); @@ -695,7 +733,9 @@ bool ConfigParser::parseDeployMode() { return false; } - initExtraPath(); + if (!initExtraPath()) { + return false; + } initExtraNames(); initPlugins(); @@ -706,9 +746,9 @@ bool ConfigParser::parseDeployMode() { " then you must use the classic version of CQtDeployer instead of the snap version." " This is due to the fact that the snap version" " runs in an isolated container and has limited access" - " to system utilities and the environment. " - "For get the classic version of cqtdeployer use the cqtdeployer installer " - "https://github.com/QuasarApp/CQtDeployer/releases", QuasarAppUtils::Info); + " to system utilities and the environment." + " For get the classic version of cqtdeployer use the cqtdeployer installer" + " https://github.com/QuasarApp/CQtDeployer/releases", QuasarAppUtils::Info); } return false; @@ -760,15 +800,39 @@ bool ConfigParser::parseInitMode() { return true; } -void ConfigParser::configureTargets() { +bool ConfigParser::configureTargets() { const auto icons = QuasarAppUtils::Params::getArg("icon"). split(DeployCore::getSeparator(0), splitbehavior); + const auto runScripts = QuasarAppUtils::Params::getArg("runScript"). + split(DeployCore::getSeparator(0), splitbehavior); + + const auto disableRunScripts = QuasarAppUtils::Params::getArg("disableRunScript"). + split(DeployCore::getSeparator(0), splitbehavior); + + const auto disableShortcuts = QuasarAppUtils::Params::getArg("disableShortCut"). + split(DeployCore::getSeparator(0), splitbehavior); + + if (icons.size()) { parseTargetPrivate(_config, icons, &TargetInfo::setIcon); } - return; + if (runScripts.size()) { + parseTargetPrivate(_config, runScripts, &TargetInfo::setRunScript); + } + + if (disableShortcuts.size() && !enableOptionFotTargetPrivate(_config, disableShortcuts, &TargetInfo::disableShortCut)) { + packagesErrorLog("disableShortCut"); + return false; + } + + if (disableRunScripts.size() && !enableOptionFotTargetPrivate(_config, disableRunScripts, &TargetInfo::disableRunScript)) { + packagesErrorLog("disableRunScript"); + return false; + } + + return true; } bool ConfigParser::parseClearMode() { @@ -804,24 +868,34 @@ void ConfigParser::setTargetDir(const QString &target) { } } +bool ConfigParser::addTarget(const TargetData& target) { + + if (_config.customPlatform() == Platform::UnknownPlatform || + _config.customPlatform() & target.targetInfo.getPlatform()) { + + if (!_config.targetsEdit().contains(target.target)) { + _config.targetsEdit().insert(target.target, target.targetInfo); + return true; + } + } + + return false; +} + bool ConfigParser::setTargets(const QStringList &value) { bool isfillList = false; for (const auto &i : value) { - QFileInfo targetInfo = getBinInfo(i); + QFileInfo targetInfo = DeployCore::findItem(i); if (i.isEmpty()) continue; if (targetInfo.isFile()) { - auto target = createTarget(targetInfo.absoluteFilePath()); - if (!_config.targetsEdit().contains(target.target)) { - _config.targetsEdit().insert(target.target, target.targetInfo); - } - - isfillList = true; + if (addTarget(createTarget(targetInfo.absoluteFilePath()))) + isfillList = true; } else if (targetInfo.isDir()) { if (!setTargetsInDir(targetInfo.absoluteFilePath())) { @@ -832,30 +906,27 @@ bool ConfigParser::setTargets(const QStringList &value) { isfillList = true; } else { - QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " does not exist!", + QuasarAppUtils::Params::log(i + " is not a path. Try search this file in system enviroment", QuasarAppUtils::Debug); + + auto file = QFileInfo(DeployCore::findProcess(QProcessEnvironment::systemEnvironment().value("PATH"), i)); + + if (file.exists()) { + + if (addTarget(createTarget(file.absoluteFilePath()))) + isfillList = true; + + } else { + QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " does not exist!", + QuasarAppUtils::Debug); + } } + + // Work with exits target + } - if (!isfillList) - return false; - - return true; -} - -QFileInfo ConfigParser::getBinInfo(const QString &bin) { - auto prefixes = QuasarAppUtils::Params::getArg("binPrefix"). - split(DeployCore::getSeparator(0), splitbehavior); - - for (const QString& prefix :qAsConst(prefixes)) { - QFileInfo info(prefix + "/" + bin); - - if (info.isFile()) { - return info; - } - } - - return QFileInfo(bin); + return isfillList; } bool ConfigParser::setTargetsRecursive(const QString &dir) { @@ -899,13 +970,8 @@ 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)) { - - auto target = createTarget(QDir::fromNativeSeparators(file.absoluteFilePath())); - if (!_config.targetsEdit().contains(target.target)) { - _config.targetsEdit().insert(target.target, target.targetInfo); - } - - result = true; + if (addTarget(createTarget(QDir::fromNativeSeparators(file.absoluteFilePath())))) + result = true; } @@ -965,9 +1031,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")); _config.ignoreList.addRule(addRuleUnix("libz")); _config.ignoreList.addRule(addRuleUnix("librt")); @@ -1150,7 +1214,7 @@ bool ConfigParser::initQmake() { auto qt = *qtList.begin(); - if (qt.right(3).compare("lib", Qt::CaseInsensitive)) { + if (qt.rightRef(3).compare(QString("lib"), Qt::CaseInsensitive)) { return initQmakePrivate(QFileInfo(qt + "/../bin/qmake").absoluteFilePath()); } @@ -1285,7 +1349,7 @@ bool ConfigParser::setQtDir(const QString &value) { return true; } -void ConfigParser::initExtraPath() { +bool ConfigParser::initExtraPath() { auto listLibDir = QuasarAppUtils::Params::getArg("libDir"). split(DeployCore::getSeparator(0)); @@ -1300,6 +1364,16 @@ void ConfigParser::initExtraPath() { continue; } + if (_config.envirement.isIgnore(info.absoluteFilePath())) { + QuasarAppUtils::Params::log(QString("Failed to set libDir path!" + " The %0 path will be ignored because" + " this path is child path of the targetDir path" + " or manually added into ignore environment."). + arg(info.absoluteFilePath()), + QuasarAppUtils::Error); + return false; + } + dir.setPath(info.absoluteFilePath()); auto extraDirs = getSetDirsRecursive(QDir::fromNativeSeparators(info.absoluteFilePath()), _config.depchLimit); _config.extraPaths.addExtraPaths(extraDirs); @@ -1317,6 +1391,8 @@ void ConfigParser::initExtraPath() { QuasarAppUtils::Debug); } } + + return true; } void ConfigParser::initExtraNames() { @@ -1523,9 +1599,15 @@ bool ConfigParser::smartMoveTargets() { QuasarAppUtils::Params::log(QString("Available Targets: "), QuasarAppUtils::Debug); + + for (auto i = _config.targets().cbegin(); i != _config.targets().cend(); ++i) { if (!i.value().isValid()) { + + QuasarAppUtils::Params::log(i.value().toString(), + QuasarAppUtils::Error); + internalError(); return false; } @@ -1566,9 +1648,7 @@ bool ConfigParser::smartMoveTargets() { _config.targetsEdit() = temp; - configureTargets(); - - return result; + return result && configureTargets(); } ConfigParser::ConfigParser(FileManager *filemanager, PluginsParser *pluginsParser, DependenciesScanner* scaner, Packing *pac): diff --git a/Deploy/configparser.h b/Deploy/configparser.h index 54a9d20..8abf05a 100644 --- a/Deploy/configparser.h +++ b/Deploy/configparser.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -52,15 +52,14 @@ private: bool loadFromFile(const QString& file); bool initDistroStruct(); bool initPackages(); - bool initRunScripts(); - bool parseDeployMode(); + bool parseDeployMode(bool checkBin = true); bool parseInfoMode(); bool parseInitMode(); /** * @brief configureTargets Sets targets data from options. * @return true if function finishe successfull */ - void configureTargets(); + bool configureTargets(); bool parseClearMode(); @@ -68,7 +67,6 @@ private: void setTargetDir(const QString &target = ""); bool setTargets(const QStringList &value); - QFileInfo getBinInfo(const QString& bin); bool setTargetsRecursive(const QString &dir); bool setTargetsInDir(const QString &dir, bool recursive = false); @@ -85,7 +83,7 @@ private: bool setQmake(const QString &value); bool setQtDir(const QString &value); - void initExtraPath(); + bool initExtraPath(); void initExtraNames(); bool initPlugins(); @@ -116,6 +114,13 @@ private: QList<iDistribution *> getDistribution(); + /** + * @brief addTarget + * @param target + * @return true if target added successful + */ + bool addTarget(const TargetData &target); + void initCustomPlatform(); }; #endif // CQT_H diff --git a/Deploy/defines.h b/Deploy/defines.h index 5f31045..130ac7b 100644 --- a/Deploy/defines.h +++ b/Deploy/defines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/dependenciesscanner.cpp b/Deploy/dependenciesscanner.cpp index 50f0e58..6493769 100644 --- a/Deploy/dependenciesscanner.cpp +++ b/Deploy/dependenciesscanner.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -28,8 +28,8 @@ PrivateScaner DependenciesScanner::getScaner(const QString &lib) const { auto sufix = info.completeSuffix(); - if (sufix.compare("dll", Qt::CaseSensitive) == 0 || - sufix.compare("exe", Qt::CaseSensitive) == 0) { + if (sufix.contains("dll", Qt::CaseSensitive) || + sufix.contains("exe", Qt::CaseSensitive)) { return PrivateScaner::PE; } else if (sufix.isEmpty() || sufix.contains("so", Qt::CaseSensitive)) { return PrivateScaner::ELF; @@ -149,7 +149,7 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS if (!scanedLib.isValid()) { QSet<LibInfo> listDep = {}; - if (!lib._name.compare(dep.value()._name, ONLY_WIN_CASE_INSENSIATIVE)) + if (!lib._name.compare(dep.value()._name, DeployCore::getCaseSensitivity(lib._name))) continue; recursiveDep(*dep, listDep, libStack); diff --git a/Deploy/dependenciesscanner.h b/Deploy/dependenciesscanner.h index a4c3c13..9ad0c90 100644 --- a/Deploy/dependenciesscanner.h +++ b/Deploy/dependenciesscanner.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/dependencymap.cpp b/Deploy/dependencymap.cpp index 1561fdc..5e13506 100644 --- a/Deploy/dependencymap.cpp +++ b/Deploy/dependencymap.cpp @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/dependencymap.h b/Deploy/dependencymap.h index ecbfcb5..06267f5 100644 --- a/Deploy/dependencymap.h +++ b/Deploy/dependencymap.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/deploy.cpp b/Deploy/deploy.cpp index 1e6f9dd..0269899 100644 --- a/Deploy/deploy.cpp +++ b/Deploy/deploy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/deploy.h b/Deploy/deploy.h index 969d876..96ab3b5 100644 --- a/Deploy/deploy.h +++ b/Deploy/deploy.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/deploy_global.h b/Deploy/deploy_global.h index 0c8145c..c3cb527 100644 --- a/Deploy/deploy_global.h +++ b/Deploy/deploy_global.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -14,12 +14,6 @@ #define DISTRO_DIR QString("DistributionKit") -#ifdef Q_OS_WIN -#define ONLY_WIN_CASE_INSENSIATIVE Qt::CaseInsensitive -#else -#define ONLY_WIN_CASE_INSENSIATIVE Qt::CaseSensitive -#endif - #if defined(DEPLOY_LIBRARY) # define DEPLOYSHARED_EXPORT Q_DECL_EXPORT #else diff --git a/Deploy/deployconfig.cpp b/Deploy/deployconfig.cpp index 09836b2..948dcb0 100644 --- a/Deploy/deployconfig.cpp +++ b/Deploy/deployconfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -25,6 +25,19 @@ DeployConfig::getTargetsListByFilter(const QString &filter) { return result; } +QHash<QString, const TargetInfo *> +DeployConfig::getTargetsListByFilter(const QString &filter) const { + QHash<QString, const TargetInfo*> result; + + for( auto it = _targets.cbegin(); it != _targets.cend(); ++it) { + if (it.key().contains(filter, Qt::CaseInsensitive)) { + result.insert(it.key(), &(*it)); + } + } + + return result; +} + QString DeployConfig::getTargetDir(const QString &target) const { if (_targets.contains(target)) return targetDir + "/" + _targets.value(target).getPackage(); @@ -104,15 +117,6 @@ void DeployConfig::setDefaultPackage(const QString &value) { defaultPackage = value; } -void DeployConfig::registerRunScript(const QString &targetName, - const QString &scriptPath) { - _runScripts.insert(targetName, scriptPath); -} - -QString DeployConfig::getRunScript(const QString &targetName) const { - return _runScripts.value(targetName, ""); -} - QtMajorVersion DeployConfig::isNeededQt() const { auto Qt = QtMajorVersion::NoQt; @@ -139,6 +143,14 @@ QtMajorVersion DeployConfig::isNeededQt(const QString &pacakge) const { return Qt; } +Platform DeployConfig::customPlatform() const { + return _customPlatform; +} + +void DeployConfig::setCustomPlatform(Platform newCustomPlatform) { + _customPlatform = newCustomPlatform; +} + const QHash<QString, TargetInfo> &DeployConfig::targets() const { return _targets; } diff --git a/Deploy/deployconfig.h b/Deploy/deployconfig.h index 2abdf08..741bf94 100644 --- a/Deploy/deployconfig.h +++ b/Deploy/deployconfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -63,6 +63,7 @@ public: */ void reset(); QHash<QString, TargetInfo *> getTargetsListByFilter(const QString& filter); + QHash<QString, const TargetInfo *> getTargetsListByFilter(const QString& filter) const; /** * @brief targetPath @@ -122,9 +123,6 @@ public: QString getDefaultPackage() const; void setDefaultPackage(const QString &value); - void registerRunScript(const QString& targetName, const QString& scriptPath); - QString getRunScript(const QString& targetName) const; - /** * @brief isNeededQt This method return all needed qt major version for all targets. * @return qt major version @@ -138,6 +136,18 @@ public: */ QtMajorVersion isNeededQt(const QString& pacakge) const; + /** + * @brief customPlatform This is custom platform of distribution + * @return custom platform + */ + Platform customPlatform() const; + + /** + * @brief setCustomPlatform This method sets custom platform for this distribution. + * @param newCustomPlatform new custom platform. + */ + void setCustomPlatform(Platform newCustomPlatform); + private: /** @@ -155,18 +165,14 @@ private: */ QHash<QString, DistroModule> _packages; - /** - * @brief _runScripts - * target - pathToScript - */ - QHash<QString, QString> _runScripts; - /** * @brief targetDir - targe directory (this folder conteins all files of distrebution kit) */ QString targetDir = ""; QString defaultPackage = ""; + Platform _customPlatform = Platform::UnknownPlatform; + }; diff --git a/Deploy/deploycore.cpp b/Deploy/deploycore.cpp index ed71b0f..b13c063 100644 --- a/Deploy/deploycore.cpp +++ b/Deploy/deploycore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -7,7 +7,6 @@ #include "extracter.h" #include "deploycore.h" -#include "quasarapp.h" #include "pathutils.h" #include "pluginsparser.h" @@ -80,7 +79,8 @@ QtModuleEntry DeployCore::qtModuleEntries[] = { { QtTextToSpeechModule, "texttospeech", "QtXTextToSpeech", nullptr }, { QtSerialBusModule, "serialbus", "QtXSerialBus", nullptr }, { QtWebViewModule, "webview", "QtXWebView", nullptr }, - { QtVirtualKeyboard, "virtualkeyboard", "QtXVirtualKeyboard", nullptr } + { QtVirtualKeyboard, "virtualkeyboard", "QtXVirtualKeyboard", nullptr }, + { QtShaderToolsModule, "shadertools", "QtXShaderTools", nullptr } }; DeployCore::QtModule DeployCore::getQtModule(const QString& path) { @@ -106,12 +106,12 @@ DeployCore::QtModule DeployCore::getQtModule(const QString& path) { void DeployCore::addQtModule(DeployCore::QtModule &module, const QString &path) { QuasarAppUtils::Params::log("Current module " + QString::number(module), - QuasarAppUtils::Debug); + QuasarAppUtils::Debug); auto mod = getQtModule(path); QuasarAppUtils::Params::log("Add new module from path " + path + - " module value " + QString::number(mod), - QuasarAppUtils::Debug); + " module value " + QString::number(mod), + QuasarAppUtils::Debug); module = static_cast<DeployCore::QtModule>( @@ -185,9 +185,384 @@ RunMode DeployCore::getMode() { return RunMode::Info; } +QuasarAppUtils::OptionsDataList DeployCore::avilableOptions() { + QString group = "Part 1 Boolean options"; + QuasarAppUtils::OptionsDataList help = {}; + help.insert(group, {QuasarAppUtils::OptionData{ + {"init"}, "", + "will initialize cqtdeployer.json file (configuration file).", + "'cqtdeployer init' - for initialize base package configuration. " + "'cqtdeployer -init multi' - for initialize multi package configuration " + "'cqtdeployer -init single' - for initialize singel package configuration" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"clear"}, "", + "Deletes deployable files of the previous session." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"force-clear"}, "", + "Deletes the destination directory before deployment." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noStrip"}, "", + "Skips strip step" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noTranslations"}, "", + "Skips the translations files. It doesn't work without qmake." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noOverwrite"}, "", + "Prevents replacing existing files." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noCheckRPATH"}, "", + "Disables automatic search of paths to qmake in executable files." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noCheckPATH"}, "", + "Disables automatic search of paths to qmake in system PATH." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noRecursiveiIgnoreEnv"}, "", + "Disables recursive ignore for ignoreEnv option." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"v", "version"}, "", + "Shows compiled version" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"h", "help"}, "", + "Show all help or help of the selected options." + " You can add any another option to a command line for show help about using options" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"qif","-qif"}, "", + "Create the QIF installer for deployment programm" + " You can specify the path to your own installer template.", + "Examples: cqtdeployer -qif path/to/myCustom/qif." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"qifFromSystem"}, "", + "force use system binarycreator tool of qif from path or qt" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"zip"}, "", + "Create the ZIP arhive for deployment programm" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"deb", "-deb"}, "", + "Create the deb package for deployment programm" + " You can specify the path to your own debian template.", + "cqtdeployer -deb path/to/myCustom/DEBIAN." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"deploySystem"}, "", + "Deploys all libraries." + " Not recomendet because there may be conflicts with system libraries" + " (on snap version you need to turn on permission)" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noQt"}, "", + "Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"allowEmptyPackages"}, "", + "Allows configure the empty packages." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"getDefaultTemplate"}, "", + "Extracts defaults deb or qif templates." + " All templates extract into targetDirectory." + " For change target directory use the targetDir option.", + "cqtdeployer -bin myExecutable getDefaultTemplate qif deb." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"noHashSum"}, "", + "This option disable computation of a packages hash sum" + }}); + + group = "Part 2 Deploy options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-bin"}, "{list,params}", + "Files to deploy or folders that contain files to deploy.", + "-bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll." + " For files: These files will be unconditional copied to the destination directory," + " regardless of their format or suffix." + " For folders:" + " CCQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory." + " Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and libDir paths." + "**Note**: If CQtDeployer can't find required file then" + " CQtDeployer try find required file in the system PATH enviroment." + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-binPrefix"}, "{prefixPath}", + "Sets prefix path for bin option.", + "-bin path/MyExecutable is some as -bin MyExecutable -binPrefix path" + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-confFile"}, "{params}", + "The path to the json file with all deployment configurations. Using this file," + " you can add the necessary options, thereby simplifying the command invocation in the console." + " However, the parameters in Kansol have a higher priority than in the file." + " For more info about this flag see https://github.com/QuasarApp/CQtDeployer/wiki/DeployConfigFileEn" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qmlDir"}, "{params}", + "Sets path to Qml data dir", + "-qmlDir ~/my/project/qml" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qmake"}, "{params}", + "Sets path to the qmake executable.", + "-qmake ~/Qt/bin/qmake or -qmake ~/Qt/bin/qmake.exe" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-ignore"}, "{list,params}", + "Sets the list of libs to ignore.", + "-ignore libicudata.so.56,libicudata2.so.56" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-ignoreEnv"}, "{list,params}", + "Sets the list of the environment to ignore.", + "-ignoreEnv /bad/dir,/my/bad/Dir" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-libDir"}, "{list,params}", + "Sets additional paths for extra libs of an app.", + "-libDir ~/myLib,~/newLibs" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-extraLibs"}, "{list,params}", + "Sets the mask of the library name for forced copying.", + "\"-extraLib mySql\" - forces to copy all libraries whose names contain mySql to the project folder." + " This option is case-insensitive on Windows and case-sensitive on other platforms." + " This option will only search libraries in system environments similar to **deploySystem**." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-customScript"}, "{scriptCode}", + "Insert extra code inTo All run script.", + "", + " This option will be removed into next release cqtdeployer." + " Please use the runScript option" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-recursiveDepth"}, "{params}", + "Sets the Depth of recursive search of libs and depth for ignoreEnv option (default 0)" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-installDirQIFW"}, "{params}", + "Sets install target directory for installers (by default it is /home path)" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-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", + "cqtdeployer -runScript \"myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh\"" + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-platform"}, "{platforms,list}", + "Force deploy only one selected platforms. " + "If this option is enabled then CQtDeployer will deploy only binaries of a selected platform. Supported values: " + "[win_x86 win_x86_64 win_arm win_arm64 linux_x86 linux_x86_64 linux_ARM linux_ARM64]" + }}); + + + group = "Part 3 Control of packages options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-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." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qmlOut"}, "{package;path,path}", + "Sets path to qml out directory" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-libOut"}, "{package;path,path}", + "Sets path to libraries out directory" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-trOut"}, "{package;path,path}", + "Sets path to Sets path to translations out directory" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-pluginOut"}, "{package;path,path}", + "Sets path to plugins out directory" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-binOut"}, "{package;path,path}", + "Sets path to binary out directory" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-recOut"}, "{package;path,path}", + "Sets path to recurses out directory" + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-extraDataOut"}, "{package;path,path}", + "Sets path to extra data files out directory. By Default it is root dir of the distribution." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-name"}, "{package;val,val}", + "Sets name for a package." + "If this if you do not specify a package, the value will be assigned to the default package ("")" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-description"}, "{package;val,val}", + "Sets description for a package" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-deployVersion"}, "{package;val,val}", + "Sets version for a package" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-releaseDate"}, "{package;val,val}", + "Sets release date for a package" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-publisher"}, "{package;val,val}", + "Sets publisher for a package" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-homePage"}, "{package;val,val}", + "Sets the home page url for a package" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-prefix"}, "{package;val,val}", + "Sets the prefix for the package relatively a target directory " + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-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." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-tr"}, "{package;val,val}", + "Adds qm files into the translations folder." + }}); + + group = "Part 4 Control of target options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-icon"}, "{target;val,val}", + "Sets path to icon for a targets" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-disableRunScript"}, "{package;val,val}", + "Disables a generation of run script for selected targets" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-disableShortCut"}, "{package;val,val}", + "Disables a generation of shortcut for selected targets" + }}); + + group = "Part 5 Plugins Control Options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-extraPlugin"}, "{package;val1;val2,SingeleVal}", + "Sets an additional path to third-party application plug-in" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-enablePlugins"}, "{package;val1;val2,SingeleVa}", + "Enables additional plugins for distribution." + " By default disabled next plugins: " + PluginsParser::defaultForbidenPlugins().join(',') + " if you want enable" + " it then use '-enablePlugins " + PluginsParser::defaultForbidenPlugins().join(',') + "' option" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-disablePlugins"}, "{package;val1;val2,SingeleVal}", + "Disables plugins for distribution. " + "You can disable any plugin of your Qt build, just see the yourQtFolder/plugins forlder for available plugins." + " Example if you want disable qxcb plugin: -disablePlugins qxcb." + " Note that the name of the plugin is indicated without its extension" + }}); + + group = "Part 6 QtInstallFramework options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifStyle"}, "{path/to/style.css}", + "Sets the path to the CSS style file or sets the default style." + " Available styles: quasar, quasarDark" + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifBanner"}, "{path/to/banner.png}", + "Sets path to the banner png file." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifLogo"}, "{path/to/logo.png}", + "Sets path to the logo png file." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifOut"}, "{nameOfOutputInstallerFile}", + "Sets name of output qifw installer. Note: on Windows, the exe suffix will be added to the installer automatically." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifConfig"}, "{path/to/config.xml}", + "Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml. Note This path sets releative target folder (sets by TargetDir option)." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifPackages"}, "{path/to/packagesFodoler}", + "Sets a custom path to the packages directories. By default it is qif/packages. Note This path sets releative target folder (sets by TargetDir option)." + }}); + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifResources"}, "{path/to/resources1.qrc,path/to/resources2.qrc}", + "Sets a custom path to the resources files. By default this option is skipped. Note This path sets releative target folder (sets by TargetDir option)." + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-targetDir"}, "{params}", + "Sets target directory(by default it is the path to the first deployable file)" + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-qifArchiveFormat"}, "[7z|zip|tar|tar.gz|tar.bz2|tar.xz]", + "Sets the format used when packaging new component data archives." + " If you omit this option, the 7z format will be used as a default. " + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-binarycreator"}, "{binarycreator command}", + "Sets new binarycreator command.", + "cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'" + }}); + + group = "Part 7 Deb package options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-debOut"}, "{package;nameOfOutputDebFile,nameOfOutputDebFile}", + "Sets name of the output debian file. This option can be work with multiple packages" + }}); + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-installDirDeb"}, "{params}", + "Sets install target directory fordebian package (by default it is /opt path)" + }}); + + + group = "Part 8 zip package options"; + + help.insert(group, {QuasarAppUtils::OptionData{ + {"-zipOut"}, "{package;nameOfOutputZipFile,nameOfOutputZipFile}", + "Sets name of the output zip arrhive. This option can be work with multiple packages" + }}); + + return help; +} + void DeployCore::help() { + auto localHelp = QuasarAppUtils::Params::getHelpOfInputOptions(); + if(!localHelp.isEmpty()) { + QuasarAppUtils::Help::print(localHelp); + return; + } + + // help extra data; QuasarAppUtils::Help::Charters help = { { "Part 0 General", { @@ -195,131 +570,6 @@ void DeployCore::help() { {"Usage", "cqtdeployer <-bin [params]> [options]"}, } }, - { - "Part 1 Boolean options", { - {"init", "will initialize cqtdeployer.json file (configuration file)." - " For example: 'cqtdeployer init' - for initialize base package configuration." - " 'cqtdeployer -init multi' - for initialize multi package configuration" - " 'cqtdeployer -init single' - for initialize singel package configuration"}, - {"help / h", "Shows help"}, - {"clear", "Deletes deployable files of the previous session."}, - {"force-clear", "Deletes the destination directory before deployment."}, - {"noStrip", "Skips strip step"}, - {"noTranslations", "Skips the translations files. It doesn't work without qmake."}, - {"noOverwrite", "Prevents replacing existing files."}, - {"noCheckRPATH", "Disables automatic search of paths to qmake in executable files."}, - {"noCheckPATH", "Disables automatic search of paths to qmake in system PATH."}, - {"noRecursiveiIgnoreEnv", "Disables recursive ignore for ignoreEnv option."}, - {"v / version", "Shows compiled version"}, - {"qif", "Create the QIF installer for deployment programm" - " You can specify the path to your own installer template. Examples: cqtdeployer -qif path/to/myCustom/qif."}, - {"qifFromSystem", "force use system binarycreator tool of qif from path or qt"}, - {"zip", "Create the ZIP arhive for deployment programm"}, - {"deb", "Create the deb package for deployment programm" - " You can specify the path to your own debian template. Examples: cqtdeployer -deb path/to/myCustom/DEBIAN."}, - {"deploySystem", "Deploys all libraries." - " Not recomendet because there may be conflicts with system libraries" - " (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."}, - {"noHashSum", "This option disable computation of a packages hash sum"} - - - } - }, - { - "Part 2 Deploy options", { - {"-bin [list, params]", "Files to deploy or folders that contain files to deploy." - " For example -bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll." - " For files: These files will be unconditional copied to the destination directory," - " regardless of their format or suffix." - " For folders:" - " CCQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory." - " Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and libDir paths."}, - {"-binPrefix [prefixPath]", "Sets prefix path for bin option." - " Example: " - "-bin path/MyExecutable is some as -bin MyExecutable -binPrefix path" }, - - {"-confFile [params]", "The path to the json file with all deployment configurations. Using this file," - " you can add the necessary options, thereby simplifying the command invocation in the console." - " However, the parameters in Kansol have a higher priority than in the file." - " For more info about this flag see https://github.com/QuasarApp/CQtDeployer/wiki/DeployConfigFileEn"}, - {"-qmlDir [params]", "Qml data dir. For example -qmlDir ~/my/project/qml"}, - {"-qmake [params]", "Deployable file or folder. For example -bin ~/my/project/bin/,~/my/project/bin.exe"}, - {"-ignore [list,params]", "The list of libs to ignore. For example -ignore libicudata.so.56,libicudata2.so.56"}, - {"-ignoreEnv [list,params]", "The list of the environment to ignore. For example -ignoreEnv /bad/dir,/my/bad/Dir"}, - {"-libDir [list,params]", "Sets additional paths for extra libs of an app. For example -libDir ~/myLib,~/newLibs"}, - {"-extraLibs [list,params]", "Sets the mask of the library name for forced copying." - " Example: \"-extraLib mySql\" - forces to copy all libraries whose names contain mySql to the project folder." - " This option is case-insensitive on Windows and case-sensitive on other platforms." - " This option will only search libraries in system environments similar to **deploySystem**."}, - {"-customScript [scriptCode]", "Insert extra code inTo All run script."}, - {"-recursiveDepth [params]", "Sets the Depth of recursive search of libs and depth for ignoreEnv option (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\""}, - {"-verbose [0-3]", "Shows debug log"}, - - } - }, - { - "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"}, - {"-libOut [package;path,path]", "Sets path to libraries out directory"}, - {"-trOut [package;path,path]", "Sets path to translations out directory"}, - {"-pluginOut [package;path,path]", "Sets path to plugins out directory"}, - {"-binOut [package;path,path]", "Sets path to binary out directory"}, - {"-recOut [package;path,path]", "Sets path to recurses out directory"}, - {"-extraDataOut [package;path,path]", "Sets path to extra data files out directory. By Default it is root dir of the distribution."}, - {"-name [package;val,val]", "Sets name for a package. " - "If this if you do not specify a package, the value will be assigned to the default package ("")"}, - {"-description [package;val,val]", "Sets description for a package"}, - {"-deployVersion [package;val,val]", "Sets version for a package"}, - {"-releaseDate [package;val,val]", "Sets release date for a package"}, - {"-publisher [package;val,val]", "Sets publisher for a package"}, - {"-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."}, - - - } - }, - - { - "Part 4 Control of packages options", { - {"-icon [target;val,val]", "Sets path to icon for a targets"} - } - }, - - { - "Part 5 Plugins Control Options", { - {"-extraPlugin [package;val1;val2,SingeleVal]", "Sets an additional path to third-party application plug-in"}, - {"-enablePlugins [package;val1;val2,SingeleVal", "Enables additional plugins for distribution." - " By default disabled next plugins: " + PluginsParser::defaultForbidenPlugins().join(',') + " if you want enable" - " it then use '-enablePlugins " + PluginsParser::defaultForbidenPlugins().join(',') + "' option"}, - {"-disablePlugins [package;val1;val2,SingeleVal]", "Disables plugins for distribution. " - "You can disable any plugin of your Qt build, just see the yourQtFolder/plugins forlder for available plugins." - " Example if you want disable qxcb plugin: -disablePlugins qxcb." - " Note that the name of the plugin is indicated without its extension"}, - - } - }, - { - "Part 6 QtInstallFramework options", { - {"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style." - " Available styles: quasar, quasarDark"}, - {"-qifBanner [path/to/banner.png]", "Sets path to the banner png file."}, - {"-qifLogo [path/to/logo.png]", "Sets path to the logo png file."}, - } - }, { "Support", { {"Support for you", "If you have any questions or problems with cqtdeployer you can write to us about the problem on the GitHub page: https://github.com/QuasarApp/CQtDeployer/issues"}, @@ -328,71 +578,13 @@ void DeployCore::help() { } }; - help.unite(QuasarAppUtils::Params::getParamsHelp()); + help += QuasarAppUtils::Params::getHelp(); QuasarAppUtils::Help::print(help); return; } -QStringList DeployCore::helpKeys() { - return { - "help", - "noOverwrite", - "bin", - "extraData", - "qmlDir", - "deploySystem", - "qmake", - "ignore", - "ignoreEnv", - "clear", - "force-clear", - "libDir", - "extraLibs", - "extraPlugin", - "recursiveDepth", - "targetDir", - "targetPackage", - "noStrip", - "extractPlugins", - "noTranslations", - "noRecursiveiIgnoreEnv", - "qifFromSystem", - "qmlOut", - "libOut", - "trOut", - "pluginOut", - "binOut", - "recOut", - "extraDataOut", - "version", - "verbose", - "qif", - "noCheckRPATH", - "noCheckPATH", - "name", - "description", - "deployVersion", - "releaseDate", - "icon", - "publisher", - "customScript", - "qifStyle", - "qifBanner", - "qifLogo", - "zip", - "noQt", - "homePage", - "prefix", - "deb", - "allowEmptyPackages", - "runScript", - "getDefaultTemplate", - "tr" - }; -} - QStringList DeployCore::extractTranslation(const QSet<QString> &libs) { QSet<QString> res; const size_t qtModulesCount = sizeof(qtModuleEntries) / sizeof(QtModuleEntry); @@ -449,7 +641,7 @@ QString DeployCore::findProcess(const QString &env, const QString& proc) { auto files = QDir(path).entryInfoList(QDir::NoDotAndDotDot | QDir::Files); for (const auto& bin : files) { - if (bin.baseName().compare(proc, ONLY_WIN_CASE_INSENSIATIVE) == 0) { + if (bin.baseName().compare(proc, DeployCore::getCaseSensitivity()) == 0) { return bin.absoluteFilePath(); } } @@ -465,7 +657,7 @@ QStringList DeployCore::debugExtensions() { bool DeployCore::isDebugFile(const QString &file) { auto debug = debugExtensions(); for (const auto& debugEx: debug) { - if (file.contains(debugEx, ONLY_WIN_CASE_INSENSIATIVE)) { + if (file.contains(debugEx, Qt::CaseInsensitive)) { return true; } } @@ -588,10 +780,23 @@ QString DeployCore::getMSVCVersion(MSVCVersion msvc) { QtMajorVersion DeployCore::isQtLib(const QString &lib) { QFileInfo info(lib); -/* - * Task https://github.com/QuasarApp/CQtDeployer/issues/422 - * All qt libs need to contains the Qt label. -*/ + + QtMajorVersion isQt = isQtLibName(lib); + + if (_config && !_config->qtDir.isQt(info.absoluteFilePath())) { + return QtMajorVersion::NoQt; + } + + return isQt; +} + +QtMajorVersion DeployCore::isQtLibName(const QString &lib) { + QFileInfo info(lib); + + /* + * Task https://github.com/QuasarApp/CQtDeployer/issues/422 + * All qt libs need to contains the Qt label. + */ QtMajorVersion isQt = QtMajorVersion::NoQt; if (!isLib(info)) { @@ -599,18 +804,14 @@ QtMajorVersion DeployCore::isQtLib(const QString &lib) { } QString fileName = info.fileName(); - if (fileName.contains("Qt4", ONLY_WIN_CASE_INSENSIATIVE)) { + if (fileName.contains("Qt4", getCaseSensitivity(fileName))) { isQt = QtMajorVersion::Qt4; - } else if (fileName.contains("Qt5", ONLY_WIN_CASE_INSENSIATIVE)) { + } else if (fileName.contains("Qt5", getCaseSensitivity(fileName))) { isQt = QtMajorVersion::Qt5; - } else if (fileName.contains("Qt6", ONLY_WIN_CASE_INSENSIATIVE)) { + } else if (fileName.contains("Qt6", getCaseSensitivity(fileName))) { isQt = QtMajorVersion::Qt6; } - if (_config && !_config->qtDir.isQt(info.absoluteFilePath())) { - return QtMajorVersion::NoQt; - } - if (isQt && QuasarAppUtils::Params::isEndable("noQt") && !QuasarAppUtils::Params::isEndable("qmake")) { return QtMajorVersion::NoQt; @@ -625,8 +826,8 @@ bool DeployCore::isExtraLib(const QString &lib) { } bool DeployCore::isAlienLib(const QString &lib) { - return lib.contains("/opt/", ONLY_WIN_CASE_INSENSIATIVE) || - lib.contains("/PROGRAM FILES", ONLY_WIN_CASE_INSENSIATIVE); + return lib.contains("/opt/", Qt::CaseSensitive) || + lib.contains("/PROGRAM FILES", Qt::CaseInsensitive); } bool DeployCore::isAllowedLib(const QString &lib) { @@ -639,13 +840,18 @@ QStringList DeployCore::Qt3rdpartyLibs(Platform platform) { QStringList result; result << QStringList { - // Begin SQL LIBS + // SQL LIBS // See task https://github.com/QuasarApp/CQtDeployer/issues/367 - "libpq", - "mysqlclient" + "mysqlclient", + + // SLL Libs + // See task https://github.com/QuasarApp/CQtDeployer/issues/620 + "libcrypto", + "libssl", + "libeay32", + "ssleay32", - // End SQL LIBS }; if (platform & Platform::Win) { @@ -693,6 +899,61 @@ QStringList DeployCore::Qt3rdpartyLibs(Platform platform) { return result; } +QString DeployCore::platformToString(Platform platform) { + int platformVal = 1; + QString result; + + QHash<int, QString> platformsMap = { + {Platform::Win32, "win_x86"}, + {Platform::Win64, "win_x86_64"}, + {Platform::Win_ARM_32, "win_arm"}, + {Platform::win_ARM_64, "win_arm64"}, + {Platform::Unix_x86_32, "linux_x86"}, + {Platform::Unix_x86_64, "linux_x86_64"}, + {Platform::Unix_ARM_32, "linux_ARM"}, + {Platform::Unix_ARM_64, "linux_ARM64"}, + {Platform::WebGl, "WebGl"}, + {Platform::WebRemote, "WebRemote"}, + {Platform::GeneralFile, "GeneralFile"} + }; + + while (platformVal <= Platform::GeneralFile) { + + if (platformVal & platform) { + result.push_back((result.size()? ", " : "") + platformsMap.value(platformVal, " Unknown")); + } + + platformVal = platformVal << 1; + + + } + + return result; +} + +Platform DeployCore::getPlatformFromString(const QString &platformName) { + + if (platformName == "auto") { + return Platform(0); + } + + QHash<QString, Platform> platformsMap = { + {"win_x86", Platform::Win32}, + {"win_x86_64", Platform::Win64}, + {"win_arm", Platform::Win_ARM_32}, + {"win_arm64", Platform::win_ARM_64}, + {"linux_x86", Platform::Unix_x86_32}, + {"linux_x86_64", Platform::Unix_x86_64}, + {"linux_ARM", Platform::Unix_ARM_32}, + {"linux_ARM64", Platform::Unix_ARM_64}, + {"WebGl", Platform::WebGl}, + {"WebRemote", Platform::WebRemote}, + {"GeneralFile", Platform::GeneralFile} + }; + + return platformsMap.value(platformName, Platform(0)); +} + QChar DeployCore::getSeparator(int lvl) { switch (lvl) { case 0: return ','; @@ -751,6 +1012,40 @@ void DeployCore::printInternalError(const char * function, const char* file, int " about this problem on the official github page" " https://github.com/QuasarApp/CQtDeployer/issues/new/choose. "), QuasarAppUtils::Error); +} + +QFileInfo DeployCore::findItem(const QString &bin) { + auto prefixes = QuasarAppUtils::Params::getArg("binPrefix"). + split(DeployCore::getSeparator(0), splitbehavior); + + for (const QString& prefix :qAsConst(prefixes)) { + QFileInfo info(prefix + "/" + bin); + + if (info.exists()) { + return info; + } + } + + return QFileInfo(bin); +} + +Qt::CaseSensitivity DeployCore::getCaseSensitivity(const QString &checkedFile) { + + if (checkedFile.isEmpty()) { +#ifdef Q_OS_WIN + return Qt::CaseInsensitive; +#else + return Qt::CaseSensitive; +#endif + } + + QString sufix = QFileInfo(checkedFile).completeSuffix(); + if (sufix.compare("dll", Qt::CaseInsensitive) == 0 || + sufix.compare("exe", Qt::CaseInsensitive)) { + return Qt::CaseInsensitive; + } + + return Qt::CaseSensitive; }; QString DeployCore::systemLibsFolderName() { diff --git a/Deploy/deploycore.h b/Deploy/deploycore.h index dabe42a..d0fd2ea 100644 --- a/Deploy/deploycore.h +++ b/Deploy/deploycore.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -13,6 +13,7 @@ #include <QFileInfo> #include "deploy_global.h" #include "defines.h" +#include "quasarapp.h" enum MSVCVersion: int { MSVC_Unknown = 0x0, @@ -181,7 +182,8 @@ public: QtVirtualKeyboard = 0x0010000000000000, // Qt6 QtOpenGLWidgetsModule = 0x0010000000000000, - QtSvgWidgetsModule = 0x0020000000000000 + QtSvgWidgetsModule = 0x0020000000000000, + QtShaderToolsModule = 0x0040000000000000 }; DeployCore() = delete; @@ -194,7 +196,20 @@ public: static MSVCVersion getMSVC(const QString & _qtBin); static QString getVCredist(const QString & _qtBin); + /** + * @brief isQtLib This method check full path of the library. If the @a lib contains only name then this method retun QtMajorVersion::NoQt enum. For validate @a lib by name only use the DeployCore::isQtLibName method. + * @param lib This is library full path.. + * @return major version of the Qt. + */ static QtMajorVersion isQtLib(const QString &lib); + + /** + * @brief isQtLib This method check name of the library. + * @param lib This is library full path.. + * @return major version of the Qt. + */ + static QtMajorVersion isQtLibName(const QString &lib); + static bool isExtraLib(const QString &lib); static QChar getSeparator(int lvl); static bool isAlienLib(const QString &lib); @@ -215,13 +230,27 @@ public: */ static QStringList Qt3rdpartyLibs(Platform platform); + /** + * @brief platformToString This method convert platform value to string value. + * @param platform This is input platform value. + * @return String name of the @a platform + */ + static QString platformToString(Platform platform); + + /** + * @brief getPlatformFromString This method return platform enum value form string. + * @param platformName This is string platform value. + * @return platform enum value form string. + */ + static Platform getPlatformFromString(const QString &platformName); + static char getEnvSeparator(); static LibPriority getLibPriority(const QString &lib); /** * @brief containsModule This method compare lib name and module of qt. - * @param muduleIndex this is name of module library + * @param moduleLibrary this is name of module library * @param lib This is library name * @return true if library has some module that as muduleIndex */ @@ -236,7 +265,7 @@ public: static bool isGui(DeployCore::QtModule module); static RunMode getMode(); static void help(); - static QStringList helpKeys(); + static QuasarAppUtils::OptionsDataList avilableOptions(); static QStringList extractTranslation(const QSet<QString> &libs); static QString getAppVersion(); @@ -262,7 +291,7 @@ public: /** * @brief getLibCoreName This method remove platfomr specificly prefixes and sufixes of the librarry. * Example : getLibCoreName(libTest.so) return Test - * @param baseName This is information about checked library. + * @param info This is information about checked library. * @return return core name of the library. */ static QString getLibCoreName(const QFileInfo& info); @@ -282,6 +311,19 @@ public: */ static void printInternalError(const char *function, const char* file, int line); + /** + * @brief findItem This method search input file in prefixes and return absolute path to the found file. If file is not exists the return empty string. + * @param file This is file path. If the file path si absalute path then return @a file value. + * @return file info of the found file. + */ + static QFileInfo findItem(const QString &file); + + /** + * @brief getCaseSensitivity This method return case sensitivity for a @a checkedFile. Usually return Qt::CaseSensiativy exept windows binaryes files like a dll and exe. + * @param checkedFile This is checked file. By default empty value. + * @return Qt CaseSensitivity value + */ + static Qt::CaseSensitivity getCaseSensitivity(const QString& checkedFile = ""); }; #define internalError() DeployCore::printInternalError(__FUNCTION__, __FILE__, __LINE__) diff --git a/Deploy/distromodule.cpp b/Deploy/distromodule.cpp index 3093e15..a85573b 100644 --- a/Deploy/distromodule.cpp +++ b/Deploy/distromodule.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -148,6 +148,33 @@ void DistroModule::setKey(const QString &key) { _key = key; } +const QString &DistroModule::zipOut() const { + return _zipOut; +} + +void DistroModule::setZipOut(const QString &newZipOut) { + _zipOut = newZipOut; +} + +const QString &DistroModule::debOut() const { + return _debOut; +} + +void DistroModule::setDebOut(const QString &newDebOut) { + _debOut = newDebOut; +} + +QString DistroModule::installDirDEB() const { + if (_installDirDEB.isEmpty()) + return "/opt"; + + return _installDirDEB; +} + +void DistroModule::setInstallDirDEB(const QString &newInstallDir) { + _installDirDEB = newInstallDir; +} + QSet<QString> DistroModule::tr() const { return _tr; } diff --git a/Deploy/distromodule.h b/Deploy/distromodule.h index 63ec37c..84aa6a6 100644 --- a/Deploy/distromodule.h +++ b/Deploy/distromodule.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -74,6 +74,33 @@ public: void setTr(const QSet<QString> &tr); void addTr(const QString &tr); + QString installDirDEB() const; + void setInstallDirDEB(const QString &newInstallDir); + + /** + * @brief debOut This method return output filePath to debian pacakge + * @return output filePath to debian pacakge + */ + const QString &debOut() const; + + /** + * @brief setDebOut This method sets new value of debian outpup path. + * @param newDebOut This is new value of the debian output + */ + void setDebOut(const QString &newDebOut); + + /** + * @brief debOut This method return output filePath to zip pacakge + * @return output filePath to zip pacakge + */ + const QString &zipOut() const; + + /** + * @brief setDebOut This method sets new value of zip outpup path. + * @param newDebOut This is new value of the zip output + */ + void setZipOut(const QString &newZipOut); + protected: void setKey(const QString &key); @@ -101,6 +128,9 @@ private: // extra translations QSet<QString> _tr; + QString _installDirDEB; + QString _debOut; + QString _zipOut; }; diff --git a/Deploy/distrostruct.cpp b/Deploy/distrostruct.cpp index aaa7deb..50572cc 100644 --- a/Deploy/distrostruct.cpp +++ b/Deploy/distrostruct.cpp @@ -1,6 +1,6 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/distrostruct.h b/Deploy/distrostruct.h index 8dc931b..782c7da 100644 --- a/Deploy/distrostruct.h +++ b/Deploy/distrostruct.h @@ -1,6 +1,6 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/elf_type.cpp b/Deploy/elf_type.cpp index adb2925..cb2829a 100644 --- a/Deploy/elf_type.cpp +++ b/Deploy/elf_type.cpp @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -55,7 +55,10 @@ bool ELF::getLibInfo(const QString &lib, LibInfo &info) const { auto headers = reader.readHeaders(); - if (headers.elfmachine == ElfMachine::Elf_EM_ARM) { + const int Elf_EM_ARM64 = 0xb7; + + if (headers.elfmachine == ElfMachine::Elf_EM_ARM || + static_cast<int>(headers.elfmachine) == Elf_EM_ARM64 ) { if (headers.elfclass == ElfClass::Elf_ELFCLASS32) { info.setPlatform(Unix_ARM_32); diff --git a/Deploy/elf_type.h b/Deploy/elf_type.h index a263d43..217861f 100644 --- a/Deploy/elf_type.h +++ b/Deploy/elf_type.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/envirement.cpp b/Deploy/envirement.cpp index efe403d..51bbb0f 100644 --- a/Deploy/envirement.cpp +++ b/Deploy/envirement.cpp @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -65,7 +65,9 @@ void Envirement::addEnv(const QStringList &listDirs) { for (const auto& i : listDirs) { auto path = PathUtils::fixPath(QFileInfo(i).absoluteFilePath()); - if (_ignoreEnvList && _ignoreEnvList->inThisEnvirement(i)) { + if (isIgnore(i)) { + QuasarAppUtils::Params::log(QString("The %0 path is ignored and not added to a search list!!").arg(i), + QuasarAppUtils::Debug); continue; } @@ -85,6 +87,10 @@ void Envirement::addEnv(const QStringList &listDirs) { } } +bool Envirement::isIgnore(const QString &path) const { + return _ignoreEnvList && _ignoreEnvList->inThisEnvirement(path); +} + void Envirement::clear() { if (_ignoreEnvList) delete _ignoreEnvList; diff --git a/Deploy/envirement.h b/Deploy/envirement.h index 0ae31b6..d8841e2 100644 --- a/Deploy/envirement.h +++ b/Deploy/envirement.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -34,6 +34,13 @@ public: void addEnv(const QString &dir); void addEnv(const QStringList &listDirs); + /** + * @brief isIgnore This method return true if the @a path is contains in ignore list else return false. + * @brief path This is path to of the system enviroment that will be checked to ignore. + * @return true if the @a path is contains in ignore list else return false. + */ + bool isIgnore(const QString& path) const; + void clear(); // return true if file exits in this envirement diff --git a/Deploy/extra.cpp b/Deploy/extra.cpp index 1871c64..b28ce61 100644 --- a/Deploy/extra.cpp +++ b/Deploy/extra.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/extra.h b/Deploy/extra.h index a2f65af..eea659b 100644 --- a/Deploy/extra.h +++ b/Deploy/extra.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/extracter.cpp b/Deploy/extracter.cpp index 5410dbd..ac61710 100644 --- a/Deploy/extracter.cpp +++ b/Deploy/extracter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -10,7 +10,6 @@ #include "pluginsparser.h" #include "configparser.h" #include "metafilemanager.h" -#include "pathutils.h" #include <QCoreApplication> #include <QDebug> #include <QDir> @@ -112,7 +111,15 @@ void Extracter::extractExtraDataTargets() { auto &dep = _packageDependencyes[i.key()]; const auto extraData = i.value().extraData(); for (const auto &target : extraData) { - dep.addExtraData(target); + + QFileInfo info = DeployCore::findItem(target); + if (!info.exists()) { + QuasarAppUtils::Params::log("Failed to copy extra data from: " + target + + " Error: target not exists!.", QuasarAppUtils::Warning); + continue; + } + + dep.addExtraData(info.absoluteFilePath()); } } } @@ -261,8 +268,28 @@ bool Extracter::copyTr() { const auto trFiles = i->tr(); for (const auto &tr: trFiles) { - if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) { - return false; + + QFileInfo info(tr); + + if (!info.exists()) { + QuasarAppUtils::Params::log("Failed to copy " + info.absoluteFilePath() + ". Not exists", + QuasarAppUtils::Warning); + continue; + } + + if (info.isDir()) { + QDir dir(info.absoluteFilePath()); + auto availableQm = dir.entryInfoList({"*.qm"}, QDir::Files); + for (const auto & trFile : qAsConst(availableQm)) { + if (!_fileManager->copyFile(trFile.absoluteFilePath(), + cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) { + return false; + } + } + } else { + if (!_fileManager->copyFile(tr, cnf->getPackageTargetDir(i.key()) + i->getTrOutDir())) { + return false; + } } } } @@ -382,7 +409,7 @@ void Extracter::extractLib(const QString &file, for (const auto &line : data.getAllDep()) { - if (mask.size() && !line.getName().contains(mask, ONLY_WIN_CASE_INSENSIATIVE)) { + if (mask.size() && !line.getName().contains(mask, DeployCore::getCaseSensitivity())) { continue; } @@ -420,8 +447,8 @@ bool Extracter::extractQml() { QStringList plugins; QStringList listItems; - const auto qmlInput = distro.qmlInput(); - for (const auto &qmlInput: qmlInput) { + const auto qmlInputList = distro.qmlInput(); + for (const auto &qmlInput: qmlInputList) { QFileInfo info(qmlInput); if (!info.isDir()) { diff --git a/Deploy/extracter.h b/Deploy/extracter.h index 54ce41b..0b893c7 100644 --- a/Deploy/extracter.h +++ b/Deploy/extracter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/filemanager.cpp b/Deploy/filemanager.cpp index 688ec2c..b2992c7 100644 --- a/Deploy/filemanager.cpp +++ b/Deploy/filemanager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -117,6 +117,9 @@ void FileManager::removeFromDeployed(const QString &path) { } void FileManager::saveDeploymendFiles(const QString& targetDir) { + if (targetDir.isEmpty()) + return; + auto settings = QuasarAppUtils::Settings::instance(); settings->setValue(targetDir, getDeployedFilesStringList()); } @@ -175,7 +178,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target, bool copy = !masks; if (masks) { for (const auto &mask : qAsConst(*masks)) { - if (info.absoluteFilePath().contains(mask, ONLY_WIN_CASE_INSENSIATIVE)) { + if (info.absoluteFilePath().contains(mask, DeployCore::getCaseSensitivity())) { copy = true; break; } @@ -260,7 +263,7 @@ bool FileManager::smartCopyFile(const QString &file, bool ifFileTarget) { auto config = DeployCore::_config; - if (file.contains(config->getTargetDir(), ONLY_WIN_CASE_INSENSIATIVE)) { + if (file.contains(config->getTargetDir(), DeployCore::getCaseSensitivity())) { if (!moveFile(file, target, mask)) { QuasarAppUtils::Params::log("Failed to move the file. Trying to copy it"); @@ -306,7 +309,7 @@ bool FileManager::copyFolder(const QString &from, if (!force) { QString skipFilter = ""; for (const auto &i: filter) { - if (item.fileName().contains(i, ONLY_WIN_CASE_INSENSIATIVE)) { + if (item.fileName().contains(i, DeployCore::getCaseSensitivity())) { skipFilter = i; break; } @@ -493,7 +496,7 @@ bool FileManager::copyFiles(const QStringList &source, QString skipFilter = ""; for (const auto &i: filter) { - if (info.fileName().contains(i, ONLY_WIN_CASE_INSENSIATIVE)) { + if (info.fileName().contains(i, DeployCore::getCaseSensitivity())) { skipFilter = i; break; } diff --git a/Deploy/filemanager.h b/Deploy/filemanager.h index 36133b6..9d05ed2 100644 --- a/Deploy/filemanager.h +++ b/Deploy/filemanager.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/generalfiles_type.cpp b/Deploy/generalfiles_type.cpp index 5ffe9b4..044abcb 100644 --- a/Deploy/generalfiles_type.cpp +++ b/Deploy/generalfiles_type.cpp @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2021-2021 QuasarApp. +//# Copyright (C) 2021-2022 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. diff --git a/Deploy/generalfiles_type.h b/Deploy/generalfiles_type.h index de21469..dd9a59e 100644 --- a/Deploy/generalfiles_type.h +++ b/Deploy/generalfiles_type.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2021-2021 QuasarApp. +//# Copyright (C) 2021-2022 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. diff --git a/Deploy/igetlibinfo.h b/Deploy/igetlibinfo.h index bd4f124..2ab1c0e 100644 --- a/Deploy/igetlibinfo.h +++ b/Deploy/igetlibinfo.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/ignorerule.cpp b/Deploy/ignorerule.cpp index 3f8b297..fffd9f0 100644 --- a/Deploy/ignorerule.cpp +++ b/Deploy/ignorerule.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -27,7 +27,7 @@ void IgnoreRule::addRule(const IgnoreData &rule) { } bool IgnoreRule::check(const LibInfo &info, const QString& ignoreLabel) const { - if (info.fullPath().contains(ignoreLabel, ONLY_WIN_CASE_INSENSIATIVE)) { + if (info.fullPath().contains(ignoreLabel, DeployCore::getCaseSensitivity())) { QuasarAppUtils::Params::log(info.fullPath() + " ignored by filter" + ignoreLabel); return true; } diff --git a/Deploy/ignorerule.h b/Deploy/ignorerule.h index 0ead87a..5c96e52 100644 --- a/Deploy/ignorerule.h +++ b/Deploy/ignorerule.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/libinfo.cpp b/Deploy/libinfo.cpp index afa87e8..4f52289 100644 --- a/Deploy/libinfo.cpp +++ b/Deploy/libinfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -104,7 +104,7 @@ void LibInfo::setWinApi(WinAPI winApi) { QtMajorVersion LibInfo::isDependetOfQt() const { for (const auto& i : _dependncies) { - if (QtMajorVersion result = DeployCore::isQtLib(i)) { + if (QtMajorVersion result = DeployCore::isQtLibName(i)) { return result; } } @@ -112,6 +112,23 @@ QtMajorVersion LibInfo::isDependetOfQt() const { return QtMajorVersion::NoQt; } +QString LibInfo::toString() const { + + +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + QStringList dependenciesList = _dependncies.toList(); +#else + QStringList dependenciesList{_dependncies.begin(), _dependncies.end()}; +#endif + + return QString("LibInfo: path: '%0', name: '%1', qtPath: '%2', platform: '%3', dependencies: '%4'"). + arg(_path, + _name, + _qtPath, + DeployCore::platformToString(_platform), + dependenciesList.join(", ")); +} + QString LibInfo::fullPath() const { return _path + "/" + _name; } diff --git a/Deploy/libinfo.h b/Deploy/libinfo.h index aae6cea..edbf1d8 100644 --- a/Deploy/libinfo.h +++ b/Deploy/libinfo.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -48,6 +48,8 @@ public: void setWinApi(WinAPI winApi); QtMajorVersion isDependetOfQt() const; + QString toString() const; + friend class DependenciesScanner; private: diff --git a/Deploy/metafilemanager.cpp b/Deploy/metafilemanager.cpp index b0c3aac..feb18d0 100644 --- a/Deploy/metafilemanager.cpp +++ b/Deploy/metafilemanager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -27,46 +27,15 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) { QFileInfo targetInfo(target); QString content; - auto runScript = cnf->getRunScript(targetInfo.fileName()); - if (runScript.size()) { - QFile script(runScript); - if (!script.open(QIODevice::ReadOnly)) { - return false; - } - content = script.readAll(); - script.close(); + auto runScript = targetinfo.getRunScript(); - } else { - - bool fGui = DeployCore::isGui(_mudulesMap.value(target)); - auto systemLibsDir = distro.getLibOutDir() + DeployCore::systemLibsFolderName(); - - content = - "@echo off \n" - "SET BASE_DIR=%~dp0\n" - "SET PATH=%BASE_DIR%" + distro.getLibOutDir() + ";%PATH%;" + systemLibsDir + "\n" - "SET CQT_PKG_ROOT=%BASE_DIR%\n" - "SET CQT_RUN_FILE=%BASE_DIR%%0.bat\n" - - "%3\n"; - - // Run application as invoke of the console for consle applications - // And run gui applciation in the detached mode. - if (fGui) { - content += "start \"%0\" %4 \"%BASE_DIR%" + distro.getBinOutDir() + "%1\" %2 \n"; - } else { - content += "call \"%BASE_DIR%" + distro.getBinOutDir() + "%1\" %2 \n"; - } - - content = content.arg(targetInfo.baseName(), targetInfo.fileName(), "%*", - generateCustoScriptBlok(true)); // %0 %1 %2 %3 - - content = QDir::toNativeSeparators(content); - - if (fGui) { - content = content.arg("/B"); // %4 - } + QFile script(runScript); + if (!script.open(QIODevice::ReadOnly)) { + return false; } + content = script.readAll(); + script.close(); + replace(toReplace(target, distro), content); QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".bat"; @@ -90,6 +59,7 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) { bool MetaFileManager::createRunScriptLinux(const QString &target) { auto cnf = DeployCore::_config; + auto targetinfo = cnf->targets().value(target); if (!cnf->targets().contains(target)) { return false; @@ -99,48 +69,15 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { QFileInfo targetInfo(target); QString content; - auto runScript = cnf->getRunScript(targetInfo.fileName()); - if (runScript.size()) { - QFile script(runScript); - if (!script.open(QIODevice::ReadOnly)) { - return false; - } - content = script.readAll(); - 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:\"$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" - "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/%2\"\n" - - "export " - "QT_QPA_PLATFORM_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + - "platforms:$QT_QPA_PLATFORM_PLUGIN_PATH\n" - "" - "%1\n" - "\"$BASE_DIR" + distro.getBinOutDir() + "%0\" \"$@\"\n"; - - content = content.arg(targetInfo.fileName()); // %0 - - content = content.arg(generateCustoScriptBlok(false), - targetInfo.baseName()+ ".sh"); // %1 %2 - - - + auto runScript = targetinfo.getRunScript(); + QFile script(runScript); + if (!script.open(QIODevice::ReadOnly)) { + return false; } + content = script.readAll(); + script.close(); + replace(toReplace(target, distro), content); + QString fname = DeployCore::_config->getTargetDir(target) + QDir::separator() + targetInfo.baseName()+ ".sh"; @@ -163,6 +100,7 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) { } QString MetaFileManager::generateCustoScriptBlok(bool bat) const { + QString res = ""; QString commentMarker = "# "; @@ -172,10 +110,11 @@ QString MetaFileManager::generateCustoScriptBlok(bool bat) const { auto cstSh = QuasarAppUtils::Params::getArg("customScript", ""); if (cstSh.size()) { + res = "\n" + - commentMarker + "Begin Custom Script (generated by customScript flag)\n" + commentMarker + "Begin Custom Script (generated by customScript flag)\n" "%0\n" + - commentMarker + "End Custom Script\n" + commentMarker + "End Custom Script\n" "\n"; res = res.arg(cstSh); @@ -248,14 +187,66 @@ bool MetaFileManager::createQConf(const QString &target) { QFileDevice::ReadOwner); } +QHash<QString, QString> MetaFileManager::toReplace(const QString& target, + const DistroModule& distro) const { + QFileInfo targetInfo(target); + + QHash<QString, QString> result = { + {"CQT_BIN_PATH", QDir::toNativeSeparators(distro.getBinOutDir())}, + {"CQT_LIB_PATH", QDir::toNativeSeparators(distro.getLibOutDir())}, + {"CQT_QML_PATH", QDir::toNativeSeparators(distro.getQmlOutDir())}, + {"CQT_PLUGIN_PATH", QDir::toNativeSeparators(distro.getPluginsOutDir())}, + {"CQT_SYSTEM_LIB_PATH", QDir::toNativeSeparators(distro.getLibOutDir() + DeployCore::systemLibsFolderName())}, + {"CQT_BASE_NAME", QDir::toNativeSeparators(targetInfo.baseName())} + }; + + bool fGui = DeployCore::isGui(_mudulesMap.value(target)); + + + if (targetInfo.completeSuffix().compare("exe", Qt::CaseInsensitive) == 0) { + result.insert("CQT_CUSTOM_SCRIPT_BLOCK", generateCustoScriptBlok(true)); + + // Run application as invoke of the console for consle applications + // And run gui applciation in the detached mode. + QString runCmd; + if (fGui) { + runCmd = "start \"" + targetInfo.baseName() + "\" %0 " + + "\"%BASE_DIR%" + distro.getBinOutDir() + targetInfo.fileName() + "\" %*"; + runCmd = QDir::toNativeSeparators(runCmd).arg("/B"); + + } else { + runCmd = "call \"%BASE_DIR%" + distro.getBinOutDir() + targetInfo.fileName() + "\" %*"; + runCmd = QDir::toNativeSeparators(runCmd); + } + + result.insert("CQT_RUN_COMMAND", runCmd); + + } else { + result.insert("CQT_CUSTOM_SCRIPT_BLOCK", generateCustoScriptBlok(false)); + + QString runCmd = "\"$BASE_DIR" + distro.getBinOutDir() + targetInfo.fileName() + "\" \"$@\" "; + + result.insert("CQT_RUN_COMMAND", QDir::toNativeSeparators(runCmd)); + } + + return result; +} + +void MetaFileManager::replace(const QHash<QString, QString> &map, QString &content) { + for (auto it = map.begin(); it != map.end(); ++it) { + content = content.replace(it.key(), it.value()); + } + +} + void MetaFileManager::createRunMetaFiles(const QHash<QString, DeployCore::QtModule>& modulesMap) { _mudulesMap = modulesMap; for (auto i = DeployCore::_config->targets().cbegin(); i != DeployCore::_config->targets().cend(); ++i) { - if (!createRunScript(i.key())) { + if (i.value().fEnableRunScript() && !createRunScript(i.key())) { QuasarAppUtils::Params::log("Failed to create a run script: " + i.key(), - QuasarAppUtils::Error); + QuasarAppUtils::Error); } if (!createQConf(i.key())) { diff --git a/Deploy/metafilemanager.h b/Deploy/metafilemanager.h index 8bb88d1..36c1a0b 100644 --- a/Deploy/metafilemanager.h +++ b/Deploy/metafilemanager.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -12,6 +12,8 @@ #include <deploycore.h> class FileManager; +class DistroModule; +class TargetInfo; class MetaFileManager { @@ -32,6 +34,11 @@ private: bool createQConf(const QString &target); + QHash<QString, QString> toReplace(const QString &target, + const DistroModule &distro) const; + + void replace(const QHash<QString, QString>& map, QString& content); + FileManager* _fileManager = nullptr; QHash<QString, DeployCore::QtModule> _mudulesMap; }; diff --git a/Deploy/packagecontrol.cpp b/Deploy/packagecontrol.cpp index 2df56e3..f1ea538 100644 --- a/Deploy/packagecontrol.cpp +++ b/Deploy/packagecontrol.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/packagecontrol.h b/Deploy/packagecontrol.h index d101131..6b1dce4 100644 --- a/Deploy/packagecontrol.h +++ b/Deploy/packagecontrol.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/packing.cpp b/Deploy/packing.cpp index b9c0388..5ed6ec7 100644 --- a/Deploy/packing.cpp +++ b/Deploy/packing.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -306,5 +306,5 @@ void Packing::handleOutputUpdate() { if (erroutLog.size()) QuasarAppUtils::Params::log(erroutLog, - QuasarAppUtils::Info); + QuasarAppUtils::Error); } diff --git a/Deploy/packing.h b/Deploy/packing.h index 3bbd322..0b7d78c 100644 --- a/Deploy/packing.h +++ b/Deploy/packing.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/pathutils.cpp b/Deploy/pathutils.cpp index a3f73ea..ab44240 100644 --- a/Deploy/pathutils.cpp +++ b/Deploy/pathutils.cpp @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/pathutils.h b/Deploy/pathutils.h index fe6c7b2..3ff8a94 100644 --- a/Deploy/pathutils.h +++ b/Deploy/pathutils.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/pe_type.cpp b/Deploy/pe_type.cpp index 9418422..4fe84c5 100644 --- a/Deploy/pe_type.cpp +++ b/Deploy/pe_type.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -11,15 +11,18 @@ #include <QFileInfo> #include <QSet> #include <QVector> -#include <pe-parse/parse.h> #include <quasarapp.h> #include <set> +#ifndef DISABLE_PE +#include <pe-parse/parse.h> + namespace peparse { class section; + struct importent { VA addr; std::string symbolName; @@ -63,6 +66,7 @@ bool PE::getDep(peparse::parsed_pe_internal * internal, LibInfo &res) const { return res.getDependncies().size() || !imports.size(); } +#endif QHash<WinAPI, QSet<QString> > PE::getWinAPI() const { return _winAPI; @@ -110,6 +114,7 @@ PE::PE(): IGetLibInfo () { } bool PE::getLibInfo(const QString &lib, LibInfo &info) const { +#ifndef DISABLE_PE auto parsedPeLib = peparse::ParsePEFromFile(lib.toLatin1()); if (!parsedPeLib) @@ -155,6 +160,11 @@ bool PE::getLibInfo(const QString &lib, LibInfo &info) const { return info.isValid(); +#else + Q_UNUSED(lib) + Q_UNUSED(info) + return false; +#endif } PE::~PE(){ diff --git a/Deploy/pe_type.h b/Deploy/pe_type.h index 78d2125..10a5774 100644 --- a/Deploy/pe_type.h +++ b/Deploy/pe_type.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/pluginsparser.cpp b/Deploy/pluginsparser.cpp index 269321b..3e3562d 100644 --- a/Deploy/pluginsparser.cpp +++ b/Deploy/pluginsparser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -37,6 +37,7 @@ static const PluginModuleMapping pluginModuleMappings[] = {"mediaservice", DeployCore::QtModule::QtMultimediaModule}, {"playlistformats", DeployCore::QtModule::QtMultimediaModule}, {"bearer", DeployCore::QtModule::QtNetworkModule}, + {"tls", DeployCore::QtModule::QtNetworkModule}, {"position", DeployCore::QtModule::QtPositioningModule}, {"printsupport", DeployCore::QtModule::QtPrintSupportModule}, {"scenegraph", DeployCore::QtModule::QtQuickModule}, @@ -162,7 +163,7 @@ void PluginsParser::addPlugins(const QStringList& list, const QString& package, QHash<QString, QSet<QString>>& container) { const DeployConfig* cnf = DeployCore::_config; - for (const auto plugin: list) { + for (const auto &plugin: qAsConst(list)) { if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) { auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot); diff --git a/Deploy/pluginsparser.h b/Deploy/pluginsparser.h index eb461d7..0825011 100644 --- a/Deploy/pluginsparser.h +++ b/Deploy/pluginsparser.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/qml.cpp b/Deploy/qml.cpp index 2f6d3ce..c0fbb92 100644 --- a/Deploy/qml.cpp +++ b/Deploy/qml.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/qml.h b/Deploy/qml.h index 90a9e9a..31d3a0b 100644 --- a/Deploy/qml.h +++ b/Deploy/qml.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. diff --git a/Deploy/qtdir.cpp b/Deploy/qtdir.cpp index f9c790e..174ab02 100644 --- a/Deploy/qtdir.cpp +++ b/Deploy/qtdir.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -86,11 +86,11 @@ bool QtDir::isQt(QString path) const { path = PathUtils::fixPath(path); return - (!libs.isEmpty() && path.contains(libs, ONLY_WIN_CASE_INSENSIATIVE)) || - (!bins.isEmpty() && path.contains(bins, ONLY_WIN_CASE_INSENSIATIVE)) || - (!libexecs.isEmpty() && path.contains(libexecs, ONLY_WIN_CASE_INSENSIATIVE)) || - (!plugins.isEmpty() && path.contains(plugins, ONLY_WIN_CASE_INSENSIATIVE)) || - (!qmls.isEmpty() && path.contains(qmls, ONLY_WIN_CASE_INSENSIATIVE)) || - (!translations.isEmpty() && path.contains(translations, ONLY_WIN_CASE_INSENSIATIVE)) || - (!resources.isEmpty() && path.contains(resources, ONLY_WIN_CASE_INSENSIATIVE)); + (!libs.isEmpty() && path.contains(libs, DeployCore::getCaseSensitivity())) || + (!bins.isEmpty() && path.contains(bins, DeployCore::getCaseSensitivity())) || + (!libexecs.isEmpty() && path.contains(libexecs, DeployCore::getCaseSensitivity())) || + (!plugins.isEmpty() && path.contains(plugins, DeployCore::getCaseSensitivity())) || + (!qmls.isEmpty() && path.contains(qmls, DeployCore::getCaseSensitivity())) || + (!translations.isEmpty() && path.contains(translations, DeployCore::getCaseSensitivity())) || + (!resources.isEmpty() && path.contains(resources, DeployCore::getCaseSensitivity())); } diff --git a/Deploy/qtdir.h b/Deploy/qtdir.h index 21d2bb0..8566ace 100644 --- a/Deploy/qtdir.h +++ b/Deploy/qtdir.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/targetdata.h b/Deploy/targetdata.h index 94acaf2..45a624f 100644 --- a/Deploy/targetdata.h +++ b/Deploy/targetdata.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/targetinfo.cpp b/Deploy/targetinfo.cpp index 562d6f3..bbc0d47 100644 --- a/Deploy/targetinfo.cpp +++ b/Deploy/targetinfo.cpp @@ -1,26 +1,28 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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 "targetinfo.h" +#include "deploycore.h" +#include "deployconfig.h" TargetInfo::TargetInfo() { } -QString TargetInfo::getPackage() const { - return package; +const QString & TargetInfo::getPackage() const { + return _package; } void TargetInfo::setPackage(const QString &value) { - package = value; + _package = value; } QString TargetInfo::getIcon() const { - if (icon.isEmpty()) { + if (_icon.isEmpty()) { QFileInfo info(getName()); if (info.suffix() == "exe") { return ":/shared/Distributions/Templates/Icon.ico"; @@ -30,11 +32,74 @@ QString TargetInfo::getIcon() const { } - return icon; + return _icon; } void TargetInfo::setIcon(const QString &value) { - icon = value; + _icon = value; +} + +bool TargetInfo::getShortCut() const { + QFileInfo info(fullPath()); + QString compleSufix = info.completeSuffix(); + + bool defaultRule = compleSufix.compare("exe", Qt::CaseInsensitive) == 0 || compleSufix.isEmpty(); + + return _fEnableShortCut && defaultRule; +} + +void TargetInfo::setShortCut(bool shortcut) { + _fEnableShortCut = shortcut; +} + +void TargetInfo::disableShortCut() { + setShortCut(false); +} + +QString TargetInfo::getRunScript() const { + if (_runScript.isEmpty()) { + QFileInfo info(getName()); + if (info.suffix() == "exe") { + return ":/Scripts/ScriptsTemplates/windows.bat"; + } + + return ":/Scripts/ScriptsTemplates/linux.sh"; + } + + return _runScript; +} + +void TargetInfo::setRunScript(const QString &newRunScript) { + _runScript = newRunScript; +} + +QString TargetInfo::getRunScriptFile() const { + + if (fEnableRunScript()) { + QFileInfo runscriptInfo(getRunScript()); + QFileInfo info(getName()); + + return info.baseName() + "." + runscriptInfo.completeSuffix(); + } + + return getName(); +} + +bool TargetInfo::fEnableRunScript() const { + QFileInfo info(fullPath()); + QString compleSufix = info.completeSuffix(); + + bool defaultRule = compleSufix.compare("exe", Qt::CaseInsensitive) == 0 || compleSufix.isEmpty(); + + return _fEnableRunScript && defaultRule; +} + +void TargetInfo::setFEnableRunScript(bool newFEnableRunScript) { + _fEnableRunScript = newFEnableRunScript; +} + +void TargetInfo::disableRunScript() { + setFEnableRunScript(false); } diff --git a/Deploy/targetinfo.h b/Deploy/targetinfo.h index 68e30d1..f53ef4f 100644 --- a/Deploy/targetinfo.h +++ b/Deploy/targetinfo.h @@ -1,5 +1,5 @@ //# -//# Copyright (C) 2018-2021 QuasarApp. +//# Copyright (C) 2018-2022 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. @@ -11,20 +11,101 @@ #include "distrostruct.h" #include "libinfo.h" +/** + * @brief The TargetInfo class This clas scontains information about target object. (executable or another files marked in a bin option) + */ class DEPLOYSHARED_EXPORT TargetInfo: public LibInfo { public: TargetInfo(); - QString getPackage() const; + /** + * @brief getPackage This method return name of the package in that contains this target. + * @return name of the package in that contains this target. + */ + const QString & getPackage() const; + + /** + * @brief setPackage This method sets new value for pacakge name in that contains this target. + * @param value new This is new value of the pacakge. + */ void setPackage(const QString &value); + /** + * @brief getIcon This method return path to default icon of the target. + * @return icon path. + * @note if the icon not set then return default icon. + */ QString getIcon() const; + + /** + * @brief setIcon This method sets new iconf for target. + * @param value + */ void setIcon(const QString &value); + /** + * @brief getShortCut This method return true if the target need to create shortcut. + * @return true if shortcut needed for this target. + */ + bool getShortCut() const; + + /** + * @brief setShortCut This method sets new status of the creating shortcut. + * @param shortcut This is new value of the shortcut + */ + void setShortCut(bool shortcut); + + /** + * @brief disableShortCut This method disable shortcut for this target. + */ + void disableShortCut(); + + /** + * @brief getRunScript This method return path to run script. + * @return path to run script + * @note By Default return path to default run scrip file from cqtdeployer resources. + */ + QString getRunScript() const; + + /** + * @brief setRunScript sets New path of the run script. + * @param newRunScript This is new path of the run sscript. + */ + void setRunScript(const QString &newRunScript); + + /** + * @brief getRunScriptFile This method return name fo the run script file or executable file if the run script are not needed + * @return runscript name + */ + QString getRunScriptFile() const; + + + /** + * @brief fEnableRunScript This return true if the run script will be generateed for this target else false. + * @return true if the run script will be generateed for this target else false. + */ + bool fEnableRunScript() const; + + /** + * @brief setFEnableRunScript This method enable or disable generation runScript. + * @param newFEnableRunScript New value. + */ + void setFEnableRunScript(bool newFEnableRunScript); + + /** + * @brief disableRunScript This method disable run script for this target. + */ + void disableRunScript(); + private: - QString package = ""; - QString icon = ""; -}; + QString _package = ""; + QString _icon = ""; + bool _fEnableShortCut = true; + bool _fEnableRunScript = true; + + QString _runScript = ""; + + }; #endif // TARGETINFO_H diff --git a/Deploy/zipcompresser.cpp b/Deploy/zipcompresser.cpp index 5c0386e..1bfbaf4 100644 --- a/Deploy/zipcompresser.cpp +++ b/Deploy/zipcompresser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/Deploy/zipcompresser.h b/Deploy/zipcompresser.h index d6937f4..8985626 100644 --- a/Deploy/zipcompresser.h +++ b/Deploy/zipcompresser.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/QIFData/InstallerBase.pri b/QIFData/InstallerBase.pri index 5d00e55..fbd60c6 100644 --- a/QIFData/InstallerBase.pri +++ b/QIFData/InstallerBase.pri @@ -30,7 +30,7 @@ message(DEPLOYER = $$DEPLOYER) BINARY_LIST REPO_LIST -sopprted_versions = 4.1 4.0 3.2 3.1 3.0 +sopprted_versions = 4.5 4.4 4.3 4.2 4.1 4.0 3.2 3.1 3.0 for(val, sopprted_versions) { exists( $$QT_DIR/../../../Tools/QtInstallerFramework/$$val/bin/ ) { @@ -41,18 +41,23 @@ for(val, sopprted_versions) { } isEmpty (BINARY_LIST) { - error( "QtInstallerFramework not found!" ) + warning( "QtInstallerFramework not found! use binaries from PATH." ) + EXEC=binarycreator + REPOGEN=repogen + +} else: { + win32:EXEC=$$first(BINARY_LIST).exe + win32:REPOGEN=$$first(REPO_LIST).exe + + contains(QMAKE_HOST.os, Linux):{ + unix:EXEC=$$first(BINARY_LIST) + win32:EXEC=wine $$first(BINARY_LIST).exe + + REPOGEN=$$first(REPO_LIST) + } } -win32:EXEC=$$first(BINARY_LIST).exe -win32:REPOGEN=$$first(REPO_LIST).exe -contains(QMAKE_HOST.os, Linux):{ - unix:EXEC=$$first(BINARY_LIST) - win32:EXEC=wine $$first(BINARY_LIST).exe - - REPOGEN=$$first(REPO_LIST) -} message( selected $$EXEC and $$REPOGEN) diff --git a/QIFData/QIF.pri b/QIFData/QIF.pri index e64e8b7..6cbeed0 100644 --- a/QIFData/QIF.pri +++ b/QIFData/QIF.pri @@ -10,7 +10,7 @@ unix: PLATFORM = linux win32:PY = python unix: PY = python3 -qif.commands= $$PY $$PWD/scripts/QIF.py $$PLATFORM 4.1 $$PWD/packages/QIF/data +qif.commands= $$PY $$PWD/scripts/QIF.py $$PLATFORM 4.4 $$PWD/packages/QIF/data alias.commands= $$PY $$PWD/scripts/alias.py !isEmpty( ONLINE ) { diff --git a/QIFData/config/configLinux.xml b/QIFData/config/configLinux.xml index 099c63a..a114868 100644 --- a/QIFData/config/configLinux.xml +++ b/QIFData/config/configLinux.xml @@ -3,7 +3,7 @@ <WizardDefaultWidth>640px</WizardDefaultWidth> <WizardDefaultHeight>400px</WizardDefaultHeight> <Name>CQtDeployer</Name> - <Version>1.5.0.36</Version> + <Version>1.5.4.17</Version> <Title>CQtDeployer</Title> <Publisher>QuasarApp</Publisher> <StartMenuDir>CQtDeployer</StartMenuDir> diff --git a/QIFData/config/configWin.xml b/QIFData/config/configWin.xml index fbdb678..adfbc53 100644 --- a/QIFData/config/configWin.xml +++ b/QIFData/config/configWin.xml @@ -3,7 +3,7 @@ <WizardDefaultWidth>640px</WizardDefaultWidth> <WizardDefaultHeight>400px</WizardDefaultHeight> <Name>CQtDeployer</Name> - <Version>1.5.0.36</Version> + <Version>1.5.4.17</Version> <Title>CQtDeployer</Title> <Publisher>QuasarApp</Publisher> <StartMenuDir>CQtDeployer</StartMenuDir> diff --git a/QIFData/installerCQtDeployer.pri b/QIFData/installerCQtDeployer.pri index 1cb938d..1afb186 100644 --- a/QIFData/installerCQtDeployer.pri +++ b/QIFData/installerCQtDeployer.pri @@ -1,10 +1,15 @@ +VERSION = 1.5.4.17 + include($$PWD/InstallerBase.pri); mkpath( $$PWD/../Distro) -win32:OUT_FILE = CQtDeployerInstaller.exe -unix:OUT_FILE = CQtDeployerInstaller.run -win32:OUT_FILE_OFF = CQtDeployerOfflineInstaller.exe -unix:OUT_FILE_OFF = CQtDeployerOfflineInstaller.run +message(QMAKE_HOST.arch = $$QMAKE_HOST.arch) + +win32:OUT_FILE = CQtDeployer_'$$VERSION'_Installer_Win'_$$QMAKE_HOST.arch'.exe +unix:OUT_FILE = CQtDeployer_'$$VERSION'_Installer_Linux'_$$QMAKE_HOST.arch'.run + +win32:OUT_FILE_OFF = CQtDeployer_'$$VERSION'_OfflineInstaller_Win'_$$QMAKE_HOST.arch'.exe +unix:OUT_FILE_OFF = CQtDeployer_'$$VERSION'_OfflineInstaller_Linux'_$$QMAKE_HOST.arch'.run DEPLOY_TARGET = $$PWD/../CQtDeployer/build/release @@ -14,13 +19,13 @@ META_DIR = $$PWD/packages/cqtdeployer.1_5/meta/ win32:OUT_LIB= -libOut lib win32:OUT_BIN= -binOut bin -BASE_DEPLOY_FLAGS = clear -qmake $$QMAKE_BIN -libDir $$PWD/../ -recursiveDepth 4 -ignoreEnv $$DEPLOY_TARGET +BASE_DEPLOY_FLAGS = clear -qmake $$QMAKE_BIN -libDir $$PWD/../ -recursiveDepth 4 -ignoreEnv $$DEPLOY_TARGET -extraLibs icu BASE_DEPLOY_FLAGS_CQT = $$BASE_DEPLOY_FLAGS -targetDir $$DATA_DIR $$OUT_LIB $$OUT_BIN win32:CQT_ICON = -icon $$PWD/config/icon.ico unix:CQT_ICON = -icon $$PWD/config/logo.png -BASE_DEPLOY_FLAGS_DEB = $$BASE_DEPLOY_FLAGS -targetDir $$PWD/../Distro $$OUT_LIB $$OUT_BIN deb zip -name CQtDeployer -publisher QuasarApp $$CQT_ICON -deployVersion 1.5.0.34 +BASE_DEPLOY_FLAGS_DEB = $$BASE_DEPLOY_FLAGS -targetDir $$PWD/../Distro $$OUT_LIB $$OUT_BIN deb zip -name CQtDeployer -publisher QuasarApp $$CQT_ICON -deployVersion 1.5.4.17 -debOut CQtDeployer_'$$VERSION'_Linux'_$$QMAKE_HOST.arch'.deb -zipOut CQtDeployer_'$$VERSION'_Linux'_$$QMAKE_HOST.arch'.zip DEPLOY_TARGET_DEB = $$DEPLOY_TARGET,$$PWD/packages/QIF/data/QIF deploy_dep.commands += $$DEPLOYER -bin $$DEPLOY_TARGET $$BASE_DEPLOY_FLAGS_CQT @@ -35,9 +40,13 @@ deployOffline.commands = $$EXEC \ -p $$PWD/packages \ $$PWD/../Distro/$$OUT_FILE_OFF -deploy.depends = deploy_dep -deploy.depends += deployOffline +!contains(QMAKE_HOST.arch, arm.*):{ + deploy.depends = deploy_dep + deploy.depends += deployOffline + +} + unix:deploy.depends += deploy_deb win32:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Windows @@ -77,12 +86,15 @@ releaseSnap.commands = snapcraft push *.snap # bad patern !isEmpty( ONLINE ) { - message(Snap) - unix:deploy.depends += clearSnap - unix:deploy.depends += buildSnap - unix:deploy.depends += deploySnap - unix:deploy.depends += clearSnap2 - unix:release.depends += releaseSnap + !contains(QMAKE_HOST.arch, arm.*):{ + + message(Snap) + unix:deploy.depends += clearSnap + unix:deploy.depends += buildSnap + unix:deploy.depends += deploySnap + unix:deploy.depends += clearSnap2 + unix:release.depends += releaseSnap + } } OTHER_FILES += \ @@ -106,43 +118,46 @@ QMAKE_EXTRA_TARGETS += \ chmodSnap -# Translations -SUPPORT_LANGS = ru +!contains(DEFINES, WITHOUT_TR) { -defineReplace(findFiles) { - patern = $$1 - path = $$2 + # Translations + SUPPORT_LANGS = ru - all_files = $$files(*$${patern}, true) - win32:all_files ~= s|\\\\|/|g - win32:path ~= s|\\\\|/|g + defineReplace(findFiles) { + patern = $$1 + path = $$2 - for(file, all_files) { - result += $$find(file, $$path) + all_files = $$files(*$${patern}, true) + win32:all_files ~= s|\\\\|/|g + win32:path ~= s|\\\\|/|g + + for(file, all_files) { + result += $$find(file, $$path) + } + + return($$result) } - return($$result) -} + XML_FILES = $$files(*.xml, true) -XML_FILES = $$files(*.xml, true) + for(LANG, SUPPORT_LANGS) { + for(XML, XML_FILES) { + FILE_PATH = $$dirname(XML) -for(LANG, SUPPORT_LANGS) { - for(XML, XML_FILES) { - FILE_PATH = $$dirname(XML) + JS_FILES = $$findFiles(".js", $$FILE_PATH) + UI_FILES = $$findFiles(".ui", $$FILE_PATH) - JS_FILES = $$findFiles(".js", $$FILE_PATH) - UI_FILES = $$findFiles(".ui", $$FILE_PATH) + commands += "$$LUPDATE $$JS_FILES $$UI_FILES -ts $$FILE_PATH/$${LANG}.ts" + TS_FILES += $$FILE_PATH/$${LANG}.ts - commands += "$$LUPDATE $$JS_FILES $$UI_FILES -ts $$FILE_PATH/$${LANG}.ts" - TS_FILES += $$FILE_PATH/$${LANG}.ts + } + for(TS, TS_FILES) { + commands += "$$LRELEASE $$TS" + } } - for(TS, TS_FILES) { - commands += "$$LRELEASE $$TS" + for(command, commands) { + system($$command)|error("Failed to run: $$command") } } - -for(command, commands) { - system($$command)|error("Failed to run: $$command") -} diff --git a/QIFData/packages/QIF/meta/package.xml b/QIFData/packages/QIF/meta/package.xml index 00b3fed..f3b3f05 100644 --- a/QIFData/packages/QIF/meta/package.xml +++ b/QIFData/packages/QIF/meta/package.xml @@ -2,7 +2,7 @@ <Package> <DisplayName>Qt Installer Framework</DisplayName> <Description>Qt Installer Framework for CQtDeployer</Description> - <Version>4.1.0.2</Version> - <ReleaseDate>2021-04-20</ReleaseDate> + <Version>4.4.0.0</Version> + <ReleaseDate>2022-07-25</ReleaseDate> <Default>true</Default> </Package> diff --git a/QIFData/packages/cqtdeployer.1_5/meta/installscript.js b/QIFData/packages/cqtdeployer.1_5/meta/installscript.js index 17cd007..cbc7df4 100644 --- a/QIFData/packages/cqtdeployer.1_5/meta/installscript.js +++ b/QIFData/packages/cqtdeployer.1_5/meta/installscript.js @@ -87,26 +87,19 @@ function systemIntegration() { console.log("hometDir " + homeDir) if (systemInfo.kernelType === "winnt") { - component.addOperation('EnvironmentVariable', - [ - "cqtdeployer", - targetDir + "\\" + VERSION + "\\cqtdeployer.bat" - ] - ) - component.addOperation('EnvironmentVariable', - [ - "cqtDir", - targetDir + "\\" + VERSION + "\\" - ] - ) + component.addOperation('Execute', ["SETX", "cqtdeployer", targetDir + "\\" + VERSION + "\\cqtdeployer.bat"], + "UNDOEXECUTE", ["SETX", "cqtdeployer", ""]) + component.addOperation('Execute', ["SETX", "cqtDir", targetDir + "\\" + VERSION + "\\"], + "UNDOEXECUTE", ["SETX", "cqtDir", ""]) + let PATH = installer.environmentVariable("PATH"); const cqtDir = installer.environmentVariable("cqtDir"); console.log("path befor strip : " + PATH); - if (!PATH.includes(cqtDir) || !cqtDir.length) { + if (!PATH.includes(cqtDir) && cqtDir.length) { PATH = stripWinPath(PATH); console.log("path after strip : " + PATH); diff --git a/QIFData/packages/cqtdeployer.1_5/meta/package.xml b/QIFData/packages/cqtdeployer.1_5/meta/package.xml index 541a5b0..476df75 100644 --- a/QIFData/packages/cqtdeployer.1_5/meta/package.xml +++ b/QIFData/packages/cqtdeployer.1_5/meta/package.xml @@ -2,11 +2,11 @@ <Package> <DisplayName>CQtDeployer 1.5</DisplayName> <Description>CQtDeployer 1.5</Description> - <Version>1.5.0.36</Version> + <Version>1.5.4.17</Version> <Default>true</Default> <ForcedInstallation>false</ForcedInstallation> <Script>installscript.js</Script> - <ReleaseDate>2021-05-23</ReleaseDate> + <ReleaseDate>2022-03-03</ReleaseDate> <SortingPriority>201</SortingPriority> <Translations> <Translation>ru.qm</Translation> diff --git a/QIFData/packages/cqtdeployer/meta/package.xml b/QIFData/packages/cqtdeployer/meta/package.xml index 62c2836..35d0c06 100644 --- a/QIFData/packages/cqtdeployer/meta/package.xml +++ b/QIFData/packages/cqtdeployer/meta/package.xml @@ -2,9 +2,9 @@ <Package> <DisplayName>CQtDeployer</DisplayName> <Description>CQtDeployer</Description> - <Version>1.4</Version> + <Version>1.5</Version> <Default>true</Default> <ForcedInstallation>false</ForcedInstallation> - <ReleaseDate>2020-09-06</ReleaseDate> + <ReleaseDate>2021-05-25</ReleaseDate> <SortingPriority>100</SortingPriority> </Package> diff --git a/QIFData/scripts/QIF.py b/QIFData/scripts/QIF.py index 30e322d..8908651 100755 --- a/QIFData/scripts/QIF.py +++ b/QIFData/scripts/QIF.py @@ -20,8 +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/", +# "-b", +# "https://mirrors.ocf.berkeley.edu/qt/", "--outputdir", PATHQIF, PLATFORM, diff --git a/QuasarAppLib b/QuasarAppLib index 553e337..d69306c 160000 --- a/QuasarAppLib +++ b/QuasarAppLib @@ -1 +1 @@ -Subproject commit 553e337e6a956534d34dbbfcec42359117aa35d4 +Subproject commit d69306c1210fe6def35cf0ff7323e3e82f9ae8f4 diff --git a/README.md b/README.md index 36e61b8..50435cc 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,46 @@ -# CQtDeployer [](https://snapcraft.io/cqtdeployer) +# CQtDeployer + +[](https://snapcraft.io/cqtdeployer) [](https://snapcraft.io/cqtdeployer) + #  **************************** +## Support the project + + +We have a cqtdeployer extended support [subscription](https://www.patreon.com/QuasarApp) +on the Patrion service. +* We'll help you solve your deployment issues personality. +* All your tasks needed to solve your issues will have top priority. + +Also, if you just want to support the project, you can subscribe to the general subscription plan on patrion + +If you can't use Patreon, you can send **bitcoin** to support us and our work. +If you want to get support for bitcoin payment, write to me in [telegramm](https://t.me/Endrll) + +## bitcoin address + + +**bc1q3jnx7pleh7rxg6nm6navvuwwpd9znxvd4lye62** ## What is CQtDeployer -The CQtDeployer is application for extract all depends library of executable and create launch script for your application. +CQtDeployer helps you to extract all libraries your executable depends on and to create a launch script for your application. Key differences of this program: * Performance: this program deploys the application several times faster (up to 10 seconds) -* Flexibility: this application's got flags that help you to configure the deployment for your or your project's needs -* Crossdeploy: this application's support windows and linux distrebutives, This means that you can use it not only to deploy a project for your platform, but also to deploy a project on Linux for Windows and vice versa. -* Fast create installers : Upon completion of the deployment, you will receive a self-contained installer of your distribution. +* Flexibility: this application has flags that help you to configure the deployment for your or your project's needs +* Cross-deployment: this application supports Windows and Linux distributions. This means that you can deploy a project not only for the host platform, but also deploy a project for Windows target on Linux host and vice versa. +* Fast installers creation: Once the deployment is complete, you will receive a standalone installer for your distribution. ## Supported platforms: + * <img src="https://user-images.githubusercontent.com/12465465/67766480-929b5000-fa5f-11e9-8ae7-377d9ddb7c65.png" height="100"> * <img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="100"> -## Support processors architectures: +## Supported processors architectures: * x86 * x86-64 * ARM @@ -27,15 +48,15 @@ Key differences of this program: ## How to use -#### Example: cqtdeployer <-bin [params]> [options] +#### Example: `cqtdeployer <-bin [params]> [options]` -See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Options) +See the list of all options [here](md/en/Options.md) -#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear +#### Example: `cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/6.3.1/gcc_64/bin/qmake clear` ## More examples -#### Project structure after deploy: +#### Deployed project structure: ``` bash #linux cqtdeployer -bin Guitar @@ -44,9 +65,9 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt cqtdeployer -bin Guitar.exe -qmake /path/to/qmake.exe ``` -<img src="https://user-images.githubusercontent.com/12465465/81007195-7ab2e780-8e59-11ea-9793-1eeeb0025b96.png" height="400"> +<p align="center"><img src="https://user-images.githubusercontent.com/12465465/81007195-7ab2e780-8e59-11ea-9793-1eeeb0025b96.png" height="400"></p> -#### Project installer after deploy with the qif option. +#### Project installer after deployment with the `qif` option. ``` bash #linux cqtdeployer -bin Application qif @@ -55,9 +76,10 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif ``` -<img src="https://user-images.githubusercontent.com/12465465/78639719-197a1180-78b7-11ea-9e82-a03dd43f4bd2.png" height="400"> +<p align="center"><img src="https://user-images.githubusercontent.com/12465465/78639719-197a1180-78b7-11ea-9e82-a03dd43f4bd2.png" height="400"></p> + +#### Project installer after deployment with the `qif` and `qifStyle` options. -#### Project installer after deploy with the qif and qifStyle option. ``` bash #linux cqtdeployer -bin Application qif -qifStyle quasar @@ -66,7 +88,8 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle quasar ``` -<img src="https://user-images.githubusercontent.com/12465465/78639720-1aab3e80-78b7-11ea-9604-3dcdd7c78482.png" height="400"> + +<p align="center"><img src="https://user-images.githubusercontent.com/12465465/78639720-1aab3e80-78b7-11ea-9604-3dcdd7c78482.png" height="400"></p> ``` bash #linux @@ -76,197 +99,33 @@ See list of all options [here](https://github.com/QuasarApp/CQtDeployer/wiki/Opt cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle path/to/myStyle.css ``` -<img src="https://user-images.githubusercontent.com/12465465/78639716-17b04e00-78b7-11ea-9002-a8b45a43807f.png" height="400"> -## Build for Linux -- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4) -- git clone https://github.com/QuasarApp/CQtDeployer.git -- cd CQtDeployer -- git submodule update --init --recursive -- qmake -r - - Here you must definitely call the qmake that was loaded from the 1st item. - - Example: ~/Qt/5.14.0/gcc_64/bin/qmake -r -- make -j$(nproc) -- make deploy - - #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) - - ##### If you are building cqtdeployer using qt from your OS repository, use only the cqtdeployer installed from the github installer. The fact is that the snap package does not have access to system libraryes. -- ./Distro/CQtDeployerInstaller.run +<p align="center"><img src="https://user-images.githubusercontent.com/12465465/78639716-17b04e00-78b7-11ea-9002-a8b45a43807f.png" height="400"></p> -## Build for Windows (CMD) -- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4) -- git clone https://github.com/QuasarApp/CQtDeployer.git -- cd CQtDeployer -- git submodule update --init --recursive -- SET PATH=C:/Qt/Tools/mingw730_64/bin;%PATH% - - It is important to set up the qt environment. -- qmake.exe -r - - Here you must definitely call the qmake that was loaded from the 1st item. - - Example: C:/Qt/5.14.0/mingw73_64/bin/qmake.exe -r -- migw32-make -j8 -- migw32-make deploy - - #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) -- ./Distro/CQtDeployerInstaller.exe - -## Install -You can download the latest version of the application [here](https://github.com/QuasarApp/CQtDeployer/releases). - -### Snap -[](https://snapcraft.io/cqtdeployer) - -#### Features of the snap version -The snap package does not have access to system libraries. This means deploySystem options will not work. This also means that if you manually specify libDir or extraLib, then libraries that are not in home will not be found. -If these restrictions bother you, use the [Installer](https://github.com/QuasarApp/CQtDeployer/releases) classic version of the application. - -If you are using the snap version of the application. Enable all permissions for cqtdeployer. -this can be done in the snap-store -Or starting with ubuntu 20.04 in the ubuntu application settings manager. +## Build and install +See building and installation instructions on wiki [page](md/en/Build-and-Install.md) ## Projects using CQtDeployer: -- [QAmigo](https://github.com/QAmigo/QAmigo) -- [QtSecret](https://github.com/QuasarApp/Qt-Secret) -- [Hanoi-Towers](https://github.com/QuasarApp/Hanoi-Towers) -- [distbuilder](https://github.com/BuvinJT/distbuilder) -- [Manager_v2](https://github.com/dimkatsi91/Manager_v2) +- [QAmigo](https://github.com/QAmigo/QAmigo) - Qt cross-platform serial port socket assistant for visualizing data. +- [QtSecret](https://github.com/QuasarApp/Qt-Secret) - Simple encryption library supporting RSA and AES algorithms. +- [Hanoi-Towers](https://github.com/QuasarApp/Hanoi-Towers) - Hanoi Towers Game +- [distbuilder](https://github.com/BuvinJT/distbuilder) - Distribution Builder +- [Manager_v2](https://github.com/dimkatsi91/Manager_v2) - Qt Quick Controls 2 - Linux Manager Desktop Application +- [IDE65XX](https://github.com/emartisoft/IDE65XX) - IDE 65XX is one of the open source IDE options available for developers working with Kick Assembler. +- [Tanks](https://github.com/anevero/tanks) - 2D game written in C++ & Qt for Windows, Linux and Android +- [stegano](https://github.com/taskmaster9001/stegano) - Bit-level Image Manipulation Software with Qt Framework - Steganography Pet Project +- [Online_Board](https://github.com/MaxMalts/Online_Board) - This is a board that you can share with others. -## Donate -If you want to support the project,you can donate into our bitcoin wallet. -### Bitcoin address - 1NJNbDKmezcUcHRfzpBeq2fHeG21oEKX8Q +*** + +### Check out our documentation for more information: [here](md/index.md) + +*** ## Thanks * many thanks [Trail of Bits](https://github.com/trailofbits) for their library [pe-parser](https://github.com/trailofbits/pe-parse). Everything works perfectly. *************************** -*************************** -*************************** -**CQtDeployer** - это приложение преднознаена для извлечения всех зависимых библиотек исполняемого файла и создания сценария запуска для вашего приложения. - -Основные отличия этой программы: -* Производительность - эта программа развертывает приложение в несколько раз быстрее (до 10 секунд) -* Гибкость - это приложение имеет флаги, которые помогут вам настроить деплоинг под ваши нужды и нужды вашего проекта -* Crossdeploy: приложение поддерживает Windows и дистрибутивы Linux, это означает, что вы можете использовать его не только для развертывания проекта для вашей платформы, но и для развертывания проекта в Linux для Windows и наоборот. -* Быстрое создание установщиков. По завершении развертывания вы получите автономный установщик вашего дистрибутива. - - -## Поддерживаемые платформы: -* <img src="https://user-images.githubusercontent.com/12465465/67766480-929b5000-fa5f-11e9-8ae7-377d9ddb7c65.png" height="100"> -* <img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="100"> - -## Поддержка архитектур процессоров: -* x86 -* x86-64 -* ARM -* ARM64 - -## Как использовать -#### пример : cqtdeployer <-bin [params]> [options] -Смотрите список всех опций [здесь](https://github.com/QuasarApp/CQtDeployer/wiki/%D0%9F%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D1%8B -) - -#### пример: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear - -## Еще примеры -#### Стуктура проекта после развертывания: -``` bash - #linux - cqtdeployer -bin Guitar - - #windows - cqtdeployer -bin Guitar.exe -qmake /path/to/qmake.exe - -``` -<img src="https://user-images.githubusercontent.com/12465465/81007195-7ab2e780-8e59-11ea-9793-1eeeb0025b96.png" height="400"> - -#### Установщик проекта после использования опции qif. -``` bash - #linux - cqtdeployer -bin Application qif - - #windows - cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif - -``` -<img src="https://user-images.githubusercontent.com/12465465/78639719-197a1180-78b7-11ea-9e82-a03dd43f4bd2.png" height="400"> - -#### Установщик проекта после использования опции qif c пользовательским стилем. -``` bash - #linux - cqtdeployer -bin Application qif -qifStyle quasar - - #windows - cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle quasar - -``` -<img src="https://user-images.githubusercontent.com/12465465/78639720-1aab3e80-78b7-11ea-9604-3dcdd7c78482.png" height="400"> - -``` bash - #linux - cqtdeployer -bin Application qif -qifStyle path/to/myStyle.css - - #windows - cqtdeployer -bin Application.exe -qmake /path/to/qmake.exe qif -qifStyle path/to/myStyle.css - -``` -<img src="https://user-images.githubusercontent.com/12465465/78639716-17b04e00-78b7-11ea-9002-a8b45a43807f.png" height="400"> - - -## Build для Linux -- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5) -- git clone https://github.com/QuasarApp/CQtDeployer.git -- cd CQtDeployer -- git submodule update --init --recursive -- qmake -r - - Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта. - - Пример: ~/Qt/5.14.0/gcc_64/bin/qmake -r -- make -j$(nproc) -- make deploy - - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) - - ##### Если вы собираете cqtdeployer, используя qt из своего репозитория ОС, используйте только cqtdeployer, установленный из установщика github. Дело в том, что пакет моментальных снимков не имеет доступа к системным библиотекам. -- ./Distro/CQtDeployerInstaller.run - -## Build для Windows (CMD) -- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5) -- git clone https://github.com/QuasarApp/CQtDeployer.git -- cd CQtDeployer -- git submodule update --init --recursive -- SET PATH=C:/Qt/Tools/mingw730_64/bin;%PATH% - - Здесь важно настроить окружение qt. -- qmake.exe -r - - Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта. - - Пример: C:/Qt/5.14.0/mingw73_64/bin/qmake.exe -r -- migw32-make -j8 -- migw32-make deploy - - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) -- ./Distro/CQtDeployerInstaller.exe - -### Snap -[](https://snapcraft.io/cqtdeployer) - -#### Особенности snap версии -В snap пакет не имеет доступ к системным библиотекам. Это значит что опции deploySystem не будут работать. Так же это значит что нсли вы в ручную укажите libDir или extraLib, то библиотеки находящиеся не в home не будут найдены. -Если вам мешают эти ограничения используйте [Установщик](https://github.com/QuasarApp/CQtDeployer/releases) класической версии приложения. - -Если вы используете snap версию приложения. Включите все разрешения для cqtdeployer. -это можно сделать в snap-store -Или начиная с ubuntu 20.04 в менеджере натроек приложений ubuntu. - -## Установить -Вы можете загрузить последнюю версию приложения [здесь](https://github.com/QuasarApp/CQtDeployer/releases). - -## Проекты использующие CQtDeployer : - -- [QAmigo](https://github.com/QAmigo/QAmigo) -- [QtSecret](https://github.com/QuasarApp/Qt-Secret) -- [Hanoi-Towers](https://github.com/QuasarApp/Hanoi-Towers) -- [distbuilder](https://github.com/BuvinJT/distbuilder) -- [Manager_v2](https://github.com/dimkatsi91/Manager_v2) - -## Пожертвовать -Если вы хотите помочь проекту, то вы можете пожертвовать небольшую сумму на наш биткойн-кошелек. - -### Биткойн-адрес - 1NJNbDKmezcUcHRfzpBeq2fHeG21oEKX8Q - -## Благодарность - * Большое спасибо [Trail of Bits](https://github.com/trailofbits) за их библиотеку [pe-parser](https://github.com/trailofbits/pe-parse). Все работает отлично. diff --git a/UnitTests/UnitTests.pro b/UnitTests/UnitTests.pro index 5b6a96d..fd44e60 100644 --- a/UnitTests/UnitTests.pro +++ b/UnitTests/UnitTests.pro @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2021 QuasarApp. +# Copyright (C) 2018-2022 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. diff --git a/UnitTests/libcreator.cpp b/UnitTests/libcreator.cpp index 990e89c..f990a61 100644 --- a/UnitTests/libcreator.cpp +++ b/UnitTests/libcreator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/libcreator.h b/UnitTests/libcreator.h index a85d8c7..7428ca4 100644 --- a/UnitTests/libcreator.h +++ b/UnitTests/libcreator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/modules.cpp b/UnitTests/modules.cpp index bcd1eac..8c51ead 100644 --- a/UnitTests/modules.cpp +++ b/UnitTests/modules.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/modules.h b/UnitTests/modules.h index 820a37d..7fad633 100644 --- a/UnitTests/modules.h +++ b/UnitTests/modules.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/modulesqt513.cpp b/UnitTests/modulesqt513.cpp index 6ad654f..9ba0237 100644 --- a/UnitTests/modulesqt513.cpp +++ b/UnitTests/modulesqt513.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -20,7 +20,7 @@ ModulesQt513::~ModulesQt513() { QSet<QString> ModulesQt513::ignoreFilter(const QSet<QString> &input, const QString &filter) const { QSet<QString> res; for (auto& val : input) { - if (!val.contains(filter, ONLY_WIN_CASE_INSENSIATIVE)) { + if (!val.contains(filter, DeployCore::getCaseSensitivity())) { res.insert(val); } } diff --git a/UnitTests/modulesqt513.h b/UnitTests/modulesqt513.h index 8c42b8e..a0450a3 100644 --- a/UnitTests/modulesqt513.h +++ b/UnitTests/modulesqt513.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/modulesqt514.cpp b/UnitTests/modulesqt514.cpp index 3fbe852..5b73cc9 100644 --- a/UnitTests/modulesqt514.cpp +++ b/UnitTests/modulesqt514.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/modulesqt514.h b/UnitTests/modulesqt514.h index 49422e8..4b92683 100644 --- a/UnitTests/modulesqt514.h +++ b/UnitTests/modulesqt514.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/qmlcreator.cpp b/UnitTests/qmlcreator.cpp index eaef077..b2c9e95 100644 --- a/UnitTests/qmlcreator.cpp +++ b/UnitTests/qmlcreator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/qmlcreator.h b/UnitTests/qmlcreator.h index c179f0f..db8e637 100644 --- a/UnitTests/qmlcreator.h +++ b/UnitTests/qmlcreator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/testRes/QIFCustomTemplate/customRes.qrc b/UnitTests/testRes/QIFCustomTemplate/customRes.qrc new file mode 100644 index 0000000..eeb4453 --- /dev/null +++ b/UnitTests/testRes/QIFCustomTemplate/customRes.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>customconfig.xml</file> + </qresource> +</RCC> diff --git a/UnitTests/testRes/QIFCustomTemplate/customconfig.xml b/UnitTests/testRes/QIFCustomTemplate/customconfig.xml new file mode 100644 index 0000000..72b8992 --- /dev/null +++ b/UnitTests/testRes/QIFCustomTemplate/customconfig.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Installer> + <Name>Stylesheet Example</Name> + <Version>1.0.0</Version> + <Title>Stylesheet Example</Title> + <Publisher>Qt-Project</Publisher> + <StartMenuDir>Qt IFW Examples</StartMenuDir> + <TargetDir>@HomeDir@/IfwExamples/stylesheet</TargetDir> + <WizardStyle>Classic</WizardStyle> + <TitleColor>#FFFFFF</TitleColor> +</Installer> diff --git a/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs b/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs new file mode 100644 index 0000000..e99733f --- /dev/null +++ b/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/installscript.qs @@ -0,0 +1,39 @@ +/************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** +** $QT_END_LICENSE$ +** +**************************************************************************/ + +function Component() +{ + // constructor + installer.setDefaultPageVisible(QInstaller.ComponentSelection, false); +} diff --git a/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml b/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml new file mode 100644 index 0000000..c0698a4 --- /dev/null +++ b/UnitTests/testRes/QIFCustomTemplate/custompackages/org.qtproject.ifw.example.stylesheet/meta/package.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <DisplayName>Dummy</DisplayName> + <ReleaseDate>2015-09-09</ReleaseDate> + <Version>1.0.1</Version> + <Default>true</Default> + <Script>installscript.qs</Script> +</Package> diff --git a/UnitTests/testRes/TestQMLWidgets.sh b/UnitTests/testRes/TestQMLWidgets.sh index 38e46b3..6238e0f 100755 --- a/UnitTests/testRes/TestQMLWidgets.sh +++ b/UnitTests/testRes/TestQMLWidgets.sh @@ -1,13 +1,37 @@ #!/bin/sh + +# This is default bat run script of The CQtDeployer project. +# This file contains key word that will replaced after deploy project. +# +# #################################################################### +# +# All variables has the CQT_ prefix +# BIN_PATH - are releative path to executable files of a deployed distribution. +# LIB_PATH - are releative path to libraryes of a deployed distribution. +# QML_PATH - are releative path to qml libraryes of a deployed distribution. +# PLUGIN_PATH - are releative path to qt plugins of a deployed distribution. +# BIN_PATH - are releative path to targets of a deployed distribution. + +# SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution. +# BASE_NAME - are base name of the executable that will be launched after run this script. +# CUSTOM_SCRIPT_BLOCK - This is code from the customScript option +# RUN_COMMAND - This is command for run application. Requred BASE_DIR variable. +# +# #################################################################### + BASE_DIR=$(dirname "$(readlink -f "$0")") -export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH:"$BASE_DIR"/lib/systemLibs +export PATH="$BASE_DIR"/bin/:$PATH +export LD_LIBRARY_PATH="$BASE_DIR"/lib/:"$BASE_DIR":$LD_LIBRARY_PATH 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 -export QTWEBENGINEPROCESS_PATH="$BASE_DIR"/bin/QtWebEngineProcess +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" "$@" +export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"/plugins//platforms:$QT_QPA_PLATFORM_PLUGIN_PATH + + + +"$BASE_DIR/bin/TestQMLWidgets" "$@" diff --git a/UnitTests/testRes/testMultiPackageConfig.json b/UnitTests/testRes/testMultiPackageConfig.json index b60a127..76c8357 100644 --- a/UnitTests/testRes/testMultiPackageConfig.json +++ b/UnitTests/testRes/testMultiPackageConfig.json @@ -1,7 +1,6 @@ { "bin": "$BIN_DIR", "clear": true, - "libDir": "./", "recursiveDepth": "5", "targetPackage": [ ["Dstro1", "TestOnlyC"], diff --git a/UnitTests/testutils.cpp b/UnitTests/testutils.cpp index fe071bf..7299c32 100644 --- a/UnitTests/testutils.cpp +++ b/UnitTests/testutils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -111,6 +111,7 @@ QHash<QString, int> TestUtils::compareTree(const QSet<QString> &leftTree, const bool TestUtils::deployFile(const QString &file, const QString &distanation, const QHash<QByteArray, QByteArray> &replaceCase) const { QFile f(file); + if (f.open(QIODevice::ReadOnly)) { QFile dist(distanation); if (!dist.open(QIODevice::WriteOnly | QIODevice::Truncate)) { diff --git a/UnitTests/testutils.h b/UnitTests/testutils.h index b85a1ca..775f2c7 100644 --- a/UnitTests/testutils.h +++ b/UnitTests/testutils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. diff --git a/UnitTests/tst_deploytest.cpp b/UnitTests/tst_deploytest.cpp index 336f430..37ebdac 100644 --- a/UnitTests/tst_deploytest.cpp +++ b/UnitTests/tst_deploytest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 QuasarApp. + * Copyright (C) 2018-2022 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. @@ -22,6 +22,8 @@ #include <zipcompresser.h> #include <QStorageInfo> +#include <Distributions/qif.h> + #include <QMap> #include <QByteArray> #include <QDir> @@ -48,7 +50,8 @@ private: QSet<QString> *tree = nullptr, bool noWarnings = false, bool onlySize = false, - exitCodes exitCode = exitCodes::Good); + exitCodes exitCode = exitCodes::Good, + const std::function<void (const DeployConfig *)> &cb = {}); void checkResults(const QSet<QString> &tree, bool noWarnings, @@ -181,6 +184,20 @@ private slots: void testMd5(); + void testDisableShortcuts(); + void testDisableRunScripts(); + void testQifOut(); + void testIgnoreEnvWithLibDir(); + + // note: this test checking in manual mode only. + void testInstallDirsOptions(); + + void testQIFResources(); + + void testCustomPlatform(); + void testQifArchiveFormat(); + void testQifBinaryCreator(); + void customTest(); }; @@ -189,6 +206,8 @@ deploytest::deploytest() { qputenv("QTEST_FUNCTION_TIMEOUT", "1800000"); QString qifwPath = qgetenv("PATH") + DeployCore::getEnvSeparator() + TestQtDir + "../../Tools/QtInstallerFramework/4.0/bin/"; qifwPath += qifwPath + DeployCore::getEnvSeparator() + TestQtDir + "../../Tools/QtInstallerFramework/4.1/bin/"; + qifwPath += qifwPath + DeployCore::getEnvSeparator() + TestQtDir + "../../Tools/QtInstallerFramework/4.2/bin/"; + qifwPath += qifwPath + DeployCore::getEnvSeparator() + TestQtDir + "../../Tools/QtInstallerFramework/4.3/bin/"; qputenv("PATH", qifwPath.toLatin1().data()); TestUtils utils; @@ -554,18 +573,18 @@ void deploytest::testQIFCustom() { QString qmake = TestQtDir + "bin/qmake"; auto comapareTreeCustom = utils.createTree({ - "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run", - "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run.md5", + "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run", + "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run.md5", - }); + }); #else QString bin = TestBinDir + "TestCPPOnly.exe" + "," + TestBinDir + "TestOnlyC.exe"; QString qmake = TestQtDir + "bin/qmake.exe"; auto comapareTreeCustom = utils.createTree({ - "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe", - "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe.md5", - }); + "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe", + "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe.md5", + }); #endif @@ -687,10 +706,10 @@ void deploytest::testDEBCustom() { QString bin = TestBinDir + "TestOnlyC"; auto comapareTreeCustom = utils.createTree({ - "./" + DISTRO_DIR + "/chrome.deb", - "./" + DISTRO_DIR + "/chrome.deb.md5", + "./" + DISTRO_DIR + "/chrome.deb", + "./" + DISTRO_DIR + "/chrome.deb.md5", - }); + }); runTestParams({"-bin", bin, "clear" , "-deb", TestBinDir + "/../../UnitTests/testRes/DEBCustomTemplate", @@ -901,7 +920,7 @@ void deploytest::testPrefix() { #ifdef Q_OS_UNIX QFile f("./" + DISTRO_DIR + "/bin/TestOnlyC"); auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/package/TestOnlyC.sh", "./" + DISTRO_DIR + "/package/bin/TestOnlyC", "./" + DISTRO_DIR + "/package/bin/qt.conf" @@ -911,9 +930,9 @@ void deploytest::testPrefix() { #else QFile f("./" + DISTRO_DIR + "/TestOnlyC.exe"); auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/package/TestOnlyC.exe", - "./" + DISTRO_DIR + "/package/TestOnlyC.bat", - "./" + DISTRO_DIR + "/package/qt.conf"}); + {"./" + DISTRO_DIR + "/package/TestOnlyC.exe", + "./" + DISTRO_DIR + "/package/TestOnlyC.bat", + "./" + DISTRO_DIR + "/package/qt.conf"}); QString target1 = TestBinDir + "TestOnlyC.exe"; #endif @@ -1032,8 +1051,7 @@ void deploytest::testOverridingDefaultTemplateDEB() appScript.remove(); runTestParams( - {"-bin", bin, - "force-clear", + {"force-clear", "getDefaultTemplate", "-name", "Test", "deb", @@ -1049,8 +1067,7 @@ void deploytest::testOverridingDefaultTemplateDEB() }); runTestParams( - {"-bin", bin, - "force-clear", + {"force-clear", "-deb", "temaplate/defaultDEBTemplate", "-targetPackage", "MyApp", "-name", "Test", @@ -1076,7 +1093,7 @@ void deploytest::testOverridingDefaultTemplateDEB() void deploytest::testOverridingDefaultTemplateQIF() { TestUtils utils; -// Prepare bin and qmake values + // Prepare bin and qmake values #ifdef Q_OS_UNIX QString bin = TestBinDir + "TestOnlyC" + "," + TestBinDir + "TestCPPOnly"; QString qmake = TestQtDir + "bin/qmake"; @@ -1181,21 +1198,22 @@ void deploytest::testDeployGeneralFiles() { void deploytest::testTr() { TestUtils utils; #ifdef Q_OS_UNIX - QString bin = TestBinDir + "QtWidgetsProject"; - QString qmake = TestQtDir + "bin/qmake"; + QString bin = TestBinDir + "TestOnlyC"; #else - QString bin = TestBinDir + "QtWidgetsProject.exe"; - QString qmake = TestQtDir + "bin/qmake.exe"; + QString bin = TestBinDir + "TestOnlyC.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); + "-tr", ":/testResurces/testRes/TestTr.qm",}); + + QVERIFY(QFile::exists("./" + DISTRO_DIR + "/translations/TestTr.qm")); + + runTestParams({"-bin", bin, "clear" , + "-tr", ":/testResurces/testRes/"}); + + QVERIFY(QFile::exists("./" + DISTRO_DIR + "/translations/TestTr.qm")); } void deploytest::testVirtualKeyBoard() { @@ -1251,7 +1269,7 @@ void deploytest::testIcons() { initTargets(deploy, {"-bin", bin, "force-clear", - }); + }); auto targetsMap = deploy->_config.getTargetsListByFilter("TestOnlyC"); auto targetinfo = targetsMap.begin().value(); @@ -1307,6 +1325,33 @@ void deploytest::testIcons() { delete deploy; + // manual tests +#ifdef QT_DEBUG +#ifdef Q_OS_UNIX + bin = TestBinDir + "TestOnlyC," + TestBinDir + "TestCPPOnly"; + + auto comapareTree = utils.createTree({ + "./" + DISTRO_DIR + "/InstallerTest.run", + "./" + DISTRO_DIR + "/InstallerTest.run.md5", + }); + +#else + bin = TestBinDir + "TestOnlyC.exe," + TestBinDir + "TestCPPOnly.exe"; + + auto comapareTree = utils.createTree({ + "./" + DISTRO_DIR + "/InstallerTest.exe", + "./" + DISTRO_DIR + "/InstallerTest.exe.md5", + + }); + +#endif + + runTestParams({"-bin", bin, "clear" , + "qif", "qifFromSystem", "-name", "Test", + "-targetPackage", "testPackage;TestOnlyC;TestCPPOnly", + "-icon", "TestOnlyC;:/testResurces/testRes/TestIcon.png,TestCPPOnly;:/testResurces/testRes/TestTr.qm"}, &comapareTree, true); + +#endif } void deploytest::testPathUtils() { @@ -1384,7 +1429,7 @@ void deploytest::testBinPrefix() { #ifdef Q_OS_UNIX auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/TestOnlyC", "./" + DISTRO_DIR + "/bin/qt.conf" @@ -1394,9 +1439,9 @@ void deploytest::testBinPrefix() { #else auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/TestOnlyC.exe", - "./" + DISTRO_DIR + "/TestOnlyC.bat", - "./" + DISTRO_DIR + "/qt.conf"}); + {"./" + DISTRO_DIR + "/TestOnlyC.exe", + "./" + DISTRO_DIR + "/TestOnlyC.bat", + "./" + DISTRO_DIR + "/qt.conf"}); QString target = TestBinDir + "TestOnlyC.exe"; QString targetWithoutPrefix = "TestOnlyC.exe"; @@ -1426,10 +1471,10 @@ void deploytest::testMd5() { #endif auto comapareTreeqif = utils.createTree( - { - outFile, - outFile + ".md5" - }); + { + outFile, + outFile + ".md5" + }); // Run deploy installer runTestParams({"-bin", bin, @@ -1452,9 +1497,9 @@ void deploytest::testMd5() { comapareTreeqif = utils.createTree( - { - outFile, - }); + { + outFile, + }); // Check noHashSum option. CQtDeployer must be skip calculating a hash sum of an installer. runTestParams({"-bin", bin, @@ -1464,9 +1509,270 @@ void deploytest::testMd5() { "qifFromSystem"}, &comapareTreeqif); } +void deploytest::testDisableShortcuts() { + + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = TestBinDir + "TestOnlyC"; +#else + QString bin = TestBinDir + "TestOnlyC.exe"; +#endif + + auto cb = [](const DeployConfig * config){ + const auto list = config->getTargetsListByFilter("TestOnlyC"); + // Check shrtcut option. all targets should be return false. + for (auto target: list) { + QVERIFY(!target->getShortCut()); + } + }; + + // Run deploy installer + runTestParams({"-bin", bin, "clear", + "-disableShortCut", "TestOnlyC", + "qif", "qifFromSystem"}, + nullptr, + false, + false, + exitCodes::Good, + cb); + + + +} + +void deploytest::testDisableRunScripts() { + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = TestBinDir + "TestOnlyC"; +#else + QString bin = TestBinDir + "TestOnlyC.exe"; +#endif + + auto comapareTreeqif = TestModule.onlyC(); + comapareTreeqif -= utils.createTree({DISTRO_DIR + "/TestOnlyC.sh", + DISTRO_DIR + "/TestOnlyC.bat"}); + // Run deploy installer + runTestParams({"-bin", bin, "clear", "-libDir", TestQtDir + "/bin", + "-disableRunScript", "TestOnlyC"}, &comapareTreeqif); +} + +void deploytest::testQifOut() { + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = TestBinDir + "TestOnlyC"; +#else + QString bin = TestBinDir + "TestOnlyC.exe"; +#endif + +#ifdef Q_OS_UNIX + auto result = utils.createTree({{DISTRO_DIR + "/QIF_OUT.exe"}, {DISTRO_DIR + "/QIF_OUT.exe.md5"}, + {DISTRO_DIR + "/DEB_OUT.deb"}, {DISTRO_DIR + "/DEB_OUT.deb.md5"}, + {DISTRO_DIR + "/ZIP_OUT.zip"}, {DISTRO_DIR + "/ZIP_OUT.zip.md5"}}); + + // Run deploy installer + runTestParams({"-bin", bin, "clear", + "qif", "-qifOut", "QIF_OUT.exe", + "deb", "-debOut", "DEB_OUT.deb", + "zip", "-zipOut", "ZIP_OUT.zip"}, &result); +#else + auto result = utils.createTree({{DISTRO_DIR + "/QIF_OUT.exe"}, {DISTRO_DIR + "/QIF_OUT.exe.md5"}, + {DISTRO_DIR + "/ZIP_OUT.zip"}, {DISTRO_DIR + "/ZIP_OUT.zip.md5"}}); + + // Run deploy installer + runTestParams({"-bin", bin, "clear", + "qif", "-qifOut", "QIF_OUT.exe", + "zip", "-zipOut", "ZIP_OUT.zip"}, &result); +#endif +} + +void deploytest::testIgnoreEnvWithLibDir() { +#ifdef Q_OS_UNIX + QString bin = TestBinDir + "TestOnlyC"; +#else + QString bin = TestBinDir + "TestOnlyC.exe"; +#endif + + QVERIFY(QDir().mkdir("libDirtest")); + + // Run deploy installer + runTestParams({"-bin", bin, "clear", + "-targetDir", "./libDirtest", + "-libDir", "./libDirtest"}, nullptr, false, false, + exitCodes::PrepareError); + + QVERIFY(QDir().rmdir("libDirtest")); +} + +void deploytest::testInstallDirsOptions() { +#ifdef QT_DEBUG +#ifdef Q_OS_UNIX + QStringList binMulti = {TestBinDir + "TestOnlyC" , TestBinDir + "TestCPPOnly"}; + +#else + QStringList binMulti = {TestBinDir + "TestOnlyC.exe" , TestBinDir + "TestCPPOnly.exe"}; + +#endif + + + runTestParams({"-bin", binMulti.join(","), "clear", + "qif", "deb", + "-targetPackage", "pkg;TestCPPOnly", + "-installDirDeb", "pkg;/var", + "-installDirQIFW", "/opt"}); + +#endif +} + +void deploytest::testQIFResources() { + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = {TestBinDir + "TestOnlyC"}; + + auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.run"}, + {DISTRO_DIR + "/InstallerTestOnlyC.run.md5"}}); +#else + QString bin = {TestBinDir + "TestOnlyC.exe"}; + + auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.exe"}, + {DISTRO_DIR + "/InstallerTestOnlyC.exe.md5"}}); +#endif + + + auto templateDir = TestBinDir + "/../../UnitTests/testRes/QIFCustomTemplate"; + runTestParams({ + "-bin", bin, + "clear", + "qif", + "-qifConfig", templateDir + "/customconfig.xml", + "-qifPackages", templateDir + "/custompackages", + "-qifResources", templateDir + "customRes.qrc" + }, &result + ); + +} + +void deploytest::testCustomPlatform() { + TestUtils utils; + + auto compareTree = TestModule.onlyC(); + +#ifdef Q_OS_UNIX + QString bin = {TestBinDir + "TestOnlyC"}; + QString platform = "linux_x86_64"; + +#else + QString bin = {TestBinDir + "TestOnlyC.exe"}; + QString platform = "win_x86_64"; + + compareTree = utils.createTree( + { + "./" + DISTRO_DIR + "/TestOnlyC.exe", + "./" + DISTRO_DIR + "/TestOnlyC.bat", + "./" + DISTRO_DIR + "/qt.conf" + } + ); + +#endif + + runTestParams({ + "-bin", bin, + "clear", + "-platform", platform, + }, &compareTree + ); + + + + runTestParams({ + "-bin", bin, + "clear", + "-platform", "GeneralFile", + }, nullptr, false, false, exitCodes::PrepareError + ); +} + +void deploytest::testQifArchiveFormat() { + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = {TestBinDir + "TestOnlyC"}; + + auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.run"}, + {DISTRO_DIR + "/InstallerTestOnlyC.run.md5"}}); +#else + QString bin = {TestBinDir + "TestOnlyC.exe"}; + + auto result = utils.createTree({{DISTRO_DIR + "/InstallerTestOnlyC.exe"}, + {DISTRO_DIR + "/InstallerTestOnlyC.exe.md5"}}); +#endif + + + runTestParams({ + "-bin", bin, + "qifFromSystem", + "clear", + "qif", + "-qifArchiveFormat", "zip" + }, &result + ); +} + +void deploytest::testQifBinaryCreator() { + TestUtils utils; + +#ifdef Q_OS_UNIX + QString bin = {TestBinDir + "TestOnlyC"}; +#else + QString bin = {TestBinDir + "TestOnlyC.exe"}; +#endif + + { + QuasarAppUtils::Params::parseParams({ + "-bin", bin, + "qifFromSystem", + "clear", + "qif", + "-binarycreator", "test testValue" + }); + Deploy deploy; + QVERIFY(deploy.prepare()); + FileManager fm; + QIF qif(&fm); + + auto command = qif.runCmd(); + QVERIFY(command.size() == 1); + QVERIFY(command.first().command == "test"); + QVERIFY(command.first().arguments.contains("testValue")); + } + + { + QuasarAppUtils::Params::parseParams({ + "-bin", bin, + "qifFromSystem", + "clear", + "qif", + "-binarycreator", "test" + }); + Deploy deploy; + QVERIFY(deploy.prepare()); + FileManager fm; + QIF qif(&fm); + + auto command = qif.runCmd(); + QVERIFY(command.size() == 1); + QVERIFY(command.first().command == "test"); + } + + +} + void deploytest::customTest() { -// runTestParams({"-confFile", "path", -// "qifFromSystem"}); + //runTestParams({"-confFile", "", + // "qifFromSystem"}); } void deploytest::testQmlExtrct() { @@ -1721,7 +2027,8 @@ void deploytest::testZip() { void deploytest::runTestParams(QStringList list, QSet<QString>* tree, bool noWarnings, bool onlySize, - exitCodes exitCode) { + exitCodes exitCode, + const std::function<void (const DeployConfig *)> &cb) { QuasarAppUtils::Params::parseParams(list); @@ -1737,6 +2044,9 @@ void deploytest::runTestParams(QStringList list, if (tree) { checkResults(*tree, noWarnings, onlySize); } + + if (cb) + cb(DeployCore::_config); } void deploytest::checkResults(const QSet<QString> &tree, @@ -1832,18 +2142,18 @@ void deploytest::costomScript() { #ifdef Q_OS_UNIX QFile f("./" + DISTRO_DIR + "/bin/TestOnlyC"); auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/bin/TestOnlyC", - "./" + DISTRO_DIR + "/bin/qt.conf", - "./" + DISTRO_DIR + "/TestOnlyC.sh"}); + {"./" + DISTRO_DIR + "/bin/TestOnlyC", + "./" + DISTRO_DIR + "/bin/qt.conf", + "./" + DISTRO_DIR + "/TestOnlyC.sh"}); QString bin = TestBinDir + "TestOnlyC"; QString scriptPath = "./" + DISTRO_DIR + "/TestOnlyC.sh"; #else QFile f("./" + DISTRO_DIR + "/TestOnlyC.exe"); auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/TestOnlyC.exe", - "./" + DISTRO_DIR + "/TestOnlyC.bat", - "./" + DISTRO_DIR + "/qt.conf"}); + {"./" + DISTRO_DIR + "/TestOnlyC.exe", + "./" + DISTRO_DIR + "/TestOnlyC.bat", + "./" + DISTRO_DIR + "/qt.conf"}); QString bin = TestBinDir + "TestOnlyC.exe"; QString scriptPath = "./" + DISTRO_DIR + "/TestOnlyC.bat"; @@ -1885,17 +2195,17 @@ void deploytest::testOverwrite() { #ifdef Q_OS_UNIX QFile f("./" + DISTRO_DIR + "/bin/TestOnlyC"); auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/bin/TestOnlyC", - "./" + DISTRO_DIR + "/bin/qt.conf", - "./" + DISTRO_DIR + "/TestOnlyC.sh"}); + {"./" + DISTRO_DIR + "/bin/TestOnlyC", + "./" + DISTRO_DIR + "/bin/qt.conf", + "./" + DISTRO_DIR + "/TestOnlyC.sh"}); QString bin = TestBinDir + "TestOnlyC"; #else QFile f("./" + DISTRO_DIR + "/TestOnlyC.exe"); auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/TestOnlyC.exe", - "./" + DISTRO_DIR + "/TestOnlyC.bat", - "./" + DISTRO_DIR + "/qt.conf"}); + {"./" + DISTRO_DIR + "/TestOnlyC.exe", + "./" + DISTRO_DIR + "/TestOnlyC.bat", + "./" + DISTRO_DIR + "/qt.conf"}); QString bin = TestBinDir + "TestOnlyC.exe"; #endif @@ -1947,17 +2257,17 @@ void deploytest::testOverwriteWithPacking() { #endif #ifdef Q_OS_UNIX auto comapareTreeqif = utils.createTree( - { - "./" + DISTRO_DIR + "/InstallerTest.run", - "./" + DISTRO_DIR + "/InstallerTest.run.md5", - }); + { + "./" + DISTRO_DIR + "/InstallerTest.run", + "./" + DISTRO_DIR + "/InstallerTest.run.md5", + }); #else auto comapareTreeqif = utils.createTree( - { - "./" + DISTRO_DIR + "/InstallerTest.exe", - "./" + DISTRO_DIR + "/InstallerTest.exe.md5", + { + "./" + DISTRO_DIR + "/InstallerTest.exe", + "./" + DISTRO_DIR + "/InstallerTest.exe.md5", - }); + }); #endif @@ -1975,20 +2285,20 @@ void deploytest::testextraData() { #ifdef Q_OS_UNIX auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/build/TestOnlyC", - "./" + DISTRO_DIR + "/build/TestCPPOnly", - "./" + DISTRO_DIR + "/build/QtWidgetsProject", - "./" + DISTRO_DIR + "/build/TestQMLWidgets", - "./" + DISTRO_DIR + "/build/basic", - "./" + DISTRO_DIR + "/build/quicknanobrowser", - "./" + DISTRO_DIR + "/build/webui"}); + {"./" + DISTRO_DIR + "/build/TestOnlyC", + "./" + DISTRO_DIR + "/build/TestCPPOnly", + "./" + DISTRO_DIR + "/build/QtWidgetsProject", + "./" + DISTRO_DIR + "/build/TestQMLWidgets", + "./" + DISTRO_DIR + "/build/basic", + "./" + DISTRO_DIR + "/build/quicknanobrowser", + "./" + DISTRO_DIR + "/build/webui"}); #else auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/build/TestOnlyC.exe", - "./" + DISTRO_DIR + "/build/TestCPPOnly.exe", - "./" + DISTRO_DIR + "/build/QtWidgetsProject.exe", - "./" + DISTRO_DIR + "/build/TestQMLWidgets.exe", - "./" + DISTRO_DIR + "/build/basic.exe"}); + {"./" + DISTRO_DIR + "/build/TestOnlyC.exe", + "./" + DISTRO_DIR + "/build/TestCPPOnly.exe", + "./" + DISTRO_DIR + "/build/QtWidgetsProject.exe", + "./" + DISTRO_DIR + "/build/TestQMLWidgets.exe", + "./" + DISTRO_DIR + "/build/basic.exe"}); #endif @@ -2002,7 +2312,7 @@ void deploytest::testextraData() { runTestParams({"-extraData", TestBinDir, "clear", "noCheckRPATH", "noCheckPATH", "noQt", - "-extraDataOut", "myExtraData"}, &comapareTree); + "-extraDataOut", "myExtraData"}, &comapareTree); } void deploytest::testConfFile() { @@ -2014,14 +2324,14 @@ void deploytest::testConfFile() { #ifdef Q_OS_UNIX auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/bin/TestOnlyC", - "./" + DISTRO_DIR + "/bin/qt.conf", - "./" + DISTRO_DIR + "/TestOnlyC.sh"}); + {"./" + DISTRO_DIR + "/bin/TestOnlyC", + "./" + DISTRO_DIR + "/bin/qt.conf", + "./" + DISTRO_DIR + "/TestOnlyC.sh"}); #else auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/TestOnlyC.exe", - "./" + DISTRO_DIR + "/TestOnlyC.bat", - "./" + DISTRO_DIR + "/qt.conf"}); + {"./" + DISTRO_DIR + "/TestOnlyC.exe", + "./" + DISTRO_DIR + "/TestOnlyC.bat", + "./" + DISTRO_DIR + "/qt.conf"}); #endif #ifdef Q_OS_UNIX @@ -2158,13 +2468,13 @@ void deploytest::testConfFile() { comapareTree = TestModule.ignoreFilter(comapareTree, "/plugins/p"); #ifdef Q_OS_UNIX comapareTree -= utils.createTree( - { + { "./" + DISTRO_DIR + "/lib/libQt5EglFSDeviceIntegration.so", }); auto bin = TestBinDir + "QtWidgetsProject"; #else comapareTree -= utils.createTree( - { + { "./" + DISTRO_DIR + "/Qt5DBus.dll" }); @@ -2184,7 +2494,7 @@ void deploytest::testConfFile() { #ifdef Q_OS_UNIX QFile f("./" + DISTRO_DIR + "/bin/TestOnlyC"); comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/package/TestOnlyC.sh", "./" + DISTRO_DIR + "/package/bin/TestOnlyC", "./" + DISTRO_DIR + "/package/bin/qt.conf" @@ -2194,9 +2504,9 @@ void deploytest::testConfFile() { #else QFile f("./" + DISTRO_DIR + "/TestOnlyC.exe"); comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/package/TestOnlyC.exe", - "./" + DISTRO_DIR + "/package/TestOnlyC.bat", - "./" + DISTRO_DIR + "/package/qt.conf"}); + {"./" + DISTRO_DIR + "/package/TestOnlyC.exe", + "./" + DISTRO_DIR + "/package/TestOnlyC.bat", + "./" + DISTRO_DIR + "/package/qt.conf"}); QString target1 = TestBinDir + "TestOnlyC.exe"; #endif @@ -2217,7 +2527,7 @@ void deploytest::testConfFile() { bin = TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestOnlyC.exe"; #endif QVERIFY(utils.deployFile(":/testResurces/testRes/testMultiPackageConfig.json", file, - {{"$BIN_DIR", bin.toLatin1()}})); + {{"$BIN_DIR", bin.toLatin1()}})); comapareTree = TestModule.onlyC(DISTRO_DIR + "/Dstro1") + TestModule.qtLibs(DISTRO_DIR + "/Dstro2"); @@ -2237,7 +2547,7 @@ void deploytest::testPackages() { #ifdef Q_OS_UNIX QFile f("./" + DISTRO_DIR + "/bin/TestOnlyC"); auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/package/TestOnlyC.sh", "./" + DISTRO_DIR + "/package/bin/TestOnlyC", "./" + DISTRO_DIR + "/package/bin/qt.conf" @@ -2247,9 +2557,9 @@ void deploytest::testPackages() { #else QFile f("./" + DISTRO_DIR + "/TestOnlyC.exe"); auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "/package/TestOnlyC.exe", - "./" + DISTRO_DIR + "/package/TestOnlyC.bat", - "./" + DISTRO_DIR + "/package/qt.conf"}); + {"./" + DISTRO_DIR + "/package/TestOnlyC.exe", + "./" + DISTRO_DIR + "/package/TestOnlyC.bat", + "./" + DISTRO_DIR + "/package/qt.conf"}); QString target1 = TestBinDir + "TestOnlyC.exe"; #endif @@ -2380,7 +2690,7 @@ void deploytest::testIgnore() { QString bin = TestBinDir + "QtWidgetsProject"; QString qmake = TestQtDir + "bin/qmake"; auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/QtWidgetsProject.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/QtWidgetsProject", @@ -2391,15 +2701,15 @@ void deploytest::testIgnore() { QString qmake = TestQtDir + "bin/qmake.exe"; auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/qt.conf", "./" + DISTRO_DIR + "/QtWidgetsProject.exe", "./" + DISTRO_DIR + "/QtWidgetsProject.bat", -#if defined(Q_OS_WIN64) + #if defined(Q_OS_WIN64) "./" + DISTRO_DIR + "/libgcc_s_seh-1.dll", -#else + #else "./" + DISTRO_DIR + "/libgcc_s_dw2-1.dll", -#endif + #endif "./" + DISTRO_DIR + "/libstdc++-6.dll", "./" + DISTRO_DIR + "/libwinpthread-1.dll" @@ -2512,7 +2822,7 @@ void deploytest::testLibDir() { QString extraPath = "/usr/lib,/lib"; auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/TestOnlyC" @@ -2523,7 +2833,7 @@ void deploytest::testLibDir() { QString extraPath = TestQtDir; auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/qt.conf", "./" + DISTRO_DIR + "/TestOnlyC.exe", "./" + DISTRO_DIR + "/TestOnlyC.bat", @@ -2542,7 +2852,7 @@ void deploytest::testLibDir() { #ifdef Q_OS_UNIX comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/TestOnlyC", @@ -2554,7 +2864,7 @@ void deploytest::testLibDir() { }); auto comapareTreeExtraLib = utils.createTree( - { + { "./" + DISTRO_DIR + "2/TestOnlyC.sh", "./" + DISTRO_DIR + "2/bin/qt.conf", "./" + DISTRO_DIR + "2/bin/TestOnlyC", @@ -2564,30 +2874,30 @@ void deploytest::testLibDir() { #else comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/qt.conf", "./" + DISTRO_DIR + "/TestOnlyC.exe", "./" + DISTRO_DIR + "/TestOnlyC.bat", -#if defined(Q_OS_WIN64) + #if defined(Q_OS_WIN64) "./" + DISTRO_DIR + "/libgcc_s_seh-1.dll", -#else + #else "./" + DISTRO_DIR + "/libgcc_s_dw2-1.dll", -#endif + #endif "./" + DISTRO_DIR + "/libwinpthread-1.dll", "./" + DISTRO_DIR + "/libstdc++-6.dll", }); auto comapareTreeExtraLib = utils.createTree( - { + { "./" + DISTRO_DIR + "2/qt.conf", "./" + DISTRO_DIR + "2/TestOnlyC.exe", "./" + DISTRO_DIR + "2/TestOnlyC.bat", -#if defined(Q_OS_WIN64) + #if defined(Q_OS_WIN64) "./" + DISTRO_DIR + "2/libgcc_s_seh-1.dll", -#else + #else "./" + DISTRO_DIR + "2/libgcc_s_dw2-1.dll", -#endif + #endif "./" + DISTRO_DIR + "2/libstdc++-6.dll", }); @@ -2611,7 +2921,7 @@ void deploytest::testLibDir() { #ifdef Q_OS_UNIX comapareTreeExtraLib = utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/TestOnlyC", @@ -2624,15 +2934,15 @@ void deploytest::testLibDir() { #else comapareTreeExtraLib = utils.createTree( - { + { "./" + DISTRO_DIR + "/qt.conf", "./" + DISTRO_DIR + "/TestOnlyC.exe", "./" + DISTRO_DIR + "/TestOnlyC.bat", -#if defined(Q_OS_WIN64) + #if defined(Q_OS_WIN64) "./" + DISTRO_DIR + "/libgcc_s_seh-1.dll", -#else + #else "./" + DISTRO_DIR + "/libgcc_s_dw2-1.dll", -#endif + #endif "./" + DISTRO_DIR + "/libstdc++-6.dll", }); @@ -2655,12 +2965,14 @@ void deploytest::testExtraPlugins() { QString qmake = TestQtDir + "bin/qmake"; auto pluginTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/plugins/sqldrivers/libqsqlodbc.so", "./" + DISTRO_DIR + "/plugins/sqldrivers/libqsqlpsql.so", "./" + DISTRO_DIR + "/plugins/sqldrivers/libqsqlite.so", "./" + DISTRO_DIR + "/lib/libQt5Sql.so", "./" + DISTRO_DIR + "/lib/libpq.so", + "./" + DISTRO_DIR + "/lib/libcrypto.so", + "./" + DISTRO_DIR + "/lib/libssl.so", }); #else @@ -2668,7 +2980,7 @@ void deploytest::testExtraPlugins() { QString qmake = TestQtDir + "bin/qmake.exe"; auto pluginTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/plugins/sqldrivers/qsqlmysql.dll", "./" + DISTRO_DIR + "/plugins/sqldrivers/qsqlodbc.dll", "./" + DISTRO_DIR + "/plugins/sqldrivers/qsqlite.dll", @@ -2699,7 +3011,7 @@ void deploytest::testExtraPlugins() { comapareTree -= pluginTree; comapareTree -= utils.createTree( - { + { "./" + DISTRO_DIR + "/plugins/platforms/libqxcb.so", "./" + DISTRO_DIR + "/lib/libxcb-xinerama.so.0", "./" + DISTRO_DIR + "/plugins/xcbglintegrations/libqxcb-egl-integration.so", @@ -2719,16 +3031,16 @@ void deploytest::testTargetDir() { #ifdef Q_OS_UNIX QString bin = TestBinDir + "TestOnlyC"; auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "Z/bin/TestOnlyC", - "./" + DISTRO_DIR + "Z/bin/qt.conf", - "./" + DISTRO_DIR + "Z/TestOnlyC.sh"}); + {"./" + DISTRO_DIR + "Z/bin/TestOnlyC", + "./" + DISTRO_DIR + "Z/bin/qt.conf", + "./" + DISTRO_DIR + "Z/TestOnlyC.sh"}); #else QString bin = TestBinDir + "TestOnlyC.exe"; auto comapareTree = utils.createTree( - {"./" + DISTRO_DIR + "Z/TestOnlyC.exe", - "./" + DISTRO_DIR + "Z/TestOnlyC.bat", - "./" + DISTRO_DIR + "Z/qt.conf"}); + {"./" + DISTRO_DIR + "Z/TestOnlyC.exe", + "./" + DISTRO_DIR + "Z/TestOnlyC.bat", + "./" + DISTRO_DIR + "Z/qt.conf"}); #endif runTestParams({"-bin", bin, "clear" , @@ -2744,7 +3056,7 @@ void deploytest::testSystemLib() { QString qmake = TestQtDir + "bin/qmake"; auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.sh", "./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/TestOnlyC", @@ -2757,14 +3069,14 @@ void deploytest::testSystemLib() { QString qmake = TestQtDir + "bin/qmake.exe"; auto comapareTree = utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.exe", "./" + DISTRO_DIR + "/TestOnlyC.bat", -#if defined(Q_OS_WIN64) + #if defined(Q_OS_WIN64) "./" + DISTRO_DIR + "/systemLibs/libgcc_s_seh-1.dll", -#else + #else "./" + DISTRO_DIR + "/systemLibs/libgcc_s_dw2-1.dll", -#endif + #endif "./" + DISTRO_DIR + "/systemLibs/libstdc++-6.dll", "./" + DISTRO_DIR + "/systemLibs/libwinpthread-1.dll", "./" + DISTRO_DIR + "/systemLibs/msvcrt.dll", @@ -2784,21 +3096,21 @@ void deploytest::testSystemLib() { comapareTree += TestModule.qtLibs(); comapareTree -= utils.createTree( - { + { "./" + DISTRO_DIR + "/TestOnlyC.exe", "./" + DISTRO_DIR + "/TestOnlyC.bat", -#if defined(Q_OS_WIN64) + #if defined(Q_OS_WIN64) "./" + DISTRO_DIR + "/systemLibs/libgcc_s_seh-1.dll", -#else + #else "./" + DISTRO_DIR + "/systemLibs/libgcc_s_dw2-1.dll", -#endif + #endif "./" + DISTRO_DIR + "/systemLibs/libstdc++-6.dll", "./" + DISTRO_DIR + "/systemLibs/libwinpthread-1.dll", }); comapareTree += utils.createTree( - { + { "./" + DISTRO_DIR + "/systemLibs/msvcrt.dll", "./" + DISTRO_DIR + "/qt.conf", "./" + DISTRO_DIR + "/systemLibs/mpr.dll", @@ -2814,17 +3126,17 @@ void deploytest::testSystemLib() { "./" + DISTRO_DIR + "/systemLibs/msvcp_win.dll", "./" + DISTRO_DIR + "/systemLibs/wtsapi32.dll", "./" + DISTRO_DIR + "/systemLibs/combase.dll", -#if !defined(Q_OS_WIN64) + #if !defined(Q_OS_WIN64) "./" + DISTRO_DIR + "/systemLibs/sspicli.dll", "./" + DISTRO_DIR + "/systemLibs/cryptbase.dll", -#endif + #endif }); #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) comapareTree += utils.createTree( - { + { "./" + DISTRO_DIR + "/systemLibs/d3d11.dll", "./" + DISTRO_DIR + "/systemLibs/dxgi.dll", "./" + DISTRO_DIR + "/systemLibs/win32u.dll", @@ -2908,7 +3220,7 @@ void deploytest::testOutDirs() { qDebug() << "runScript =" << runScript; QVERIFY(runScript.contains("SET BASE_DIR=%~dp0")); - QVERIFY(runScript.contains("SET PATH=%BASE_DIR%\\lolLib\\;%PATH%")); + QVERIFY(runScript.contains("SET PATH=%BASE_DIR%\\lol\\;%BASE_DIR%\\lolLib\\;%PATH%")); QVERIFY(runScript.contains("start \"TestQMLWidgets\" /B \"%BASE_DIR%\\lol\\TestQMLWidgets.exe\" %*")); runTestParams({"-bin", TestBinDir + "TestOnlyC.exe", "clear", diff --git a/doxygen.conf b/doxygen.conf index 5261c0c..2d9a0e4 100644 --- a/doxygen.conf +++ b/doxygen.conf @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = CQtDeployer +PROJECT_NAME = CQtDeployer official documentation page # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. @@ -788,9 +788,9 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ./Deploy \ - ./md \ - ./README.md +INPUT = ./md \ + + # This tag can be used to specify the character encoding of the source files @@ -983,7 +983,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = README.md +USE_MDFILE_AS_MAINPAGE = md/README.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1479,7 +1479,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. @@ -1496,7 +1496,7 @@ ENUM_VALUES_PER_LINE = 4 # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. -TREEVIEW_WIDTH = 250 +TREEVIEW_WIDTH = 300 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. diff --git a/examples/TestQMLWidgets/README.md b/examples/TestQMLWidgets/README.md index b6e9a64..9c1b75f 100644 --- a/examples/TestQMLWidgets/README.md +++ b/examples/TestQMLWidgets/README.md @@ -1,5 +1,5 @@ # This example for packing apps to snap - You need to build your project with your own qt version +You need to build your project with your own Qt version. 1. cd ~/ # go to home dir 2. snap install cqtdeployer # install cqtdeployer from snap store @@ -7,10 +7,10 @@ 4. cd Console-QtDeployer/examples/TestQMLWidgets # go to folder with example 5. /path/to/your/qmake/bin/qmake TestQMLWidgets.pro # run your qmake for this example 6. make # build example -7. cqtdeployer -bin ./build/TestQMLWidgets -qmake /path/to/your/qmake/bin/qmake -qmlDir ./ -targetDir ./distro - # run cqtdeployer for deploy example project +7. cqtdeployer -bin ./build/TestQMLWidgets -qmake /path/to/your/qmake/bin/qmake -qmlDir ./ -targetDir ./distro + # run cqtdeployer for deploy example project 8. snapcraft # create snapcraft build 9. snap install cqtdeployerexample_0.1_amd64.snap --dangerous # install this example -10.cqtdeployerexample # check -Done! +10. cqtdeployerexample # check +Done! diff --git a/md/index.md b/md/README.md similarity index 100% rename from md/index.md rename to md/README.md diff --git a/md/en/1_4.md b/md/en/1_4.md index 7c8b67b..866a1ad 100755 --- a/md/en/1_4.md +++ b/md/en/1_4.md @@ -1,4 +1,6 @@ -# Release of C++/Qt and QML application deployment utility CQtDeployer v1.4.0 (Binary Box) +# Release of CQtDeployer v1.4.0 (Binary Box) + +Release of C++/Qt and QML application deployment utility CQtDeployer v1.4.0 (Binary Box) Almost half a year later, a major update of the CQtDeployer deployment utility was released. This update has many new futures, but the main emphasis is on creating packages. diff --git a/md/en/1_5.md b/md/en/1_5.md index 14e63ca..3a0e7b4 100755 --- a/md/en/1_5.md +++ b/md/en/1_5.md @@ -1,4 +1,6 @@ -# Release of the C++/Qt and QML application deployment utility CQtDeployer v1.5.0 +# Release of CQtDeployer v1.5.0 + +Release of the C++/Qt and QML application deployment utility CQtDeployer v1.5.0 This is the first major update in 2021. CQtDeployer 1.5 contains many useful improvements. The biggest improvements are the addition of the ability to package deb packages, and the ability to use your own packaging template for the qt install framework. diff --git a/md/en/Build-and-Install.md b/md/en/Build-and-Install.md index 1851c6f..abc4ea3 100644 --- a/md/en/Build-and-Install.md +++ b/md/en/Build-and-Install.md @@ -1,40 +1,45 @@ -# Build from sources +# Install CQtDeployer -## Build for Linux -- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4) -- git clone https://github.com/QuasarApp/CQtDeployer.git -- cd CQtDeployer -- git submodule update --init --recursive -- qmake -r - - Here you must definitely call the qmake that was loaded from the 1st item. - - Example: ~/Qt/5.15.0/gcc_64/bin/qmake -r -- make -j$(nproc) -- make deploy - - #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) -- ./Distro/CQtDeployerInstaller.run - -## Build for Windows (CMD) -- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4) -- git clone https://github.com/QuasarApp/CQtDeployer.git -- cd CQtDeployer -- git submodule update --init --recursive -- SET PATH=C:/Qt/Tools/mingw810_64/bin;%PATH% - - It is important to set up the qt environment. -- qmake.exe -r - - Here you must definitely call the qmake that was loaded from the 1st item. - - Example: C:/Qt/5.15.0/mingw81_64/bin/qmake.exe -r -- migw32-make -j8 -- migw32-make deploy - - #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) -- ./Distro/CQtDeployerInstaller.exe ---- - -# Installation without building You can download the latest version of the application [here](https://github.com/QuasarApp/CQtDeployer/releases). +### Installer + +- [Download](https://github.com/QuasarApp/CQtDeployer/releases) CQtDeployer_X.X.X.X_Installer_Linux64.run or CQtDeployer_X.X.X.X_Installer_Win64.exe + +#### Install without gui + +##### Linux + +``` bash +wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Linux64.run +chmod +x CQtDeployer_1.5.3.0_Installer_Linux64.run +./CQtDeployer_1.5.3.0_Installer_Linux64.run install +``` + +##### Windows + +``` bash +wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Win64.exe +CQtDeployer_1.5.3.0_Installer_Win64.exe install +``` + +### Deb + +``` bash +wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Linux64.deb +sudo dpkg -i CQtDeployer_1.5.3.0_Linux64.deb +``` + +**Note** the package name and links can be changed, please check [Download](https://github.com/QuasarApp/CQtDeployer/releases) page before installation. + ### Snap + [](https://snapcraft.io/cqtdeployer) +``` bash +sudo snap install cqtdeployer +``` + #### Features of the snap version If you are using the snap version of the application. Enable all permissions for cqtdeployer. @@ -42,8 +47,44 @@ this can be done in the snap-store Or starting with ubuntu 20.04 in the ubuntu application settings manager. If you do not have the GUI then you can enable all permissions using next commands: + ``` bash sudo snap connect cqtdeployer:process-control sudo snap connect cqtdeployer:removable-media sudo snap connect cqtdeployer:system-backup ``` + +--- + +# Build from sources + +## Build for Linux + +- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4) +- git clone https://github.com/QuasarApp/CQtDeployer.git +- cd CQtDeployer +- git submodule update --init --recursive +- qmake -r + - Here you must definitely call the qmake that was loaded from the 1st item. + - Example: ~/Qt/5.15.0/gcc_64/bin/qmake -r +- make -j$(nproc) +- make deploy + - this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) +- ./Distro/CQtDeployerInstaller.run + +## Build for Windows (CMD) + +- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4) +- git clone https://github.com/QuasarApp/CQtDeployer.git +- cd CQtDeployer +- git submodule update --init --recursive +- SET PATH=C:/Qt/Tools/mingw810_64/bin;%PATH% + - It is important to set up the qt environment. +- qmake.exe -r + - Here you must definitely call the qmake that was loaded from the 1st item. + - Example: C:/Qt/5.15.0/mingw81_64/bin/qmake.exe -r +- migw32-make -j8 +- migw32-make deploy + - this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) +- ./Distro/CQtDeployerInstaller.exe + diff --git a/md/en/Changelog.md b/md/en/Changelog.md index a58ed05..18394ea 100755 --- a/md/en/Changelog.md +++ b/md/en/Changelog.md @@ -1,4 +1,56 @@ -# Chnage log for all versions of the CQtDeployer. +# Change log + +## CQtDeployer 1.5.4 + + +### New options + +* qifConfig - Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml #653 +* qifPackages - Sets a custom path to the packages directories. By default it is qif/packages #653 +* qifResources - Sets a custom path to the resources files. By default this option is skipped #653 +* debOut - Sets name of the output debian file. This option can be work with multiple packages +* zipOut - Sets name of the output zip arrhive. This option can be work with multiple packages + +### Bug fixes : + +* fixed crossdeploy linux -> windows #652 + + +## CQtDeployer 1.5.3 + +### New options + +* installDirDeb - Sets install target directory for debian package (by default it is /opt path) #640 +* installDirQIFW - Sets install target directory for installers (by default it is /home path) #640 + +### Bug fixes + +* Fix warning on installer fix #628 +* Added support validation input options of the command line fix #421 +* Added Error message for conflict between libDir and targetDir options #629 + +## CQtDeployer 1.5.2 + +### New parameters + +* Added **qifOut** option for set name of the output installer +* Added **disableRunScript** option for disabling the generation of run script for selected targets +* Added **disableShortCut** option for disabling the generation of shortcut for selected targets + +### Fixes + +* Fix documentation +* Fix deploy openssl libraries + +## CQtDeployer 1.5.1 + +### Fixes + +* Fix deploy multi target Debian packages +* Fix deploy qt6 qml applications + + +Change log for all versions of the CQtDeployer. ## CQtDeployer 1.5.0 @@ -107,7 +159,7 @@ - Optimized project deployment performance. 60% faster. - Optimized output size of distributions. Size reduced by 25%. - Fixed display of shortcuts after installing deployed applications. -- Fixed launching applications with spaces in the name. Thanks @ahndee (#384) +- Fixed launching applications with spaces in the name. Thanks ahndee (#384) - Fixed deployment of the Renderer plugin. - Minor bug fixes and improvements. diff --git a/md/en/CompareFeatures.md b/md/en/CompareFeatures.md index b05773d..2099211 100644 --- a/md/en/CompareFeatures.md +++ b/md/en/CompareFeatures.md @@ -1,4 +1,6 @@ -# Compare Features of Distributions of the CQtDeployer +# Compare Features + +Compare Features of Distributions of the CQtDeployer ### snap vs installer vs windows installer diff --git a/md/en/CustomScripts.md b/md/en/CustomScripts.md new file mode 100644 index 0000000..77a49d1 --- /dev/null +++ b/md/en/CustomScripts.md @@ -0,0 +1,69 @@ +# Custom Scripts + +After version 1.5.1 cqtdeployer support self variables in the custom scripts. +For using custom scripts use the **runScript option** + +### Exmaples : + +```bash +cqtdeployer -bin MyExecutable.exe -runScript MyExecutable,path/to/my/custom/script.bat +``` + +```bash +cqtdeployer -bin MyExecutable -runScript MyExecutable,path/to/my/custom/script.sh +``` + +## Suported variables list: + +* CQT_LIB_PATH - are releative path to libraryes of a deployed distribution. +* CQT_QML_PATH - are releative path to qml libraryes of a deployed distribution. +* CQT_PLUGIN_PATH - are releative path to qt plugins of a deployed distribution. +* CQT_BIN_PATH - are releative path to targets of a deployed distribution. + +* CQT_SYSTEM_LIB_PATH - are releative path to system libraryes of a deployed distribution. +* CQT_BASE_NAME - are base name of the executable that will be launched after run this script. +* CQT_CUSTOM_SCRIPT_BLOCK - This is code from the customScript option +* CQT_RUN_COMMAND - This is command for run application. Require BASEDIR variable. Note: This variable already contains symbols for redirect input script arguments to executable. + + +## The Scripts tempalte + +### Linux + +```bash +#!/bin/sh + +BASE_DIR=$(dirname "$(readlink -f "$0")") +export LD_LIBRARY_PATH="$BASE_DIR"CQT_LIB_PATH:"$BASE_DIR":$LD_LIBRARY_PATH +export QML_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML_IMPORT_PATH +export QML2_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML2_IMPORT_PATH +export QT_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH:$QT_PLUGIN_PATH +export QTWEBENGINEPROCESS_PATH="$BASE_DIR"CQT_BIN_PATH/QtWebEngineProcess +export QTDIR="$BASE_DIR" +export CQT_PKG_ROOT="$BASE_DIR" +export CQT_RUN_FILE="$BASE_DIR/CQT_BASE_NAME.sh" + +export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH/platforms:$QT_QPA_PLATFORM_PLUGIN_PATH + +CQT_CUSTOM_SCRIPT_BLOCK + +CQT_RUN_COMMAND +``` + +### Windows + +```bash + +@echo off +SET BASE_DIR=%~dp0 +SET PATH=%BASE_DIR%CQT_LIB_PATH;%PATH%;CQT_SYSTEM_LIB_PATH +SET CQT_PKG_ROOT=%BASE_DIR% +SET CQT_RUN_FILE=%BASE_DIR%CQT_BASE_NAME.bat + +CQT_CUSTOM_SCRIPT_BLOCK + +CQT_RUN_COMMAND +``` + + +Or you can get last version of this scripts from the github [repository](https://github.com/QuasarApp/CQtDeployer/tree/main/Deploy/ScriptsTemplates). diff --git a/md/en/DEB.md b/md/en/DEB.md index 92d0ee0..119d0c4 100644 --- a/md/en/DEB.md +++ b/md/en/DEB.md @@ -1,5 +1,6 @@ -## General rules for using DEB +# DEB using +General rules for using DEB #### Available from version CQtDeployer 1.5 @@ -84,3 +85,17 @@ For include your templates into your destribution you need to add path of the De "deb": "./Debian templates" } ``` + + +## Initialization of the debian template + +For initialize default templates you can use the getDefaultTemplate option. +The getDefaultTemplate option extract default template of the cqtdeployer. This is can be very convinion if you want override default behavior of the installer or anothe distribution package. + +### Example + +### Getting default debian template. + +```bash +cqtdeployer getDefaultTemplate deb +``` diff --git a/md/en/DeployConfigFile.md b/md/en/DeployConfigFile.md index a3d9612..106e235 100644 --- a/md/en/DeployConfigFile.md +++ b/md/en/DeployConfigFile.md @@ -1,7 +1,9 @@ -## Deployment file +# Deployment file + **Deployment file** - it's a json file containing the parameters for cqtdeployer. This file supports all parameters except confFile, since this parameter is responsible for connecting and initializing the file itself. ### Configuration file structure + ```json { "Bool option": true/false, @@ -29,7 +31,7 @@ } ``` -Read more about cqtdeployer options in the [options](Options) section. +Read more about cqtdeployer options in the [options](Options.md) section. Examples of the contents of this file: @@ -194,6 +196,7 @@ The purpose of file is to simplify the cqtdeployer's call and move some of the p ### Creating of the file #### The first method + 1. Call `cqtdeployer init` to initialize the file for a single-package application. Or `cqtdeployer -init multi` to initialize the file for a project with multiple packages. 2. Open CQtDeployer.json and edit it to fit your needs. @@ -216,8 +219,10 @@ Where: ### Using of the deployment file. + Use the flag -confFile [path to the file] to make cqtdeployer start reading the parameters from the file #### Example: + cqtdeployer -qmake ~/Qt/bin/qmake -confFile ./deploy.json diff --git a/md/en/Description.md b/md/en/Description.md index 42f42a3..25f5a85 100644 --- a/md/en/Description.md +++ b/md/en/Description.md @@ -1,4 +1,5 @@ -## What is CQtDeployer +# What is CQtDeployer + The CQtDeployer is application for extract all depends library of executable and create launch script for your application. Key differences of this program: diff --git a/md/en/DisableShortcats.md b/md/en/DisableShortcats.md index 48b5bd3..3787bc3 100644 --- a/md/en/DisableShortcats.md +++ b/md/en/DisableShortcats.md @@ -1,137 +1,19 @@ -# Disabling shortcuts for multi targets distribution Kit in the Qt Installer framework. +# Disabling shortcuts + +Disabling shortcuts for multi targets distribution Kit in the Qt Installer framework. Some times we need to disable creating automaticly shortcuts for some applications. For solve this problem i recomendet override the default qt installer framework template. -For this you need to extract default template for your case. You can get more infrmation in this [page](ExtractDefaultsTemplates.md). +# Note +Starting from CQtDeployer 1.5.1, you can use the -disableShortcuts option to disable the automatic creation of shortcuts. -## Case +### Example: -I have a distribution that deployed using next command: - -``` bash -cqtdeployer -bin myExecutableFile1,myExecutableFile2 -qmake /qmake/path qif -targetPackage MyDistribution +```bash +cqtdeployer -disableShortCut targetName,target2Name ``` -### where: -* **-bin myExecutableFile1,myExecutableFile2** - sets executable files. -* **-qmake /qmake/path** - sets path to your qmake. -* **qif** - option for enabling Qt Installer FrameWork Distributions. -* **-targetPackage MyDistribution** - sets new name for distribution pacakge. -To add myExecutableFile2 to the shortcut creation exception list you need to do the following steps: - -1. Extract default template. - For extraction default template you need to add into your commnad the getDefaultTemplate option. Alsu you should add targetDir option to sets path of output files. - - ``` bash - cqtdeployer -bin myExecutableFile1,myExecutableFile2 -qmake /qmake/path qif getDefaultTemplate -targetDir qifTemplate -targetPackage MyDistribution - ``` - - ### where: - * **-targetDir qifTemplate** - sets target dir for tempalte. - * **getDefaultTemplate** - option for extract default template. - - - So after this you get a default qif template in the targetDir. - - ``` bash - ~/qifTemplate$ tree - . - └── defaultQIFWTemplate - ├── config - │ ├── config.xml - │ └── controlScript.qs - └── packages - └── Application - └── meta - ├── installscript.qs - └── package.xml - - 5 directories, 4 files - - ``` - -2. Change you default template. - For disabling shortcuts you need to change the generateShortCutCmd method of the your package. In the my case it is **defaultQIFWTemplate/packages/Application/meta/installscript.qs** - - This is default implementation of install script: - ``` js - function Component() { - - } - - function extractFileName(path) { - const fullName = path.substring(path.lastIndexOf('/') + 1); - - const index = fullName.lastIndexOf('.'); - if (index >= 0) { - return fullName.substring(0, index) - } - - return fullName; - } - - function generateShortCutCmd(cmd) { - if (systemInfo.kernelType === "winnt") { - - console.log("create icons!!! on Windows"); - - component.addOperation( - "CreateShortcut", - "@TargetDir@/" + cmd + ".bat", - "@DesktopDir@/" + extractFileName(cmd) + ".lnk", - "iconPath=@TargetDir@/icons/Icon.png", - "iconId=0"); - - } - - - if (systemInfo.kernelType === "linux") { - console.log("create icons!!! on LINUX"); - const name = extractFileName(cmd); - component.addOperation("CreateDesktopEntry", - "@HomeDir@/.local/share/applications/" + name + ".desktop", - "Version=@Version@\n - Type=Application\n - Terminal=false\n - Exec=\"@TargetDir@/" + cmd + ".sh\"\n - Name=" + name + "\n - Icon=@TargetDir@/icons/Icon.png\n - Name[en_US]=" + name); - - console.log("create icons!!! on LINUX done"); - } - } - - Component.prototype.createOperations = function() { - // call default implementation to actually install README.txt! - component.createOperations(); - - const cmdArray = []; // will be changed in cqtdeployer - - cmdArray.forEach( function (item){ - generateShortCutCmd(item); - }); - - } - ``` - - Add into begin of the generateShortCutCmd method next lines for disable generate shorcuts of the *"myExecutableFile2"* application: - - ``` js - function generateShortCutCmd(cmd) { - if (cmd.include("myExecutableFile2")) - return; - ... - } - ``` - -3. Add your overriden template into your deploy command. - ``` bash - cqtdeployer -bin myExecutableFile1,myExecutableFile2 -qmake /qmake/path qif qifTemplate/defaultQIFWTemplate - ``` - -All done. Now you have a distribution with disabled shortcut for the myExecutableFile2 application. - - -## Note If you use config File or another deploy command then your deploy configuration should be equals with generate template configuration. \ No newline at end of file +```bash +cqtdeployer -bin myProgramm.exe -disableShortCut myProgramm +``` diff --git a/md/en/EnvironmentVariables.md b/md/en/EnvironmentVariables.md index 6c72183..b88084e 100644 --- a/md/en/EnvironmentVariables.md +++ b/md/en/EnvironmentVariables.md @@ -1,7 +1,11 @@ -# Environment variables of the CQtDeployer +# Environment variables + +Environment variables of the CQtDeployer + This page contains information about environment variables of the default launcher script. -## Initialization +## 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. @@ -18,7 +22,8 @@ All environment variables initialized in the default launcher script. So if you Example : -``` bash + +```bash . ├── pakcage1 << This is local root of the package1 │ ├── bin diff --git a/md/en/ExtraFiles.md b/md/en/ExtraFiles.md index a7ec079..5de95ec 100644 --- a/md/en/ExtraFiles.md +++ b/md/en/ExtraFiles.md @@ -1,4 +1,6 @@ -# Adding extraData into distributive. +# Adding extraData + +Adding extraData into distributive. CQtDeployer has support to work with extra data files. @@ -25,7 +27,7 @@ Or in configFile.json This command support list of arguments. -``` bash +```bash cqtdeployer -extraData path/to/my/customFile,path/to/my/customFile2,path/to/my/customFile3 ``` @@ -49,7 +51,7 @@ For change location you should use the extraDataOut options. This option change ### Example. Add custom scripts into scripts folder in the Distribution. -``` bash +```bash cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extraDataOut scripts ``` @@ -68,7 +70,8 @@ Or in configFile.json ``` ## Packages -extraData and extraDataOut options have support to work with packages. See the packaging [page](Pacakges.md) to get more information about packages. + +extraData and extraDataOut options have support to work with packages. See the packaging [page](Packing.md) to get more information about packages. Sometimes we need to create a multipackages application. For example create a installer for client-server application with the client and server applications. The client and server have a own default configuration files. We add config files using the extraData option. diff --git a/md/en/ExtractDefaultsTemplates.md b/md/en/ExtractDefaultsTemplates.md index 892fe99..35ed666 100644 --- a/md/en/ExtractDefaultsTemplates.md +++ b/md/en/ExtractDefaultsTemplates.md @@ -23,6 +23,7 @@ This option support the configFile.json ### Example : #### configFile.json + ```json { @@ -45,4 +46,4 @@ 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). +If you want get more information about available packages see the packing [page](Packing.md). diff --git a/md/en/Guide.md b/md/en/Guide.md index 834b1fa..6885443 100644 --- a/md/en/Guide.md +++ b/md/en/Guide.md @@ -1,4 +1,7 @@ -# How to deploy C++ Application +# How to deploy + +How to deploy C++ Application + In this article i describe deploy processes of c++/qt application with cqtdeployer. @@ -50,34 +53,40 @@ Done!!! ### Deploy your executable file. * For Linux systems: -``` bash + +```bash cqtdeployer -bin myexecutable ``` * For Windows systems: -``` bash + +```bash cqtdeployer -bin myexecutable.exe -qmake C:/Qt/5.15.0/min_gw/bin/qmake.exe ``` * For crossplatform build (Linux -> Windows) -``` bash + +```bash cqtdeployer -bin myexecutable.exe -qmake ~/crossbuildet-Qt/5.15.0/min_gw/bin/qmake ``` ## Extra options If you use extra libraries, just add path for cqtdeployer to used libs. -``` bash + +```bash cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs ``` If you want find libraries recursively from libDir path, just add recursive Depth option. -``` bash + +```bash cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 ``` If you application use qml, just add qmlDir option -``` bash + +```bash cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources ``` @@ -96,369 +105,331 @@ cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlD # Using a live animation example from [Qt Examples](https://doc.qt.io/qt-5/qtquick-animation-example.html) -1. Build the project as a release - 1. Run qmake with the -r option for release build +## Build the project as a release - ```bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ~/Qt/5.15.2/gcc_64/bin/qmake -r . - ``` +Run qmake with the -r option for release build - 2. Call your make +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.152/quick/animation$ ~/Qt/5.15.2/gcc_64/binqmake -r . +``` - * For Linux: - ```bash - make -j${nproc} - ``` - * For Windows - ```bash - Qt/Tools/QtCreator/bin/jom.exe - ``` +Call your make command. - ``` bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc} - g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o main.o main.cpp - /home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name shared ../shared/shared.qrc -o qrc_shared.cpp - /home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name animation animation.qrc -o qrc_animation.cpp - g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_animation.o qrc_animation.cpp - g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_shared.o qrc_shared.cpp - g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread - ``` -3. Find our resulting executable file - If you built the project using qtCreator, your executable file will be found one level higher in the **build-animations-Desktop_Qt_5_15_2_GCC_64bit-Release** folder - In my case, the executable file is located in the root directory of the project. - ``` bash +For Linux: + +```bash +make -j${nproc} +``` + +For Windows + +```bash +Qt/Tools/QtCreator/bin/jom.exe +``` + +Build log: + +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc} +g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o main.o main.cpp +/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name shared ../shared/shared.qrc -o qrc_shared.cpp +/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name animation animation.qrc -o qrc_animation.cpp +g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_animation.o qrc_animation.cpp +g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_shared.o qrc_shared.cpp +g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread +``` + +## Find our resulting executable file + +If you built the project using qtCreator, your executable file will be found one level higher in the **build-animations-Desktop_Qt_5_15_2_GCC_64bit-Release** folder. In my case, the executable file is located in the root directory of the project. + +```bash andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ tree - . - ├── animation # Here it is. - ├── animation.pro - ├── animation.qml - ├── animation.qmlproject - ├── animation.qrc - ├── basics - │ ├── animators.qml - │ ├── color-animation.qml - │ ├── images - │ │ ├── face-smile.png - │ │ ├── moon.png - │ │ ├── shadow.png - │ │ ├── star.png - │ │ └── sun.png - │ └── property-animation.qml - ├── behaviors - │ ├── behavior-example.qml - │ ├── FocusRect.qml - │ ├── SideRect.qml - │ ├── tvtennis.qml - │ └── wigglytext.qml - ├── doc - │ ├── images - │ │ └── qml-animations-example.png - │ └── src - │ └── animation.qdoc - ├── easing - │ └── easing.qml - ├── main.cpp - ├── main.o - ├── Makefile - ├── pathanimation - │ └── pathanimation.qml - ├── pathinterpolator - │ └── pathinterpolator.qml - ├── qrc_animation.cpp - ├── qrc_animation.o - ├── qrc_shared.cpp - ├── qrc_shared.o - └── states - ├── qt-logo.png - ├── states.qml - └── transitions.qml +. +├── animation # Here it is. +├── animation.pro +├── animation.qml +├── animation.qmlproject +├── animation.qrc +├── basics +│ ├── animators.qml +│ ├── color-animation.qml +│ ├── images +│ │ ├── face-smile.png +│ │ ├── moon.png +│ │ ├── shadow.png +│ │ ├── star.png +│ │ └── sun.png +│ └── property-animation.qml +├── behaviors +│ ├── behavior-example.qml +│ ├── FocusRect.qml +│ ├── SideRect.qml +│ ├── tvtennis.qml +│ └── wigglytext.qml +├── doc +│ ├── images +│ │ └── qml-animations-example.png +│ └── src +│ └── animation.qdoc +├── easing +│ └── easing.qml +├── main.cpp +├── main.o +├── Makefile +├── pathanimation +│ └── pathanimation.qml +├── pathinterpolator +│ └── pathinterpolator.qml +├── qrc_animation.cpp +├── qrc_animation.o +├── qrc_shared.cpp +├── qrc_shared.o +└── states + ├── qt-logo.png + ├── states.qml + └── transitions.qml - 10 directories, 33 files - ``` +10 directories, 33 files +``` -4. Call cqtdeployer to form the base distribution +## Call cqtdeployer to form the base distribution - For Linux: - ``` bash - cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake - ``` - For Windows: - ``` bash - cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe - ``` +For Linux: - ``` bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake - Info: Deploy ... - Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit - Info: target deploy started!! - Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir - Info: platform : libqvnc is disabled - Info: platform : libqvnc is disabled - Info: platform : libqwebgl is disabled - Info: platform : libqwebgl is disabled - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5 - Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56 - Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5 - Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56 - Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm - Info: try deploy msvc - Info: deploy done! - Info: copy ::/shared/Distributions/Templates/Icon.png - Error: not exits - Info: [0] Parsed arguments, ok. +```bash +cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake +``` - Info: [2] Collecting information about available packages... +For Windows: - Info: [4] Found subdirectory "Application" +```bash +cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe +``` - Info: [4] - it provides the package "Application" - "1.0" +Deploy log: - Info: [4] Copying component data for "Application" +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake +Info: Deploy ... +Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit +Info: target deploy started!! +Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir +Info: platform : libqvnc is disabled +Info: platform : libqvnc is disabled +Info: platform : libqwebgl is disabled +Info: platform : libqwebgl is disabled +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5 +Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56 +Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5 +Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56 +Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm +Info: try deploy msvc +Info: deploy done! +Info: copy ::/shared/Distributions/Templates/Icon.png +Error: not exits +Info: [0] Parsed arguments, ok. +Info: [2] Collecting information about available packages... +Info: [4] Found subdirectory "Application" +Info: [4] - it provides the package "Application" - "1.0" +Info: [4] Copying component data for "Application" +Info: [5] Compressing data directory "bin" +Info: [21] Compressing data directory "icons" +Info: [31] Compressing data directory "lib" +Info: [11111] Compressing data directory "plugins" +Info: [11740] Compressing data directory "qml" +Info: [11786] Compressing data directory "translations" +Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh") +Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" +[12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" +Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb" +Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" +[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" +Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22" +Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" +[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" +Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313" +Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" +[12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" +Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a" +Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" +Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" +Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43" +Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" +[12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" +Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1" +Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" +Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" +Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f" +Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml" +Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data" +Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs" +Info: [12360] done. +Info: [12360] Begin to copy configuration file and data. +Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml" +Info: [12360] done. +Info: [12360] Read dom element: <Name>animation</Name>. +Info: [12360] Read dom element: <Version>1.0</Version>. +Info: [12360] Read dom element: <Title>animation</Title>. +Info: [12360] Read dom element: <Publisher>Company</Publisher>. +[12360] Read dom element: <StartMenuDir>animation</StartMenuDir>. +[12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>. +Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>. +[12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>. +Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>. +Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs" +Info: [12360] done. +Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>. +[12360] Read dom element: <ProductUrl></ProductUrl>. +Info: [12360] done. +Info: [12362] Creating the binary +Info: [12407] Creating resource archive for "Application" +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB") +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes") +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes") +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes") +Info: [12449] Cleaning up... +``` - Info: [5] Compressing data directory "bin" +Done. The distribution has been saved to the **DistributionKit** folder - Info: [21] Compressing data directory "icons" - - Info: [31] Compressing data directory "lib" - - Info: [11111] Compressing data directory "plugins" - - Info: [11740] Compressing data directory "qml" - - Info: [11786] Compressing data directory "translations" - - Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh") - - Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" - [12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" - - Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb" - - Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" - [12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" - - Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22" - - Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" - [12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" - - Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313" - - Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" - [12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" - - Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a" - - Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" - - Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" - - Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43" - - Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" - [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" - - Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1" - - Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" - - Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" - - Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f" - - Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml" - - Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data" - - Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs" - - Info: [12360] done. - - Info: [12360] Begin to copy configuration file and data. - - Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml" - - Info: [12360] done. - - Info: [12360] Read dom element: <Name>animation</Name>. - - Info: [12360] Read dom element: <Version>1.0</Version>. - - Info: [12360] Read dom element: <Title>animation</Title>. - - Info: [12360] Read dom element: <Publisher>Company</Publisher>. - [12360] Read dom element: <StartMenuDir>animation</StartMenuDir>. - [12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>. - - Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>. - [12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>. - - Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>. - - Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs" - - Info: [12360] done. - - Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>. - [12360] Read dom element: <ProductUrl></ProductUrl>. - - Info: [12360] done. - - - Info: [12362] Creating the binary - - Info: [12407] Creating resource archive for "Application" - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB") - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes") - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes") - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes") - - Info: [12449] Cleaning up... - ``` - -5. Done. The distribution has been saved to the **DistributionKit** folder ```bash andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ./DistributionKit/Installeranimation.run ``` @@ -492,6 +463,7 @@ QMAKE_EXTRA_TARGETS += deploy ``` ### cmake + ```cmake find_program(Q_MAKE_EXE qmake) diff --git a/md/en/Home.md b/md/en/Home.md index 16828c2..3953aa3 100644 --- a/md/en/Home.md +++ b/md/en/Home.md @@ -19,7 +19,8 @@ * [Retrieving packaging templates](ExtractDefaultsTemplates.md) * [Default Environment Variables](EnvironmentVariables.md) * [Disable standard shortcuts ](DisableShortcats.md) +* [Custom scripts](CustomScripts.md) ## Support the project -If you like what we do and it benefits you, you can support the project on the official page [QuasarApp in Patreon](https://www.patreon.com/QuasarApp) \ No newline at end of file +If you like what we do and it benefits you, you can support the project on the official page [QuasarApp in Patreon](https://www.patreon.com/QuasarApp) diff --git a/md/en/Options.md b/md/en/Options.md index 24a32c2..6407e14 100644 --- a/md/en/Options.md +++ b/md/en/Options.md @@ -1,4 +1,7 @@ -## General rules for using options +# Options general rules + +General rules for using options + ``` cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 ``` @@ -16,12 +19,13 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 * **-libOut [package;path,path]** - parameter with support for selecting the package for which the flag value is set. As a separator, use ';'. Please note that the rule described above is used to enumerate parameter values. The last parameter does not have a package value, this means that this value will be set for all non-configured packages by default. * **clear** - boolean option -## Definitions in description +## Definitions in description + **System environments** - paths of directories containing the system libraries. * Windows: * Paths defined in the PATH variable. - * C:\Windows\System32 - * C:\Windows\SysWOW64 + * C:/Windows/System32 + * C:/Windows/SysWOW64 * Linux: * Paths defined in the LD_LIBRARY_PATH and PATH variables. * /usr/lib @@ -62,19 +66,18 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 | | Example: cqtdeployer deb" }, | | | you can specify the path to your own DEBIAN template. | | | Examples: cqtdeployer -deb path/to/myCustom/DEBIAN. More details can be found [here](DEB.md) | -| deploySystem | Deploys all libraries not recomendet because there may be conflicts with system libraries | -| 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. | +| deploySystem | Deploys all libraries not recomendet because there may be conflicts with system libraries | +| 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) | -| noHashSum | Disable computation of a packages hash sum | +| noHashSum | Disable computation of a packages hash sum | ### Deploy options | Option | Descriptiion | |-----------------------------|-----------------------------------------------------------| -| -bin [list,params] | Files to deploy or folders that contain files to deploy. For example -bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll. For files: These files will be unconditional copied to the destination directory, regardless of their format or suffix. For folders: CQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory. Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and **libDir** paths. | +| -bin [list,params] | Files to deploy or folders that contain files to deploy. For example -bin ~/my/project/bin/,~/my/project/bin.exe,~/my/project/runtimeLinking/lib.dll. For files: These files will be unconditional copied to the destination directory, regardless of their format or suffix. For folders: CQtDeployer will enter these folders and non-recursively copy all executable files to the destination directory. Then, CQtDeployer will extract all dependencies of the copied files and search dependencies in system environments and **libDir** paths. **Note**: If CQtDeployer can't find required file then CQtDeployer try find required file in the system PATH enviroment.| | -binPrefix [prefixPath] | Sets prefix path for bin option. Example: **-bin path/MyExecutable** is some as **-bin MyExecutable -binPrefix path** | | -confFile [params] | The path to the json file with all deployment configurations.| | | Using this file, you can add the necessary options, | @@ -89,15 +92,17 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 | -ignoreEnv [list,params] | The list of the environment to ignore. | | | For example -ignoreEnv /bad/dir,/my/bad/Dir | | -libDir [list,params] | Sets additional paths for extra libs of an app. | -| | For example -libDir ~/myLib,~/newLibs | +| | For example -libDir ~/myLib,~/newLibs. **Attention** the libDir option should not be children of the targetDir directory. The targetDir option is forbidden for library searches, as it may contain outdated project libraries, which in turn may lead to unwanted crashes. | | -extraLibs [list,params] | Sets the mask of the library name for forced copying. | | | Example: "-extraLib mySql" - forces to copy all libraries whose names contain mySql to the project folder. This option is case-insensitive on Windows and case-sensitive on other platforms. This option will only search libraries in system environments similar to **deploySystem**.| | -customScript [scriptCode]| Insert extra code inTo All run script. | | -extraPlugin [list,params]| Sets an additional path to extraPlugin of an app | | -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"| -| -verbose [0-3] | Shows debug log | +| -installDirDeb [params] | Sets install target directory fordebian package (by default it is /opt path) | +| -installDirQIFW [params] | Sets install target directory for installers (by default it is /home path) | +| -verbose [0-3] | Shows debug log. By default it is 2 | +| -platform [list] | If this option is enabled then CQtDeployer will deploy only binaries of a selected platform. Supported values: [win_x86 win_x86_64 win_arm win_arm64 linux_x86 linux_x86_64 linux_ARM linux_ARM64] | ### Controll of packages options @@ -125,8 +130,10 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 | Option | Descriptiion | |-----------------------------|-----------------------------------------------------------| -| -icon [target;val,val] | Sets path to icon for a targets | - +| -icon [target;val,val] | Sets path to icon for a targets. This option support only png (Linux) and ico (Windows) files. | +| -disableRunScript [target,target2,target3] | Disables the generation of run script for selected targets| +| -disableShortCut [target,target2,target3] | Disables the generation of shortcut for selected targets | +| -runScript [target;val,val] | 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" For get more information about customScript see the documentation [page](CustomScripts.md)| ### Plugins Controll Options @@ -145,6 +152,23 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3 | -qifStyle [path/to/style.css]| Sets the path to the CSS style file or sets the default style. Available styles: quasar | | -qifBanner [path/to/banner.png]| Sets path to the banner png file. | | -qifLogo [path/to/logo.png]| Sets path to the logo png file. | +| -qifOut [nameOfOutputInstallerFile] | Sets name of output qifw installer. Note: on Windows, the exe suffix will be added to the installer automatically. | +| -qifConfig [path/to/config.xml] | Sets a custom path to the configure file of the qt ifw installer. By default it is qif/config/config.xml. Note This path sets releative target folder (sets by TargetDir option). | +| -qifPackages [path/to/packagesFodoler] | Sets a custom path to the packages directories. By default it is qif/packages. Note This path sets releative target folder (sets by TargetDir option). | +| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Sets a custom path to the resources files. By default this option is skipped. Note This path sets releative target folder (sets by TargetDir option). | +| -qifArchiveFormat [7z,zip,tar,tar.gz,tar.bz2,tar.xz] | Sets the format used when packaging new component data archives. If you omit this option, the 7z format will be used as a default. | +| -binarycreator [binarycreator command] | Sets new binarycreator command. Example : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'| +### Deb package options + +| Option | Descriptiion | +|-----------------------------|-----------------------------------------------------------| +| -debOut [package;nameOfOutputDebFile,nameOfOutputDebFile]| Sets name of the output debian file. This option can be work with multiple packages | + +### Zip pacakge options + +| Option | Descriptiion | +|-----------------------------|-----------------------------------------------------------| +| -zipOut [package;nameOfOutputZipFile,nameOfOutputZipFile]| Sets name of the output zip arrhive. This option can be work with multiple packages | #### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.15.4/gcc_64/bin/qmake clear diff --git a/md/en/Packing.md b/md/en/Packing.md index b26a0e5..20ed6fb 100644 --- a/md/en/Packing.md +++ b/md/en/Packing.md @@ -1,14 +1,19 @@ -# General information on packaging your distributions in packages. +# Packaging distributions + +General information on packaging your distributions in packages. ## Packaging Types + * Automatic * Manual ## Automatic Packages + Packages with this type creates automaticly. By default the distribution have a one main package. You can configure it using [Controll of packages options](Options.md). #### Example (Set new name for pacakge) + ``` ctdeployer ... -name "MyPackage" ``` @@ -72,6 +77,7 @@ You can also do the same in the config file ## Manual Packages + Manual packages is packages created by user template. For example you have a aplication that must be execute a complex script on the debian package or the installer. So you need to create your template and add tehe path to you template for a package option. @@ -122,10 +128,12 @@ Example: ``` ### Note + You can also extract the standard package template in order to override it if for some reason you are not satisfied with the standard implementation. See this [page](ExtractDefaultsTemplates.md) for details on how to do this ## Available packages + * [Qt Install Framework](QIF.md) * [ZIP Arhive](ZIP.md) * [DEB Package](DEB.md) diff --git a/md/en/QIF.md b/md/en/QIF.md index d54dc33..622774e 100644 --- a/md/en/QIF.md +++ b/md/en/QIF.md @@ -1,4 +1,6 @@ -## General rules for using Qt Installer Framwork +# Qt Installer Framwork + +General rules for using Qt Installer Framwork ### What is Qt Installer Framwork @@ -45,6 +47,7 @@ Or you can describe packages in [configuration file](DeployConfigFile.md) ``` # Custom Template for QIF + Starting with CQtDeployer Version 1.5 you can use your own installer template. To do this, you must pass the path to your template to the qif parameter. ```bash @@ -52,14 +55,17 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template ``` ### Template + The qif template should contain 2 folders: * packages * config ### Attention + The name of the packages in the packages folder must match the names of the packages during deployment. For example: + ```json "targetPackage": [ [ @@ -109,3 +115,62 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller 4 directories, 4 files ``` + +## Initialization of the qifw template + +For initialize default templates you can use the getDefaultTemplate option. +The getDefaultTemplate option extract default template of the cqtdeployer. This is can be very convinion if you want override default behavior of the installer or anothe distribution package. + +### Example + +### Getting default qt installer framwork template. + +```bash +cqtdeployer getDefaultTemplate qif +``` + + +### Note + +CQtDeployer will skip create a packages directory for the template because this commmnad do not contains any deploying data. +If you want to prepare template with packages configurations then you should add deployed data to your command or your config.json file using bin or extraData options. +If you create multi pacakges distribution then you need to configure your packages in your deploying commnad. + + +#### Example: + +Extracting template with pacakges: + +```bash +cqtdeployer getDefaultTemplate qif -bin myExecutable +``` + +Extracting template for multi packages distribution + +```bash +cqtdeployer getDefaultTemplate qif -bin myExecutable1,myExecutable2 -targetPackage p1;myExecutable1,p2;myExecutable2 +``` + +You also can use the config file for configure templates. + +Config.json + +```json +{ + "qif": true, + "bin": [ + "myExecutable1", + "myExecutable2" + ], + "targetPackage": [ + ["p1", "myExecutable1"], + ["p2", "myExecutable2"] + ] +} +``` + +Run CQtDeployer for generate template: + +```bash +cqtdeployer -confFile Config.json getDefaultTemplate +``` diff --git a/md/en/QuickGuide.md b/md/en/QuickGuide.md index d635653..f6137d4 100644 --- a/md/en/QuickGuide.md +++ b/md/en/QuickGuide.md @@ -1,4 +1,4 @@ - +# Quick Guide How to deploy project with cqtdeployer. @@ -77,5 +77,5 @@ cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlD [1]: https://github.com/QuasarApp/CQtDeployer/releases [2]: https://github.com/QuasarApp/CQtDeployer/issues -[3]: https://github.com/QuasarApp/CQtDeployer/wiki/Options +[3]: https://github.com/QuasarApp/CQtDeployer/blob/main/md/en/Options.md diff --git a/md/en/ReleaseReviews.md b/md/en/ReleaseReviews.md index c641852..a0b5f9a 100755 --- a/md/en/ReleaseReviews.md +++ b/md/en/ReleaseReviews.md @@ -1,3 +1,4 @@ # Release Reviews +* [Review v1.5](1_5.md) * [Review v1.4 (Binary Box)](1_4.md) diff --git a/md/en/ZIP.md b/md/en/ZIP.md index 1518198..d837802 100644 --- a/md/en/ZIP.md +++ b/md/en/ZIP.md @@ -1,16 +1,18 @@ -## General rules for using ZIP +# ZIP Using + +General rules for using ZIP -#### Available from version CQtDeployer 1.5 +Available from version CQtDeployer 1.5 ### How to use zip option Just add to cqtdeployer option "zip". -#### For example: +### For example: -``` bash - cqtdeployer ... zip +```bash +cqtdeployer ... zip ``` Where: diff --git a/md/ru/1_4.md b/md/ru/1_4.md index 3fe8494..adaeef7 100755 --- a/md/ru/1_4.md +++ b/md/ru/1_4.md @@ -1,4 +1,6 @@ -# Релиз утилиты развертывания С++/Qt и QML приложений CQtDeployer v1.4.0 (Binary Box) +# Релиз CQtDeployer v1.4.0 (Binary Box) + +Релиз утилиты развертывания С++/Qt и QML приложений CQtDeployer v1.4.0 (Binary Box) Спустя почти полгода, вышло мажорное обновление утилиты развёртывания CQtDeployer. В данном обновлении множество нововведений, но основной упор в сделан на создание пакетов. diff --git a/md/ru/1_5.md b/md/ru/1_5.md index 4e8d42c..2122580 100755 --- a/md/ru/1_5.md +++ b/md/ru/1_5.md @@ -1,4 +1,6 @@ -# Выпуск утилиты развертывания приложений C ++ / Qt и QML CQtDeployer v1.5.0 +# Выпуск CQtDeployer v1.5.0 + +Выпуск утилиты развертывания приложений C ++ / Qt и QML CQtDeployer v1.5.0 Это первое крупное обновление в 2021 году. CQtDeployer 1.5 содержит множество полезных улучшений. Самыми большими улучшениями являются добавление возможности упаковывать пакеты deb и возможность использовать собственный шаблон упаковки для среды установки qt. diff --git a/md/ru/Build-and-Install.md b/md/ru/Build-and-Install.md index f8c388f..7059c9b 100644 --- a/md/ru/Build-and-Install.md +++ b/md/ru/Build-and-Install.md @@ -1,18 +1,75 @@ -# Building from source +# Установка CQtDeployer + +Вы можете загрузить последнее подготовленные сборки [здесь](https://github.com/QuasarApp/CQtDeployer/releases). + +### Установщик + +- [Загрузить](https://github.com/QuasarApp/CQtDeployer/releases) CQtDeployer_X.X.X.X_Installer_Linux64.run или CQtDeployer_X.X.X.X_Installer_Win64.exe + +#### Установка в консоли (CMD) без GUI + +##### Linux + +``` bash +wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Linux64.run +chmod +x CQtDeployer_1.5.3.0_Installer_Linux64.run +./CQtDeployer_1.5.3.0_Installer_Linux64.run install +``` + +##### Windows + +``` bash +wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Installer_Win64.exe +CQtDeployer_1.5.3.0_Installer_Win64.exe install +``` + +### Deb + +``` bash +wget https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.3/CQtDeployer_1.5.3.0_Linux64.deb +sudo dpkg -i CQtDeployer_1.5.3.0_Linux64.deb +``` + +**Примечание** имя пакета и ссылки могут быть изменены, пожалуйста, проверьте страницу [Загрузки](https://github.com/QuasarApp/CQtDeployer/releases) перед установкой. + +### Snap + +[](https://snapcraft.io/cqtdeployer) + + +#### Особенности snap версии + +Если вы используете snap версию приложения. Включите все разрешения для cqtdeployer. +это можно сделать в snap-store +Или начиная с ubuntu 20.04 в менеджере настроек приложений ubuntu. + +Если у вас нет графического интерфейса, вы можете включить все разрешения, используя следующие команды: + +``` bash +sudo snap connect cqtdeployer:process-control +sudo snap connect cqtdeployer:removable-media +sudo snap connect cqtdeployer:system-backup +``` + +--- + +# Сборка из исходников ## Build для Linux + - установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5) - git clone https://github.com/QuasarApp/CQtDeployer.git - cd CQtDeployer - git submodule update --init --recursive - qmake -r - - Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта. - - Пример: ~/Qt/5.15.0/gcc_64/bin/qmake -r + - Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта. + - Пример: ~/Qt/5.15.0/gcc_64/bin/qmake -r - make -j$(nproc) - make deploy - - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) + - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) ## Build для Windows (CMD) + - установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5) - git clone https://github.com/QuasarApp/CQtDeployer.git - cd CQtDeployer @@ -27,24 +84,3 @@ - эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases) - ./Distro/CQtDeployerInstaller.exe ---- -# Установка без сборки - -## Snap -[](https://snapcraft.io/cqtdeployer) - -#### Особенности snap версии - -Если вы используете snap версию приложения. Включите все разрешения для cqtdeployer. -это можно сделать в snap-store -Или начиная с ubuntu 20.04 в менеджере настроек приложений ubuntu. - -Если у вас нет графического интерфейса, вы можете включить все разрешения, используя следующие команды: -``` bash -sudo snap connect cqtdeployer:process-control -sudo snap connect cqtdeployer:removable-media -sudo snap connect cqtdeployer:system-backup -``` - -## Установщик -Вы можете загрузить последнюю версию приложения [здесь](https://github.com/QuasarApp/CQtDeployer/releases). diff --git a/md/ru/Changelog.md b/md/ru/Changelog.md index fad9fd5..3836333 100755 --- a/md/ru/Changelog.md +++ b/md/ru/Changelog.md @@ -1,6 +1,112 @@ -# Журнал изменений для всех версий CQtDeployer. +# Журнал изменений + +Журнал изменений для всех версий CQtDeployer. + + +## CQtDeployer 1.5.4 + +### Новые параметры +* qifConfig - Устанавливает собственный путь к файлу конфигурации установщика qt ifw. По умолчанию это qif/config/config.xml #653. +* qifPackages - Устанавливает собственный путь к каталогам пакетов. По умолчанию это qif/packages #653. +* qifResources - Устанавливает собственный путь к файлам ресурсов. По умолчанию эта опция пропущена #653 +* debOut - Устанавливает имя выходного файла debian. Эта опция может работать с несколькими пакетами +* zipOut - Устанавливает имя выходного zip-архива. Эта опция может работать с несколькими пакетами + +### Исправление ошибок : + +* исправлено crossdeploy linux -> windows # 652 + + +## CQtDeployer 1.5.3 + +### Новые параметры + +* installDirDeb - Устанавливает целевой каталог установки для пакета debian (по умолчанию это / opt путь) +* installDirQIFW - Устанавливает целевой каталог установки для установщиков (по умолчанию это / home путь) + +### Исправления +* Исправлено предупреждение при установке В windows +* Добавлена пороверка параметров ввода +* Добавлено сообщение об ошибке из-за конфликта между опциями libDir и targetDir + +## CQtDeployer 1.5.2 + +### Новые параметры + +* Добавлена опция **qifOut** для установки имени установщика +* Добавлена опция **disableRunScript** для отключения генерации сценария запуска для выбранных целей +* Добавлена опция **disableShortCut** для отключения генерации ярлыка для выбранных целей + +### Исправления + +* Фикс документации +* Фикс развертывания библиотек openssl + +## CQtDeployer 1.5.1 + +### Исправления + +* Исправлено развертывание многоцелевых пакетов Debian +* Фикс развертывания qt6 qml приложений + +## CQtDeployer 1.5.0 + +### Нововведения + +- Добавлена новая тема установщика qif "quasarDark". +- Добавлена поддержка работы с кастомным шаблоном для опции qif. +- Добавлена поддержка пакетов debian. +- Добавлена поддержка иконок для целей. теперь опция icon работает с целями, а не с пакетами. +- Добавлена поддержка управления файлами пользовательского перевода. +- Добавлена поддержка развертывания дополнительных файлов. (опция extraData) +- Добавлены переменные окружения для развернутых приложений. +- Добавлена поддержка создания пакетов deb. +- Добавлена поддержка создания zip-архивов. +- Добавлена поддержка создания установщика qif с использованием настраиваемого шаблона. +- Добавлена команда инициализации qif по умолчанию шаблона deb (getDefaulttemplate) +- Добавлена поддержка импорта пользовательских скриптов запуска. +- Добавлена поддержка хэш сумм md5 для всех пакетов. +- Добавлена поддержка Qt6.1. + +### Исправления + +- Исправлена стабильность для опции deploySystem в Windows. +- Исправлен подробный журнал. +- Исправлен общий журнал вывода. +- Исправлены опечатки в логе. +- Исправлено кросс-развертывание arm дистрибутива. +- Исправлено развертывание Qt6 qml +- Исправлены команды PowerShell в Windows. +- исправления ошибок и улучшения. + +### Новые переменные среды + +- CQT_RUN_FILE - эта переменная содержит путь к сценарию выполнения используемого приложения. +- CQT_PKG_ROOT - эта переменная содержит путь к корню текущего пакета. + +### Новые параметры + +- zip - создать ZIP-архив для развертываемых программ +- deb - Создаст deb пакет для развертываемой программы +- homepage - Установит URL-адрес домашней страницы для пакета +- noQt - Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt +- allowEmptyPackages - разрешает настраивать пустые пакеты. +- getDefaultTemplate - Извлекает шаблоны deb или qif по умолчанию. +- tr - Добавляет qm файлы в папку переводов. +- extraData - Добавляет дополнительные файлы или каталоги как цель. Выбранный каталог будет скопирован в расположение extraDataOut с сохранением собственной структуры. +- extraDataOut - Устанавливает путь к каталогу с дополнительными файлами данных. По умолчанию это корневой каталог дистрибутива. +- prefix - Устанавливает префикс для пакета относительно целевого каталога +- homePage - Установит URL-адрес домашней страницы для пакета +- binPrefix - Устанавливает путь префикса для опции bin +- noHashSum - Отключить вычисление хеш-суммы пакетов + +### Устаревшие и удаленные параметры + +- deploySystem-with-libc - вместо этого параметра используйте параметр deploySystem. +- allQmlDependes - вместо этого параметра используйте параметр qmlDir. ## CQtDeployer 1.5.0 Alpha + ### Исправления - исправления ошибок и улучшения. @@ -37,7 +143,7 @@ - Оптимизирована производительность развертывания проектов. На 60% быстрее. - Оптимизирован выходной размер дистрибутивов. Размер уменьшен на 25%. - Исправлено отображение ярлыков после установки развернутых приложений. -- Исправлен запуск приложений с пробелами в имени. спасибо @ahndee (#384) +- Исправлен запуск приложений с пробелами в имени. спасибо ahndee (#384) - Исправлено развертывание плагина Renderer. - Незначительные исправления и улучшения. @@ -238,5 +344,3 @@ - Исправлена ошибка развертывания qml - Исправлена ошибка развертывания плагинов - Добавлена поддержка статической сборки - - diff --git a/md/ru/CompareFeatures.md b/md/ru/CompareFeatures.md index ffeb071..58a3624 100644 --- a/md/ru/CompareFeatures.md +++ b/md/ru/CompareFeatures.md @@ -1,5 +1,6 @@ -# Сравните особенности дистрибутивов CQtDeployer +# Сравнение особенностей +Сравните особенности дистрибутивов CQtDeployer | Название функции | Классическая версия linux (установщик) | Snap версия | Windows версия | |---|---|---|----| diff --git a/md/ru/CustomScripts.md b/md/ru/CustomScripts.md new file mode 100644 index 0000000..96d823f --- /dev/null +++ b/md/ru/CustomScripts.md @@ -0,0 +1,68 @@ +# Пользовательские скрипты + +После версии 1.5.1 cqtdeployer поддерживает собственные переменные в пользовательских скриптах. +Для использования пользовательских сценариев используйте параметр **runScript**. + +### Примеры: + +```bash +cqtdeployer -bin MyExecutable.exe -runScript MyExecutable,path/to/my/custom/script.bat +``` + +```bash +cqtdeployer -bin MyExecutable -runScript MyExecutable,path/to/my/custom/script.sh +``` + +## Список поддерживаемых переменных: + +* CQT_LIB_PATH - это относительный путь к библиотекам развернутого дистрибутива. +* CQT_QML_PATH - это относительный путь к библиотекам qml развернутого дистрибутива. +* CQT_PLUGIN_PATH - это относительный путь к плагинам qt развернутого дистрибутива. +* CQT_BIN_PATH - это относительный путь к целям развернутого дистрибутива. + +* CQT_SYSTEM_LIB_PATH - это относительный путь к системным библиотекам развернутого дистрибутива. +* CQT_BASE_NAME - это базовое имя исполняемого файла, который будет запущен после запуска этого скрипта. +* CQT_CUSTOM_SCRIPT_BLOCK - это код из опции customScript +* CQT_RUN_COMMAND - это команда для запуска приложения. Требуется переменная BASE_DIR. Важно: Эта переменная уже содержит символы перенапровления аргументов скрипта в исполняемый файл. + +## Шаблоны скриптов запуска + +### Linux + +```bash +#!/bin/sh + +BASE_DIR=$(dirname "$(readlink -f "$0")") +export LD_LIBRARY_PATH="$BASE_DIR"CQT_LIB_PATH:"$BASE_DIR":$LD_LIBRARY_PATH +export QML_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML_IMPORT_PATH +export QML2_IMPORT_PATH="$BASE_DIR"CQT_QML_PATH:$QML2_IMPORT_PATH +export QT_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH:$QT_PLUGIN_PATH +export QTWEBENGINEPROCESS_PATH="$BASE_DIR"CQT_BIN_PATH/QtWebEngineProcess +export QTDIR="$BASE_DIR" +export CQT_PKG_ROOT="$BASE_DIR" +export CQT_RUN_FILE="$BASE_DIR/CQT_BASE_NAME.sh" + +export QT_QPA_PLATFORM_PLUGIN_PATH="$BASE_DIR"CQT_PLUGIN_PATH/platforms:$QT_QPA_PLATFORM_PLUGIN_PATH + +CQT_CUSTOM_SCRIPT_BLOCK + +CQT_RUN_COMMAND +``` + +### Windows + +```bash + +@echo off +SET BASE_DIR=%~dp0 +SET PATH=%BASE_DIR%CQT_LIB_PATH;%PATH%;CQT_SYSTEM_LIB_PATH +SET CQT_PKG_ROOT=%BASE_DIR% +SET CQT_RUN_FILE=%BASE_DIR%CQT_BASE_NAME.bat + +CQT_CUSTOM_SCRIPT_BLOCK + +CQT_RUN_COMMAND +``` + + +Или вы можете получить последнюю версию этих скриптов из github [репозитория](https://github.com/QuasarApp/CQtDeployer/tree/main/Deploy/ScriptsTemplates). diff --git a/md/ru/DEB.md b/md/ru/DEB.md index 0070bda..9048f6b 100644 --- a/md/ru/DEB.md +++ b/md/ru/DEB.md @@ -1,4 +1,6 @@ -## Общие правила использования DEB +# Использование DEB + +Общие правила использования DEB #### Доступно с версии CQtDeployer 1.5 @@ -13,8 +15,8 @@ ``` Где: -* ** ... ** - список других опций. -* ** deb ** - опция для создания deb пакетов. +* **...** - список других опций. +* **deb** - опция для создания deb пакетов. По умолчанию cqtdeployer создает один deb пакет . @@ -43,4 +45,56 @@ cqtdeployer создает вуи пакет для каждого пакета. } ``` -# Использование собственных шаблонов для создания деб пакетов \ No newline at end of file +# Использование собственных шаблонов для создания деб пакетов + +Вы можете создать собственный шаблон для пакетов debian. + +### Структура пакета debian: + + +```bash +└── Debian templates + ├── debPacakge1 + │ └── DEBIAN + │ ├── control + │ ├── postinst + │ └── prerm + └── debPacakge2 + └── DEBIAN + ├── control + ├── postinst + └── prerm + +``` + +Для включения ваших шаблонов в дистрибутив вам необходимо добавить путь к папке шаблонов Debian в deploy Config.json. + +```json +{ +"targetPackage": [ + [ + "debPacakge1", + "tar1" + ], + [ + "debPacakge2", + "tar2" + ], +], +"deb": "./Debian templates" +} +``` + + +## Инициализация шаблона debian + +Для инициализации шаблонов по умолчанию вы можете использовать параметр getDefaultTemplate. +Параметр getDefaultTemplate извлекает шаблон по умолчанию для cqtdeployer. Это может быть очень удобно, если вы хотите переопределить поведение установщика или другого пакета распространения по умолчанию. + +### Пример + +### Получение шаблона debian по умолчанию. + +```bash +cqtdeployer getDefaultTemplate deb +``` diff --git a/md/ru/DeployConfigFile.md b/md/ru/DeployConfigFile.md index ccddf55..050845e 100644 --- a/md/ru/DeployConfigFile.md +++ b/md/ru/DeployConfigFile.md @@ -1,4 +1,5 @@ -## Файл развертывания +# Файл развертывания + **Файл развертывания** - это json файл, содержащий в себе параметры для cqtdeployer. Данный файл поддерживает все параметры кроме confFile, так как данный параметр отвечает за подключение и инициализацию самого файла. ### Структура файла конфигурации @@ -29,7 +30,7 @@ } ``` -Подробно о параметрах cqtdeployer читайте в разделе [Параметры](Options). +Подробно о параметрах cqtdeployer читайте в разделе [Параметры](Options.md). Примеры содержимого данного файла: @@ -201,6 +202,7 @@ 3. Вызовите cqtdeployer в дериктории с файлом CQtDeployer.json, или укажите путь к нему используя флаг -confFile path/to/my/CQtDeployer.json #### Способ 2 + Вызовите cqtdeployer с нужным вам набором параметров и укажите путь к файлу при помощи флага -confFile (файл должен отсутствовать). Если файл будет существовать, то cqtdeployer начнет выгружать из него параметры. Пример: @@ -215,8 +217,10 @@ cqtdeployer -confFile deploy.json -bin CQtDeployerInstaller -targetDir ./test -q ### Использование файла развертывания. + Чтобы cqtdeployer начал читать параметры из файла, используйте флаг -confFile [путь к файлу] #### Пример: + cqtdeployer -qmake ~/Qt/bin/qmake -confFile ./deploy.json diff --git a/md/ru/Description.md b/md/ru/Description.md index ef25c92..fe7a80d 100644 --- a/md/ru/Description.md +++ b/md/ru/Description.md @@ -1,4 +1,4 @@ -### Что такое CQtDeployer +# Что такое CQtDeployer CQtDeployer - это утилита для извлечения всех зависимых библиотек исполняемых файлов и создания сценария запуска для вашего приложения. diff --git a/md/ru/DisableShortcats.md b/md/ru/DisableShortcats.md index 0d63e58..e4d76fa 100644 --- a/md/ru/DisableShortcats.md +++ b/md/ru/DisableShortcats.md @@ -1,136 +1,19 @@ -# Отключение ярлыков для многоцелевого дистрибутива в структуре Qt Installer. +# Отключение ярлыков для Qt Installer. + + Отключение ярлыков для многоцелевого дистрибутива в структуре Qt Installer. Иногда нам нужно отключить автоматическое создание ярлыков для некоторых приложений. Для решения этой проблемы я рекомендую переопределить шаблон фреймворка установщика qt по умолчанию. -Для этого вам нужно извлечь шаблон по умолчанию для вашего случая. Вы можете получить дополнительную информацию на этой [странице](ExtractDefaultsTemplates.md). +# Примечание +В CQtDeployer 1.5.1 вы можете добавить опцию -disableShortcuts для отключения автоматизации создания ярлыков. -## Кейс +### Пример: -У меня есть дистрибутив, развернутый с помощью следующей команды: - -``` bash -cqtdeployer -bin myExecutableFile1,myExecutableFile2 -qmake /qmake/path qif +```bash +cqtdeployer -disableShortCut targetName,target2Name ``` -### где: -* **-bin myExecutableFile1, myExecutableFile2** - устанавливает исполняемые файлы. -* **-qmake /qmake/path** - устанавливает путь к вашему qmake. -* **qif** - опция для включения дистрибутивов Qt Installer FrameWork. -* **-targetPackage MyDistribution** - устанавливает новое имя для пакета распространения. -Чтобы добавить myExecutableFile2 в список исключений создания ярлыка, вам необходимо проделать следующие шаги: - - - -1. Извлеките шаблон по умолчанию. - Для извлечения шаблона по умолчанию вам необходимо добавить в свою команду параметр getDefaultTemplate. Также вам следует добавить опцию targetDir для установки пути к выходным файлам. - - ``` bash - cqtdeployer -bin myExecutableFile1,myExecutableFile2 -qmake /qmake/path qif getDefaultTemplate -targetDir qifTemplate - ``` - - ### где: - * **- targetDir qifTemplate** - устанавливает целевой каталог для tempalte. - * **getDefaultTemplate** - опция для извлечения шаблона по умолчанию. - - Итак, после этого вы получите шаблон qif по умолчанию в targetDir. - ``` bash - ~/qifTemplate$ tree - . - └── defaultQIFWTemplate - ├── config - │ ├── config.xml - │ └── controlScript.qs - └── packages - └── Application - └── meta - ├── installscript.qs - └── package.xml - - 5 directories, 4 files - - ``` - -2. Измените шаблон по умолчанию. - Для отключения ярлыков вам необходимо изменить метод generateShortCutCmd вашего пакета. В моем случае это **defaultQIFWTemplate/packages/Application/meta/installscript.qs** - - Это реализация сценария установки по умолчанию: - ``` js - function Component() { - - } - - function extractFileName(path) { - const fullName = path.substring(path.lastIndexOf('/') + 1); - - const index = fullName.lastIndexOf('.'); - if (index >= 0) { - return fullName.substring(0, index) - } - - return fullName; - } - - function generateShortCutCmd(cmd) { - if (systemInfo.kernelType === "winnt") { - - console.log("create icons!!! on Windows"); - - component.addOperation( - "CreateShortcut", - "@TargetDir@/" + cmd + ".bat", - "@DesktopDir@/" + extractFileName(cmd) + ".lnk", - "iconPath=@TargetDir@/icons/Icon.png", - "iconId=0"); - - } - - - if (systemInfo.kernelType === "linux") { - console.log("create icons!!! on LINUX"); - const name = extractFileName(cmd); - component.addOperation("CreateDesktopEntry", - "@HomeDir@/.local/share/applications/" + name + ".desktop", - "Version=@Version@\n - Type=Application\n - Terminal=false\n - Exec=\"@TargetDir@/" + cmd + ".sh\"\n - Name=" + name + "\n - Icon=@TargetDir@/icons/Icon.png\n - Name[en_US]=" + name); - - console.log("create icons!!! on LINUX done"); - } - } - - Component.prototype.createOperations = function() { - // call default implementation to actually install README.txt! - component.createOperations(); - - const cmdArray = []; // will be changed in cqtdeployer - - cmdArray.forEach( function (item){ - generateShortCutCmd(item); - }); - - } - ``` - - Добавьте в начало метода generateShortCutCmd следующие строки для отключения генерации ярлыков приложения *"myExecutableFile2"*: - - ``` js - function generateShortCutCmd(cmd) { - if (cmd.include("myExecutableFile2")) - return; - ... - } - ``` - -3. Добавьте измененный шаблон в команду развертывания. - ``` bash - cqtdeployer -bin myExecutableFile1,myExecutableFile2 -qmake /qmake/path qif qifTemplate/defaultQIFWTemplate - ``` - -Все сделано. Теперь у вас есть дистрибутив с отключенным ярлыком для приложения myExecutableFile2. - -## Примечание. Если вы используете файл конфигурации или другую команду развертывания, ваша конфигурация развертывания должна соответствовать конфигурации генерации шаблона. \ No newline at end of file +```bash +cqtdeployer -bin myProgramm.exe -disableShortCut myProgramm +``` diff --git a/md/ru/EnvironmentVariables.md b/md/ru/EnvironmentVariables.md index 5e777d7..4c02be6 100644 --- a/md/ru/EnvironmentVariables.md +++ b/md/ru/EnvironmentVariables.md @@ -1,7 +1,9 @@ # Переменные окружения CQtDeployer + Эта страница содержит информацию о переменных содержащихся в скрипте запуска по умолчанию. ## Инициализация + Все переменные окружения инициализируются в скрипте запуска по умолчанию. Поэтому, если вы используете опцию runScript, вам необходимо вручную воссоздать все необходимые переменные. @@ -19,7 +21,8 @@ Пример : -``` bash + +```bash . ├── pakcage1 << Это локальный корень пакета package1 │ ├── bin diff --git a/md/ru/ExtraFiles.md b/md/ru/ExtraFiles.md index d5dc99c..99d071f 100644 --- a/md/ru/ExtraFiles.md +++ b/md/ru/ExtraFiles.md @@ -1,4 +1,7 @@ -# Добавление дополнительных данных в дистрибутив. +# Добавление дополнительных данных + +Добавление дополнительных данных в дистрибутив. + CQtDeployer поддерживает работу с дополнительными файлами данных. @@ -14,7 +17,7 @@ cqtdeployer -extraData путь / к / my / customFile Или в configFile.json -``` json +```json { ... "extraData": "./path/to/my/customFile" @@ -25,13 +28,13 @@ cqtdeployer -extraData путь / к / my / customFile Эта команда поддерживает список аргументов. -``` bash +```bash cqtdeployer -extraData path/to/my/customFile,path/to/my/customFile2,path/to/my/customFile3 ``` Или в configFile.json -``` json +```json { ... "extraData": [ @@ -49,13 +52,13 @@ cqtdeployer -extraData path/to/my/customFile,path/to/my/customFile2,path/to/my/c ### Пример. Добавьте пользовательские скрипты в папку скриптов в Distribution. -``` bash +```bash cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extraDataOut scripts ``` Или в configFile.json -``` json +```json { ... "extraData": [ @@ -68,7 +71,7 @@ cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extr ``` ## Пакеты -Опции extraData и extraDataOut поддерживают работу с пакетами. Дополнительную информацию о пакетах см. На [странице](Pacakges.md) упаковки. +Опции extraData и extraDataOut поддерживают работу с пакетами. Дополнительную информацию о пакетах см. На [странице](Packing.md) упаковки. Иногда нам нужно создать многопакетное приложение. Например, создайте установщик для приложения client-server с клиентскими и серверными приложениями. Клиент и сервер имеют собственные файлы конфигурации по умолчанию. Мы добавляем файлы config с помощью опции extraData. @@ -77,7 +80,7 @@ cqtdeployer -extraData /path/to/myScripts.sh,/another/path/to/myScripts.sh -extr ## Пример применения мультиупаковки. -``` json +```json { "корзина": [ diff --git a/md/ru/ExtractDefaultsTemplates.md b/md/ru/ExtractDefaultsTemplates.md index 779c96d..6c53254 100644 --- a/md/ru/ExtractDefaultsTemplates.md +++ b/md/ru/ExtractDefaultsTemplates.md @@ -1,4 +1,6 @@ -# Извлечение шаблонов по умолчанию +# Извлечение шаблонов + +Извлечение шаблонов по умолчанию Иногда вам нужно создать свои собственные шаблоны для установщиков или пакетов deb. Для этого вы можете использовать опцию getDefaultTemplate. @@ -27,7 +29,8 @@ cqtdeployer -bin myExecutable getDefaultTemplate qif -targetDir "/distanation/Di ### Пример: #### configFile.json -`` json + +```json { "корзина": [ @@ -40,7 +43,7 @@ cqtdeployer -bin myExecutable getDefaultTemplate qif -targetDir "/distanation/Di ["Сервер", "myServerExecutable"] ], } -`` +``` ```bash cqtdeployer getDefaultTemplate qif -confFile "path/to/configFile.json" @@ -48,5 +51,6 @@ cqtdeployer getDefaultTemplate qif -confFile "path/to/configFile.json" ## Запись + Эта опция поддерживает работу со всеми пакетами, кроме zip. -Если вы хотите получить больше информации о доступных пакетах, смотрите упаковку [страница](Package.md). \ No newline at end of file +Если вы хотите получить больше информации о доступных пакетах, смотрите упаковку [страница](Packing.md). \ No newline at end of file diff --git a/md/ru/Guide.md b/md/ru/Guide.md index 9fef22f..fb16ff5 100644 --- a/md/ru/Guide.md +++ b/md/ru/Guide.md @@ -1,5 +1,4 @@ -# Создания установщика прямо из qt creator. -# Как развернуть приложение C ++ +# Как развернуть приложение В этой статье я описываю процессы развертывания приложения c++/qt с помощью cqtdeployer. @@ -51,34 +50,40 @@ sudo snap connect cqtdeployer:system-backup ### Разверните исполняемый файл. * Для систем Linux: + ```bash cqtdeployer -bin myexecutable ``` * Для систем Windows: -``` bash + +```bash cqtdeployer -bin myexecutable.exe -qmake C: /Qt/5.15.0/min_gw/bin/qmake.exe ``` * Для кроссплатформенной сборки (Linux -> Windows) -``` bash + +```bash cqtdeployer -bin myexecutable.exe -qmake ~/crossbuildet-Qt/5.15.0/min_gw/ bin / qmake ``` ## Дополнительные параметры Если вы используете дополнительные библиотеки, просто добавьте путь для cqtdeployer к используемым библиотекам. -``` bash + +```bash cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs ``` Если вы хотите найти библиотеки рекурсивно из пути libDir, просто добавьте параметр рекурсивной глубины. -``` bash + +```bash cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -recursiveDepth 5 ``` Если ваше приложение использует qml, просто добавьте опцию qmlDir -``` bash + +```bash cqtdeployer -bin myexecutable -libDir/PathToMyExtraLibs -recursiveDepth 5 -qmlDir /path/to/my/qml/sources ``` @@ -97,372 +102,333 @@ cqtdeployer -bin myexecutable -libDir / PathToMyExtraLibs -recursiveDepth 5 -qml # На живом примере animation из [Примеров Qt](https://doc.qt.io/qt-5/qtquick-animation-example.html) -1. Собираем проект в релизную сборку - 1. Выполняем qmake с опцие -r для релизной сборки. +## Собираем проект в релизную сборку - ```bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ~/Qt/5.15.2/gcc_64/bin/qmake -r . - ``` +Выполняем qmake с опцие -r для релизной сборки. - 2. Вызываем ваш make generator +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ~/Qt/5.15.2/gcc_64/bin/qmake -r . +``` - * Для Linux: - ```bash - make -j${nproc} - ``` - * Для Windows - ```bash - Qt/Tools/QtCreator/bin/jom.exe - ``` +Вызываем ваш make generator - ``` bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc} - g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o main.o main.cpp - /home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name shared ../shared/shared.qrc -o qrc_shared.cpp - /home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name animation animation.qrc -o qrc_animation.cpp - g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_animation.o qrc_animation.cpp - g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_shared.o qrc_shared.cpp - g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread - ``` -3. Находим наш получившийся исполняемый файл - Если вы собирали проект с помощью qtCreator ваш исполняемый файл будет находиться на уровень выше в папке **build-Animations-Desktop_Qt_5_15_2_GCC_64bit-Release** - В моем случае исполняемый файл лежит в корневом катологе проекта. - ``` bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ tree - . - ├── animation # Вот он. - ├── animation.pro - ├── animation.qml - ├── animation.qmlproject - ├── animation.qrc - ├── basics - │ ├── animators.qml - │ ├── color-animation.qml - │ ├── images - │ │ ├── face-smile.png - │ │ ├── moon.png - │ │ ├── shadow.png - │ │ ├── star.png - │ │ └── sun.png - │ └── property-animation.qml - ├── behaviors - │ ├── behavior-example.qml - │ ├── FocusRect.qml - │ ├── SideRect.qml - │ ├── tvtennis.qml - │ └── wigglytext.qml - ├── doc - │ ├── images - │ │ └── qml-animations-example.png - │ └── src - │ └── animation.qdoc - ├── easing - │ └── easing.qml - ├── main.cpp - ├── main.o - ├── Makefile - ├── pathanimation - │ └── pathanimation.qml - ├── pathinterpolator - │ └── pathinterpolator.qml - ├── qrc_animation.cpp - ├── qrc_animation.o - ├── qrc_shared.cpp - ├── qrc_shared.o - └── states - ├── qt-logo.png - ├── states.qml - └── transitions.qml +Для Linux: - 10 directories, 33 files - ``` +```bash +make -j${nproc} +``` -4. Вызываем cqtdeployer для формирования Базового Дистрибутива +Для Windows - Для Linux: - ``` bash - cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake - ``` - Для Windows: - ``` bash - cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe - ``` +```bash +Qt/Tools/QtCreator/bin/jom.exe +``` +Билд лог - ``` bash - andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake - Info: Deploy ... - Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit - Info: target deploy started!! - Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir - Info: platform : libqvnc is disabled - Info: platform : libqvnc is disabled - Info: platform : libqwebgl is disabled - Info: platform : libqwebgl is disabled - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5 - Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56 - Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5 - Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56 - Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5 - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm - Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm - Info: try deploy msvc - Info: deploy done! - Info: copy ::/shared/Distributions/Templates/Icon.png - Error: not exits - Info: [0] Parsed arguments, ok. +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ make -j${nproc} +g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o main.o main.cpp +/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name shared ../shared/shared.qrc -o qrc_shared.cpp +/home/andrei/Qt/5.15.2/gcc_64/bin/rcc -name animation animation.qrc -o qrc_animation.cpp +g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_animation.o qrc_animation.cpp +g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../../5.15.2/gcc_64/include -I../../../../5.15.2/gcc_64/include/QtQuick -I../../../../5.15.2/gcc_64/include/QtGui -I../../../../5.15.2/gcc_64/include/QtQmlModels -I../../../../5.15.2/gcc_64/include/QtQml -I../../../../5.15.2/gcc_64/include/QtNetwork -I../../../../5.15.2/gcc_64/include/QtCore -I. -I/usr/include/libdrm -I../../../../5.15.2/gcc_64/mkspecs/linux-g++ -o qrc_shared.o qrc_shared.cpp +g++ -Wl,-O1 -Wl,-rpath,/home/andrei/Qt/5.15.2/gcc_64/lib -o animation main.o qrc_shared.o qrc_animation.o /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so /home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so -lGL -lpthread +``` - Info: [2] Collecting information about available packages... +## Находим наш получившийся исполняемый файл - Info: [4] Found subdirectory "Application" +Если вы собирали проект с помощью qtCreator ваш исполняемый файл будет находиться на уровень выше в папке **build-Animations-Desktop_Qt_5_15_2_GCC_64bit-Release** +В моем случае исполняемый файл лежит в корневом катологе проекта. - Info: [4] - it provides the package "Application" - "1.0" +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ tree +. +├── animation # Вот он. +├── animation.pro +├── animation.qml +├── animation.qmlproject +├── animation.qrc +├── basics +│ ├── animators.qml +│ ├── color-animation.qml +│ ├── images +│ │ ├── face-smile.png +│ │ ├── moon.png +│ │ ├── shadow.png +│ │ ├── star.png +│ │ └── sun.png +│ └── property-animation.qml +├── behaviors +│ ├── behavior-example.qml +│ ├── FocusRect.qml +│ ├── SideRect.qml +│ ├── tvtennis.qml +│ └── wigglytext.qml +├── doc +│ ├── images +│ │ └── qml-animations-example.png +│ └── src +│ └── animation.qdoc +├── easing +│ └── easing.qml +├── main.cpp +├── main.o +├── Makefile +├── pathanimation +│ └── pathanimation.qml +├── pathinterpolator +│ └── pathinterpolator.qml +├── qrc_animation.cpp +├── qrc_animation.o +├── qrc_shared.cpp +├── qrc_shared.o +└── states + ├── qt-logo.png + ├── states.qml + └── transitions.qml +10 directories, 33 files +``` - Info: [4] Copying component data for "Application" +## Вызываем cqtdeployer для формирования Базового Дистрибутива - Info: [5] Compressing data directory "bin" +Для Linux: - Info: [21] Compressing data directory "icons" +```bash +cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake +``` +Для Windows: - Info: [31] Compressing data directory "lib" +```bash +cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/mingw_810_64/bin/qmake.exe +``` - Info: [11111] Compressing data directory "plugins" +Лог развёртывания - Info: [11740] Compressing data directory "qml" +```bash +andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ cqtdeployer -bin animation -qmlDir . qif -qmake ~/Qt/5.15.2/gcc_64/bin/qmake +Info: Deploy ... +Info: flag targetDir not used. use default target dir :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit +Info: target deploy started!! +Info: copy :/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/animation +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/libqmlplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/libmodelsplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/Models.2/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/RemoteObjects/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/libqtqmlstatemachine.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/StateMachine/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQml/WorkerScript.2/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/libparticlesplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick/Particles.2/qmldir +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/libqtquick2plugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/plugins.qmltypes +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/qml/QtQuick.2/qmldir +Info: platform : libqvnc is disabled +Info: platform : libqvnc is disabled +Info: platform : libqwebgl is disabled +Info: platform : libqwebgl is disabled +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqconnmanbearer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqgenericbearer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/bearer/libqnmbearer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/iconengines/libqsvgicon.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqgif.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqicns.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqico.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqjpeg.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqsvg.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtga.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqtiff.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwbmp.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/imageformats/libqwebp.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqeglfs.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqlinuxfb.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimal.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqminimalegl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqoffscreen.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-generic.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqgtk3.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-decoration-client/libbradient.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdmabuf-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libdrm-egl-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libshm-emulation-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libvulkan-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-client/libxcomposite-glx.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-dmabuf-server-buffer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-drm-egl-server-buffer.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-linux-dmabuf-unstable-v1.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-shm-emulation-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-vulkan-server.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-wayland-eglstream-controller.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-egl.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-graphics-integration-server/libqt-wayland-compositor-xcomposite-glx.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libfullscreen-shell-v1.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libivi-shell.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libwl-shell.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v5.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell-v6.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/wayland-shell-integration/libxdg-shell.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Core.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Network.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5EglFSDeviceIntegration.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5XcbQpa.so.5 +Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicui18n.so.56 +Info: copy :/usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5RemoteObjects.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QuickParticles.so.5 +Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicudata.so.56 +Info: copy :/home/andrei/CQtDeployer/1.5/lib/libicuuc.so.56 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlWorkerScript.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Widgets.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandClient.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5DBus.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Qml.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Quick.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5QmlModels.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Gui.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5Svg.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/lib/libQt5WaylandCompositor.so.5 +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ar.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_bg.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ca.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_cs.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_da.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_de.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_en.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_es.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fi.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_fr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_gd.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_he.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_hu.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_it.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ja.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ko.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_lv.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_pl.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_ru.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_sk.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_tr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_uk.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtbase_zh_TW.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_bg.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_da.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_de.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_en.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_es.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fi.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_fr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_hu.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ja.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ko.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_lv.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_pl.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_ru.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_sk.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_tr.qm +Info: copy :/home/andrei/Qt/5.15.2/gcc_64/translations/qtdeclarative_uk.qm +Info: try deploy msvc +Info: deploy done! +Info: copy ::/shared/Distributions/Templates/Icon.png +Error: not exits +Info: [0] Parsed arguments, ok. +Info: [2] Collecting information about available packages... +Info: [4] Found subdirectory "Application" +Info: [4] - it provides the package "Application" - "1.0" +Info: [4] Copying component data for "Application" +Info: [5] Compressing data directory "bin" +Info: [21] Compressing data directory "icons" +Info: [31] Compressing data directory "lib" +Info: [11111] Compressing data directory "plugins" +Info: [11740] Compressing data directory "qml" +Info: [11786] Compressing data directory "translations" +Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh") +Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" +[12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" +Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb" +Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" +[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" +Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22" +Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" +[12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" +Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313" +Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" +[12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" +Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a" +Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" +Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" +Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43" +Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" +[12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" +Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1" +Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" +Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" +Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f" +Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml" +Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data" +Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs" +Info: [12360] done. +Info: [12360] Begin to copy configuration file and data. +Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml" +Info: [12360] done. +Info: [12360] Read dom element: <Name>animation</Name>. +Info: [12360] Read dom element: <Version>1.0</Version>. +Info: [12360] Read dom element: <Title>animation</Title>. +Info: [12360] Read dom element: <Publisher>Company</Publisher>. +[12360] Read dom element: <StartMenuDir>animation</StartMenuDir>. +[12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>. +Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>. +[12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>. +Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>. +Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs" +Info: [12360] done. +Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>. +[12360] Read dom element: <ProductUrl></ProductUrl>. +Info: [12360] done. +Info: [12362] Creating the binary +Info: [12407] Creating resource archive for "Application" +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB") +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes") +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes") +[12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes") +Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes") +Info: [12449] Cleaning up... +``` - Info: [11786] Compressing data directory "translations" +Готово. дистрибутив был сохранен в папку **DistributionKit** - Info: [12321] Compressing files found in data directory: ("/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/data/animation.sh") - - Info: [12321] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" - [12321] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" - - Info: [12321] Generated sha1 hash: "0af6cb9dc074407a8857403f07d13aa7d1b3c9cb" - - Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" - [12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" - - Info: [12322] Generated sha1 hash: "aa938cb332bfb427a6d0280c07c204c1bb48da22" - - Info: [12322] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" - [12322] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" - - Info: [12347] Generated sha1 hash: "7c3a43111e694bc82a0ab0d19a6e4d0025f17313" - - Info: [12347] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" - [12347] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" - - Info: [12349] Generated sha1 hash: "4ed23c36835a9b62701478ab6897737dfe9dfc9a" - - Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" - - Info: [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" - - Info: [12349] Generated sha1 hash: "bd44e15d2c26c8f6cb50760032eadf0241eedf43" - - Info: [12349] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" - [12349] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" - - Info: [12350] Generated sha1 hash: "030e0ede0c0e058a5d5a3b6c43c6a4767119d3f1" - - Info: [12350] Hash is stored in "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" - - Info: [12350] Creating hash of archive "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" - - Info: [12350] Generated sha1 hash: "acd2cd63e77971acedbcda2a65f93b2cc036025f" - - Info: [12350] Copy meta data for package "Application" using "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/package.xml" - - Info: [12350] calculate size of directory "/tmp/binarycreator-yOPMPa/Application/data" - - Info: [12359] Copying associated "script" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/packages/Application/meta/installscript.qs" - - Info: [12360] done. - - Info: [12360] Begin to copy configuration file and data. - - Info: [12360] Copying associated "configuration" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/config.xml" - - Info: [12360] done. - - Info: [12360] Read dom element: <Name>animation</Name>. - - Info: [12360] Read dom element: <Version>1.0</Version>. - - Info: [12360] Read dom element: <Title>animation</Title>. - - Info: [12360] Read dom element: <Publisher>Company</Publisher>. - [12360] Read dom element: <StartMenuDir>animation</StartMenuDir>. - [12360] Read dom element: <TargetDir>@HomeDir@/animation</TargetDir>. - - Info: [12360] Read dom element: <InstallActionColumnVisible>true</InstallActionColumnVisible>. - [12360] Read dom element: <RemoveTargetDir>true</RemoveTargetDir>. - - Info: [12360] Read dom element: <ControlScript>controlScript.qs</ControlScript>. - - Info: [12360] Copying associated "ControlScript" file "/home/andrei/Qt/Examples/Qt-5.15.2/quick/animation/DistributionKit/defaultQIFWTemplate/config/controlScript.qs" - - Info: [12360] done. - - Info: [12360] Read dom element: <MaintenanceToolName>animationTool</MaintenanceToolName>. - [12360] Read dom element: <ProductUrl></ProductUrl>. - - Info: [12360] done. - - - Info: [12362] Creating the binary - - Info: [12407] Creating resource archive for "Application" - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z" ("61.58 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0bin.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z" ("108.00 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0icons.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z" ("18.08 MB") - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0lib.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z" ("1.08 MB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0plugins.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z" ("53.29 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0qml.7z.sha1" ("40.00 bytes") - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z" ("595.71 KB") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0translations.7z.sha1" ("40.00 bytes") - [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z" ("439.00 bytes") - - Info: [12407] Appending "/tmp/binarycreator-yOPMPa/Application/1.0content.7z.sha1" ("40.00 bytes") - - Info: [12449] Cleaning up... - ``` - -5. Готово Дистрибутив был сохранен в папку **DistributionKit** ```bash andrei@X570-GAMING-X:~/Qt/Examples/Qt-5.15.2/quick/animation$ ./DistributionKit/Installeranimation.run ``` +  После установки буду созданы все необходимые ярлыки. @@ -493,6 +459,7 @@ QMAKE_EXTRA_TARGETS += deploy ``` ### cmake + ```cmake find_program(Q_MAKE_EXE qmake) @@ -519,47 +486,36 @@ QMAKE_EXTRA_TARGETS += deploy -## Пример интеграции -1. Создаем тестовый проект - ``` qmake - QT += quick +## Пример интеграции - CONFIG += c++11 +Создаем тестовый проект - # You can make your code fail to compile if it uses deprecated APIs. - # In order to do so, uncomment the following line. - #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - - SOURCES += \ - main.cpp - - RESOURCES += qml.qrc - - # Additional import path used to resolve QML modules in Qt Creator's code model - QML_IMPORT_PATH = - - # Additional import path used to resolve QML modules just for Qt Quick Designer - QML_DESIGNER_IMPORT_PATH = - - # Default rules for deployment. - qnx: target.path = /tmp/$${TARGET}/bin - else: unix:!android: target.path = /opt/$${TARGET}/bin - !isEmpty(target.path): INSTALLS += target - - - QT_DIR= $$[QT_HOST_BINS] - win32:QMAKE_BIN= $$QT_DIR/qmake.exe - contains(QMAKE_HOST.os, Linux):{ - QMAKE_BIN= $$QT_DIR/qmake - } - - DESTDIR=$$PWD/Build - - deploy.commands= cqtdeployer -bin $$DESTDIR/$$TARGET -qmake $$QMAKE_BIN -libDir $$PWD -qmlDir $$PWD -recursiveDepth 5 qif - - QMAKE_EXTRA_TARGETS += deploy - - ``` +```qmake +QT += quick +CONFIG += c++11 +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +SOURCES += \ + main.cpp +RESOURCES += qml.qrc +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = +# Additional import path used to resolve QML modules just for Qt Quick Designer +QML_DESIGNER_IMPORT_PATH = +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target +QT_DIR= $$[QT_HOST_BINS] +win32:QMAKE_BIN= $$QT_DIR/qmake.exe +contains(QMAKE_HOST.os, Linux):{ + QMAKE_BIN= $$QT_DIR/qmake +} +DESTDIR=$$PWD/Build +deploy.commands= cqtdeployer -bin $$DESTDIR/$$TARGET -qmake $$QMAKE_BIN -libDir $$PWD -qmlDir $$PWD -recursiveDepth 5 qif +QMAKE_EXTRA_TARGETS += deploy +``` 2. Открываем панель управления проектом  diff --git a/md/ru/Home.md b/md/ru/Home.md index f33670e..e636b75 100644 --- a/md/ru/Home.md +++ b/md/ru/Home.md @@ -19,7 +19,8 @@ * [Получение шаблонов упаковки](ExtractDefaultsTemplates.md) * [Стандартные переменные окружения](EnvironmentVariables.md) * [Отключение стандартных ярлыков](DisableShortcats.md) +* [Пользовательские скрипты](CustomScripts.md) ## Поддержите проект -Если вам нравится то, что мы делаем, и это приносит вам пользу, вы можете поддержать проект на официальной странице [QuasarApp в Patreon](https://www.patreon.com/QuasarApp) \ No newline at end of file +Если вам нравится то, что мы делаем, и это приносит вам пользу, вы можете поддержать проект на официальной странице [QuasarApp в Patreon](https://www.patreon.com/QuasarApp) diff --git a/md/ru/Options.md b/md/ru/Options.md index 8a41025..715c0c8 100644 --- a/md/ru/Options.md +++ b/md/ru/Options.md @@ -1,6 +1,7 @@ +# Использование параметров +Общие правила использования параметров -## Общие правила использования параметров ``` cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 ``` @@ -19,11 +20,13 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 * **clear** - флаг ## Определения в описании + **Системное окружение** - пути к системным библиотекам. * Windows: * Пути, определенные в переменной PATH. - * C:\Windows\System32 - * C:\Windows\SysWOW64 + * C:/Windows/System32 + * C:/Windows/SysWOW64 + * Linux: * Пути, определенные в переменных LD_LIBRARY_PATH и PATH. * /usr/lib @@ -65,7 +68,6 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | | Примеры: cqtdeployer -deb path/to/myCustom/DEBIAN. Подробнее можно посмотреть [здесь](DEB.md) | | deploySystem | Копирует все библиотеки кроме libc | | | (не рекомендуется, так как занимает много памяти, возможны конфликты библиотек) | -| deploySystem-with-libc | Копирует все зависимости в том числе и libc, не рекомендуется использовать с gui приложения, в место этого используйте опцию deploySystem | | noQt | Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt. | | allowEmptyPackages | Разрешите настраивать пустые пакеты. | | getDefaultTemplate | Извлекает deb или qif шаблоны по умолчанию. Для получения дополнительной информации см. [Страницу](ExtractDefaultsTemplates.md) извлечения шаблонов по умолчанию. | @@ -75,7 +77,7 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | Option | Descriptiion | |-----------------------------|-----------------------------------------------------------| -| -bin [list,params] | Развертываемый файл или папка. пример -bin ~/my/project/bin/,~/my/project/bin.exe. Для файлов: эти файлы будут безоговорочно скопированы в целевой каталог, независимо от их формата или суффикса. Для папок: CQtDeployer войдет в эти папки и нерекурсивно скопирует все развертываемые файлы в целевой каталог. Затем CQtDeployer извлечет все зависимости скопированных файлов. CQtDeployer будет искать зависимости в системной среде и в путях libDir. | +| -bin [list,params] | Развертываемый файл или папка. пример -bin ~/my/project/bin/,~/my/project/bin.exe. Для файлов: эти файлы будут безоговорочно скопированы в целевой каталог, независимо от их формата или суффикса. Для папок: CQtDeployer войдет в эти папки и нерекурсивно скопирует все развертываемые файлы в целевой каталог. Затем CQtDeployer извлечет все зависимости скопированных файлов. CQtDeployer будет искать зависимости в системной среде и в путях libDir. **Примечание**. Если CQtDeployer не может найти требуемый файл, CQtDeployer попытается найти требуемый файл в системной среде PATH. | | -binPrefix [prefixPath] | Устанавливает путь префикса для опции bin. Пример: **-bin path/MyExecutable** - это тоже что и **-bin MyExecutable -binPrefix path** | | -confFile [params] | Путь к файлу json со всеми конфигурациями развертывания. С помощью этого файла можно добавить нужные опции, тем самым упрастить вызов комманды в консоле. Однако пораметры в кансоле имеют больший приоритет чем в файле. Для получения дополнительной информации об этом флаге см. [Вики](DeployConfigFile) | | -qmlDir [params] | Папка qml. пример -qmlDir ~/my/project/qml | @@ -86,14 +88,16 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | -ignoreEnv [list,params] | Список путей для игнорирования. | | | Пример -ignoreEnv /bad/dir,/my/bad/Dir | | -libDir [list,params] | Устанавливает дополнительные пути к библиотекам | -| | Пример -libDir ~/myLib,~/newLibs | +| | Пример -libDir ~/myLib,~/newLibs. **Внимание** опция libDir не должна быть дочерней от каталога targetDir. Опция targetDir является запрещенной для поиска библиотек, так как может содержать устаревшие библиотеки проекта, что в свою очередь может привести к нежелательным крашам. | | -extraLibs [list,params] | Пример: «-extraLib mySql» - заставляет скопировать все библиотеки, имена которых содержат mySql, в папку проекта. Этот параметр не чувствителен к регистру в Windows и чувствителен к регистру на других платформах. Эта опция будет искать библиотеки только в системных средах, подобных **deploySystem**. | | -customScript [scriptCode] | Установит дополнительный код в скрипты запуска. | | -extraPlugin [list,params] | Устанавливает дополнительный путь для extraPlugin приложения| | -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"| -| -verbose [0-3] | Показывает дебаг лога | +| -installDirDeb [параметры] | Устанавливает целевой каталог для установки пакета Debian (по умолчанию это /opt путь) | +| -installDirQIFW [параметры]| Устанавливает целевой каталог установки для инсталляторов (по умолчанию это путь /home) | +| -verbose [0-3] | Показывает дебаг лог. По умолчанию равен 2 | +| -platform [list] | Если этот параметр включен, CQtDeployer будет развертывать только двоичные файлы указанной платформы. Поддерживоемые значения : [win_x86 win_x86_64 win_arm win_arm64 linux_x86 linux_x86_64 linux_ARM linux_ARM64] | ### Параметры управлениями пакетами: @@ -122,15 +126,18 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | Option | Descriptiion | |-----------------------------|-----------------------------------------------------------| -| -icon [target;val,val] | Установит путь к иконке или логотипу для целе | +| -icon [target;val,val] | Установит путь к иконке или логотипу для целе. Эта комманда поддерживает только png файлы для Linux и ico файлы для Windows | +| -disableRunScript [target; val, val]| Отключает создание сценария выполнения для выбранных целей | +| -disableShortCut [target; val, val] | Отключает создание ярлыков для выбранных целей | +| -runScript [target; val, val] | заставляет cqtdeployer заменить сценарий запуска по умолчанию на новый из аргументов параметра. Эта опция копирует все содержимое из входного файла и вставляет весь код в runScript.sh или .bat. Пример использования: cqtdeployer -runScript "myTargetMame;path/to/my/myCustomLaunchScript.sh,myTargetSecondMame;path/to/my/mySecondCustomLaunchScript.sh". Для получения дополнительной информации смотрите статью [Кастомные скрипты](CustomScripts.md)| ### Параметры управления плагинами: | Option | Descriptiion | | ----------------------------|---------------------------------------------------------- | | -extraPlugin [пакет; val1; val2, SingeleVal] | Устанавливает дополнительный путь к стороннему плагину приложения | -| -enablePlugins [пакет; val1; val2, SingeleVal] | Включает дополнительные плагины для распространения. | -| -disablePlugins [пакет; val1; val2, SingeleVal] | Отключает плагины для распространения. | +| -enablePlugins [target,target2,target3] | Включает дополнительные плагины для распространения. | +| -disablePlugins [target,target2,target3] | Отключает плагины для распространения. | | | Вы можете отключить любой плагин вашей сборки Qt, просто проверте список доступных плагинов в свой qlFolder/plugins папке. | | Пример: Если вы хотите отключить плагин qxcb: -disablePlugins qxcb. Обратите внимание, что имя плагина указывается без его расширения. @@ -141,7 +148,24 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3 | -qifStyle [path/to/style.css]| Устанавливает путь к CSS файлу стиля или устанавливает стиль по умолчанию. Доступные стили: quasar | | -qifBanner [path/to/banner.png]| Устанавливает путь к png-файлу баннера. | | -qifLogo [path/to/logo.png]| Устанавливает путь к файлу логотипа png. | +| -qifOut [nameOfOutputInstallerFile] | Устанавливает имя выходного установщика qifw. Примечание: для установщика Windows автоматически добавляется суффикс exe. | +| -qifConfig [path/to/config.xml] | Устанавливает пользовательский путь к файлу конфигурации установщика qt ifw. По умолчанию это qif/config/config.xml. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). | +| -qifPackages [path/to/packagesFodoler] | Устанавливает пользовательский путь к каталогам пакетов. По умолчанию это qif/packages. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). | +| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Устанавливает пользовательский путь к файлам ресурсов. По умолчанию эта опция пропущена. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). | +| -qifArchiveFormat [7z,zip,tar,tar.gz,tar.bz2,tar.xz] | Задает формат, используемый при упаковке новых архивов данных компонентов. Если вы опустите этот параметр, по умолчанию будет использоваться формат 7z. | +| -binarycreator [binarycreator command] | Установит новую команду вызова binarycreator. Пример : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'| +### Deb package options: + +| Option | Descriptiion | +|-----------------------------|-----------------------------------------------------------| +| -debOut [package;nameOfOutputDebFile,nameOfOutputDebFile]| Устанавливает имя выходного файла debian. Эта опция может работать с несколькими пакетами | + +### Zip pacakge options: + +| Option | Descriptiion | +|-----------------------------|-----------------------------------------------------------| +| -zipOut [package;nameOfOutputZipFile,nameOfOutputZipFile]| Устанавливает имя выходного zip архива. Эта опция может работать с несколькими пакетами | #### Пример: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.15.0/gcc_64/bin/qmake clear diff --git a/md/ru/Packing.md b/md/ru/Packing.md index e22d32c..699022a 100644 --- a/md/ru/Packing.md +++ b/md/ru/Packing.md @@ -1,14 +1,19 @@ -# Общая информация об упаковке ваших дистрибутивов в пакеты. +# Упаковка дистрибутивов + +Общая информация об упаковке ваших дистрибутивов в пакеты. ## Типы упаковки + * Автоматически * Вручную ## Автоматические пакеты + Пакеты с этим типом создаются автоматически. По умолчанию в дистрибутиве есть один основной пакет. Вы можете настроить его, используя [Параметры управления пакетами](Options.md). #### Пример (Установить новое имя для pacakge) + ``` ctdeployer ... -name "MyPackage" ``` @@ -72,6 +77,7 @@ cqtdeployer ... -targetPackage myPacage; target1, myPacage; target2, myPacage2; ## Ручные пакеты + Ручные пакеты - это пакеты, созданные по шаблону пользователя. Например, у вас есть приложение, которое должно выполнять сложный сценарий в пакете debian или программе установки. Итак, вам нужно создать свой шаблон и добавить путь к вашему шаблону для варианта пакета. @@ -122,9 +128,11 @@ cqtdeployer ... -qif /path/to/my/template/installer ``` ### Примечание + Вы так же можете извлечь стандартный шаблон пакета для того что бы его переопределить если вас по каким то причинам не устраевает стандартная реализация. Подробнее как это сделать смотрите на этой [странице](ExtractDefaultsTemplates.md). ## Доступные пакеты + * [Qt Install Framework](QIF.md) * [ZIP-архив](ZIP.md) * [Пакет DEB](DEB.md) diff --git a/md/ru/QIF.md b/md/ru/QIF.md index 925e322..9a966eb 100644 --- a/md/ru/QIF.md +++ b/md/ru/QIF.md @@ -1,4 +1,6 @@ -## Общие правила использования Qt Installer Framwork +# Использование Qt Installer Framwork + +Общие правила использования Qt Installer Framwork ### Что такое Qt Installer Framwork @@ -43,7 +45,8 @@ } ``` -# Пользовательский Шаблон для QIF +# Пользовательский Шаблон для QIF + Начиная с Версии CQtDeployer 1.5 вы можете использовать свой собственный шаблон установщика. Для этого вы должны передать в параметр qif путь к вашему шаблону. ``` @@ -51,14 +54,18 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template ``` ### Шаблон + Шаблон qif долже содержать 2 папки: * packages * config -### Внимание +### Внимание + Название пакетов в папке packages должны совподать с названием пакетов при развертывание. -Например: -``` json + +Например: + +```json "targetPackage": [ [ "myCustomInstaller", @@ -67,7 +74,7 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template ], ``` -``` bash +```bash . ├── config │ ├── config.xml @@ -93,7 +100,7 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller #### Не забудьте переименовать папку вашего пакета в имя пакета из опции имени. -``` bash +```bash . ├── config │ ├── config.xml @@ -106,4 +113,63 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller 4 directories, 4 files -``` \ No newline at end of file +``` + + +## Инициализация шаблона qifw + +Для инициализации шаблонов по умолчанию вы можете использовать параметр getDefaultTemplate. +Параметр getDefaultTemplate извлекает шаблон по умолчанию для cqtdeployer. Это может быть очень удобно, если вы хотите переопределить поведение установщика или другого пакета распространения по умолчанию. + +### Пример + +### Получение шаблона фреймворка установщика qt по умолчанию. + +```bash +cqtdeployer getDefaultTemplate qif +``` + +### Примечание + +CQtDeployer пропустит создание каталога пакетов для шаблона, поскольку эта команда не содержит данных для развертывания. +Если вы хотите подготовить шаблон с конфигурациями пакетов, вам следует добавить развернутые данные в свою команду или в файл config.json, используя параметры bin или extraData. +Если вы создаете дистрибутив с несколькими пакетами, вам необходимо настроить свои пакеты в развертываемой команде. + + +#### Пример: + +Извлечение шаблона с пакетами: + +```bash +cqtdeployer getDefaultTemplate qif -bin myExecutable +``` + +Извлечение шаблона для распространения нескольких пакетов + +```bash +cqtdeployer getDefaultTemplate qif -bin myExecutable1,myExecutable2 -targetPackage p1;myExecutable1,p2;myExecutable2 +``` + +Вы также можете использовать файл конфигурации для настройки шаблонов. + +Config.json + +```json +{ + "qif": true, + "bin": [ + "myExecutable1", + "myExecutable2" + ], + "targetPackage": [ + ["p1", "myExecutable1"], + ["p2", "myExecutable2"] + ] +} +``` + +Запустите CQtDeployer для создания шаблона: + +```bash +cqtdeployer -confFile Config.json getDefaultTemplate +``` diff --git a/md/ru/QuickGuide.md b/md/ru/QuickGuide.md index 06dd37f..8247f89 100644 --- a/md/ru/QuickGuide.md +++ b/md/ru/QuickGuide.md @@ -1,4 +1,4 @@ - +# Быстрый гайд Как развернуть приложение с помощью CQtDeployer @@ -77,5 +77,5 @@ cqtdeployer -bin myexecutable -libDir /PathToMyExtraLibs -recursiveDepth 5 -qmlD [1]: https://github.com/QuasarApp/CQtDeployer/releases [2]: https://github.com/QuasarApp/CQtDeployer/issues -[3]: https://github.com/QuasarApp/CQtDeployer/wiki/Options +[3]: https://github.com/QuasarApp/CQtDeployer/blob/main/md/ru/Options.md diff --git a/md/ru/ReleaseReviews.md b/md/ru/ReleaseReviews.md index f135d63..69cc008 100755 --- a/md/ru/ReleaseReviews.md +++ b/md/ru/ReleaseReviews.md @@ -1,3 +1,4 @@ # Обзоры на релизы +* [Обзор v1.5](1_5.md) * [Обзор v1.4 (Бинарный ящик)](1_4.md) diff --git a/md/ru/ZIP.md b/md/ru/ZIP.md index 256191e..0dedaac 100644 --- a/md/ru/ZIP.md +++ b/md/ru/ZIP.md @@ -1,24 +1,27 @@ -## Общие правила использования ZIP +# Использование ZIP -#### Доступно с версии CQtDeployer 1.5 +Общие правила использования ZIP + +Доступно с версии CQtDeployer 1.5 ### Как использовать опцию zip Просто добавьте в cqtdeployer опцию «zip». -#### Например: +### Например: -``` bash - cqtdeployer ... zip +```bash +cqtdeployer ... zip ``` Где: -* ** ... ** - список других опций. -* ** zip ** - опция использования zip архивов. + +* **...** - список других опций. +* **zip** - опция использования zip архивов. По умолчанию cqtdeployer создает один zip-архив. -Если вы хотите создать рассылку нескольких пакетов, вы должны использовать [Параметры управления пакетами](Options.md) +Если вы хотите создать рассылку нескольких пакетов, вы должны использовать [Параметры управления пакетами](Options.md). Чтобы создать новый пакет, используйте -targetPackage [package; tar1] вариант cqtdeployer создает zip-архив для каждого пакета. @@ -31,7 +34,7 @@ cqtdeployer создает zip-архив для каждого пакета. Или вы можете описать пакеты в [файле конфигурации](DeployConfigFile.md) -```JSON +```json { "targetPackage": [ [ diff --git a/qtTools b/qtTools index b0147a5..cc52deb 160000 --- a/qtTools +++ b/qtTools @@ -1 +1 @@ -Subproject commit b0147a5d79ce7a7e77a24f36aaddfacb1a1517c8 +Subproject commit cc52debd905e0ed061290d6fd00a5f1ab67478a5 diff --git a/res/Credits.jpg b/res/Credits.jpg new file mode 100644 index 0000000..4e2aaac Binary files /dev/null and b/res/Credits.jpg differ diff --git a/res/qr.png b/res/qr.png new file mode 100644 index 0000000..6544d8b Binary files /dev/null and b/res/qr.png differ diff --git a/snap/gui/cqtdeployer.desktop b/snap/gui/cqtdeployer.desktop index 737e9bc..9da7201 100755 --- a/snap/gui/cqtdeployer.desktop +++ b/snap/gui/cqtdeployer.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Version=1.5.0.36 +Version=1.5.4.17 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.36 +X-GNOME-Bugzilla-Version=1.5.4.17 StartupNotify=true Name[ru_RU]=CQtDeployer diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index f749d1e..d519e45 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,12 +1,12 @@ # -# Copyright (C) 2018-2021 QuasarApp. +# Copyright (C) 2018-2022 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. # name: cqtdeployer # you probably want to 'snapcraft register <name>' -version: '1.5.0.36' # just for humans, typically '1.2+git' or '1.3.2' +version: '1.5.4.17' # 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. @@ -39,7 +39,11 @@ parts: - libpng16-16 - dpkg - libwayland-cursor0 - + - libxcb-icccm4 + - libxcb-image0 + - libxcb-keysyms1 + - libxcb-render-util0 + - libxcb-xinerama0 qif: plugin: dump diff --git a/zip b/zip index accf7ef..76651e2 160000 --- a/zip +++ b/zip @@ -1 +1 @@ -Subproject commit accf7ef7bbfba9f7ddcfaf9d6222279293f5dcf2 +Subproject commit 76651e2d614612718d9a8ec21f0a91da394e0506