Merge pull request #610 from QuasarApp/v1.5

V1.5
This commit is contained in:
Andrei Yankovich 2021-05-23 09:42:13 +03:00 committed by GitHub
commit c778ddd933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
89 changed files with 908 additions and 615 deletions

View File

@ -22,6 +22,7 @@ android: DEFINES += WITHOUT_TESTS
CQtDeployer \ CQtDeployer \
UnitTests \ UnitTests \
tests/TestOnlyC \ tests/TestOnlyC \
tests/TestCPPOnly \
tests/TestQtWidgets \ tests/TestQtWidgets \
tests/TestQMLWidgets \ tests/TestQMLWidgets \
tests/virtualkeyboard tests/virtualkeyboard
@ -33,6 +34,7 @@ android: DEFINES += WITHOUT_TESTS
contains(DEFINES, WITHOUT_TESTS) { contains(DEFINES, WITHOUT_TESTS) {
SUBDIRS -= UnitTests \ SUBDIRS -= UnitTests \
tests/TestOnlyC \ tests/TestOnlyC \
tests/TestCPPOnly \
tests/TestQtWidgets \ tests/TestQtWidgets \
tests/TestQMLWidgets \ tests/TestQMLWidgets \
tests/quicknanobrowser \ tests/quicknanobrowser \

View File

@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
if (!QuasarAppUtils::Params::parseParams(argc, argv)) { if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
QuasarAppUtils::Params::log("wrong parametrs", QuasarAppUtils::Warning); QuasarAppUtils::Params::log("Wrong parameters", QuasarAppUtils::Warning);
DeployCore::help(); DeployCore::help();
exit(0); exit(0);
} }

View File

@ -19,7 +19,7 @@ TEMPLATE = lib
DEFINES += DEPLOY_LIBRARY DEFINES += DEPLOY_LIBRARY
VERSION = 1.5.0.31 VERSION = 1.5.0.34
DEFINES += APP_VERSION='\\"$$VERSION\\"' DEFINES += APP_VERSION='\\"$$VERSION\\"'

View File

@ -4,6 +4,5 @@ Maintainer: $PUBLISHER
Version: $VERSION Version: $VERSION
Homepage: $HOMEPAGE Homepage: $HOMEPAGE
Architecture: all Architecture: all
Depends: libgl1-mesa-dev
Description: $DESCRIPTION Description: $DESCRIPTION

View File

@ -39,9 +39,10 @@ do
DEST_FILE="/usr/share/applications/$app.desktop" DEST_FILE="/usr/share/applications/$app.desktop"
createShortCut createShortCut
ln -s "$TARGET_DIR/$app.sh" /usr/bin/"${app,,}" if [ ! -e /usr/bin/"${app,,}" ]; then
ln -s "$TARGET_DIR/$app.sh" /usr/bin/"${app,,}"
echo "${app,,}" echo "${app,,}"
fi
done done

View File

@ -8,7 +8,8 @@ do
SRC_FILE="$TARGET_DIR/$app.sh" SRC_FILE="$TARGET_DIR/$app.sh"
rm "/usr/share/applications/$app.desktop" rm "/usr/share/applications/$app.desktop"
rm /usr/bin/"${app,,}" if [ -e /usr/bin/"${app,,}" ]; then
rm /usr/bin/"${app,,}"
echo "Remove ${app,,}" echo "Remove ${app,,}"
fi
done done

View File

@ -2,26 +2,18 @@ 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) { function generateShortCutCmd(cmd) {
var prefix = "$PREFIX";
if (systemInfo.kernelType === "winnt") { if (systemInfo.kernelType === "winnt") {
console.log("create icons!!! on Windows"); console.log("create icons!!! on Windows");
component.addOperation( component.addOperation(
"CreateShortcut", "CreateShortcut",
"@TargetDir@/" + cmd + ".bat", "@TargetDir@/" + prefix + "/" + cmd + ".bat",
"@DesktopDir@/" + extractFileName(cmd) + ".lnk", "@DesktopDir@/" + cmd + ".lnk",
"iconPath=@TargetDir@/$ICON", "iconPath=@TargetDir@/$ICON",
"iconId=0"); "iconId=0");
@ -30,16 +22,15 @@ function generateShortCutCmd(cmd) {
if (systemInfo.kernelType === "linux") { if (systemInfo.kernelType === "linux") {
console.log("create icons!!! on LINUX"); console.log("create icons!!! on LINUX");
const name = extractFileName(cmd);
component.addOperation("CreateDesktopEntry", component.addOperation("CreateDesktopEntry",
"@HomeDir@/.local/share/applications/" + name + ".desktop", "@HomeDir@/.local/share/applications/" + cmd + ".desktop",
"Version=@Version@\n "Version=@Version@\n
Type=Application\n Type=Application\n
Terminal=false\n Terminal=false\n
Exec=\"@TargetDir@/" + cmd + ".sh\"\n Exec=\"@TargetDir@/" + prefix + "/" + cmd + ".sh\"\n
Name=" + name + "\n Name=" + cmd + "\n
Icon=@TargetDir@/$ICON\n Icon=@TargetDir@/$ICON\n
Name[en_US]=" + name); Name[en_US]=" + cmd);
console.log("create icons!!! on LINUX done"); console.log("create icons!!! on LINUX done");
} }
@ -49,7 +40,7 @@ Component.prototype.createOperations = function() {
// call default implementation to actually install README.txt! // call default implementation to actually install README.txt!
component.createOperations(); component.createOperations();
const cmdArray = ["array", "of", "cmds"]; // will be changed in cqtdeployer var cmdArray = ["array", "of", "cmds"]; // will be changed in cqtdeployer
cmdArray.forEach( function (item){ cmdArray.forEach( function (item){
generateShortCutCmd(item); generateShortCutCmd(item);

View File

@ -25,7 +25,7 @@ bool Deb::deployTemplate(PackageControl &pkg) {
QHash<QString, QString> pakcagesTemplates; QHash<QString, QString> pakcagesTemplates;
if (!customTemplate.isEmpty()) { if (!customTemplate.isEmpty()) {
QuasarAppUtils::Params::log("Using custom template for installer: " + customTemplate, QuasarAppUtils::Params::log("Using custom template for debian pacakge: " + customTemplate,
QuasarAppUtils::Info); QuasarAppUtils::Info);
auto availablePacakages = QDir(customTemplate).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); auto availablePacakages = QDir(customTemplate).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
@ -57,10 +57,10 @@ bool Deb::deployTemplate(PackageControl &pkg) {
} }
if (!QFile::setPermissions(local + "/DEBIAN", static_cast<QFile::Permission>(0x7775))) { if (!QFile::setPermissions(local + "/DEBIAN", static_cast<QFile::Permission>(0x7775))) {
QuasarAppUtils::Params::log("permishens set fail", QuasarAppUtils::Warning); QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning);
} }
outFiles.push_back(info.Name + ".deb"); outFiles.push_back(DeployCore::_config->getTargetDir() + "/" + info.Name + ".deb");
packageFolders.push_back(local); packageFolders.push_back(local);
} }
@ -135,7 +135,7 @@ bool Deb::cb() const {
QString to = cfg->getTargetDir() + "/" + getLocation() + "/../"; QString to = cfg->getTargetDir() + "/" + getLocation() + "/../";
auto const outputFiles = outPutFiles(); auto const outputFiles = outPutFiles();
for (const QString& file : outputFiles) { for (const QString& file : outputFiles) {
if(!moveData(from + file, to, "")) { if(!moveData(from + PathUtils::getName(file), to, "")) {
return false; return false;
} }
} }
@ -164,9 +164,9 @@ QString Deb::releativeLocation(const DistroModule &module) const {
if (!module.prefix().isEmpty()) if (!module.prefix().isEmpty())
return module.prefix(); return module.prefix();
auto name = getName(module);
if (!module.name().isEmpty()) if (!name.isEmpty())
return module.name(); return name;
return module.key(); return module.key();
} }

View File

@ -9,6 +9,7 @@
#include "pathutils.h" #include "pathutils.h"
#include <QDate> #include <QDate>
#include <QMap> #include <QMap>
#include <QTextCodec>
#include <deployconfig.h> #include <deployconfig.h>
#include <distromodule.h> #include <distromodule.h>
#include <quasarapp.h> #include <quasarapp.h>
@ -47,8 +48,8 @@ bool iDistribution::unpackFile(const QFileInfo &resource,
QByteArray inputData = file.readAll(); QByteArray inputData = file.readAll();
file.close(); file.close();
if (!QDir().mkpath(target)) { if (!_fileManager->initDir(target)) {
QuasarAppUtils::Params::log(QString("impossible to create path : %0 ").arg(target), QuasarAppUtils::Params::log(QString("Failed to create path : %0 ").arg(target),
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
@ -56,7 +57,8 @@ bool iDistribution::unpackFile(const QFileInfo &resource,
file.setFileName(target + "/" + resource.fileName()); file.setFileName(target + "/" + resource.fileName());
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
QuasarAppUtils::Params::log(QString("impossible to write in file: %0 ").arg(file.fileName()), QuasarAppUtils::Params::log(QString("Failed to open file for writing: %0. %1").arg(file.fileName(),
file.errorString()),
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -79,6 +81,7 @@ bool iDistribution::unpackFile(const QFileInfo &resource,
} }
QTextStream stream(&file); QTextStream stream(&file);
stream.setCodec(QTextCodec::codecForName("UTF-8"));
stream << inputText; stream << inputText;
} else { } else {
file.write(inputData); file.write(inputData);
@ -202,8 +205,8 @@ bool iDistribution::collectInfo(const DistroModule& pkg,
cmdArray += ","; cmdArray += ",";
bashArray += " "; bashArray += " ";
} }
cmdArray += "\"" + releativeLocation(pkg) + "/" + fileinfo.baseName() + "\""; cmdArray += "\"" + fileinfo.baseName() + "\"";
bashArray += fileinfo.baseName(); bashArray += "\"" + fileinfo.baseName() + "\"";
} }
} }
cmdArray += "]"; cmdArray += "]";
@ -244,6 +247,10 @@ bool iDistribution::deployIcon(TemplateInfo &info, const DistroModule& pkg) {
QSet<QString> icons; QSet<QString> icons;
for (const auto& target: pkg.targets()) { for (const auto& target: pkg.targets()) {
auto icon = cfg->targets().value(target).getIcon(); auto icon = cfg->targets().value(target).getIcon();
QuasarAppUtils::Params::log(QString("%0: %1").arg(target, icon),
QuasarAppUtils::Debug);
if (icons.contains(icon)) if (icons.contains(icon))
break; break;
@ -251,7 +258,7 @@ bool iDistribution::deployIcon(TemplateInfo &info, const DistroModule& pkg) {
info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName(); info.Icon = releativeLocation(pkg) + "/icons/" + iconInfo.fileName();
if (!copyFile(icon, localData + "/icons/", false)) { if (!copyFile(icon, localData + "/icons/", false)) {
QuasarAppUtils::Params::log(QString("fail to copy icon: %0 ").arg(icon), QuasarAppUtils::Params::log(QString("Failed to copy icon: %0.").arg(icon),
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
@ -278,5 +285,3 @@ QString iDistribution::releativeLocation(const DistroModule &module) const {
} }

View File

@ -39,15 +39,13 @@ Envirement QIF::toolKitEnv() const {
result.addEnv(QProcessEnvironment::systemEnvironment().value("PATH")); result.addEnv(QProcessEnvironment::systemEnvironment().value("PATH"));
return result; return result;
} }
QString AppPath = QuasarAppUtils::Params::getCurrentExecutableDir();
result.addEnv(AppPath);
// SNAP // SNAP
QString AppPath = QuasarAppUtils::Params::getArg("appPath", "");
result.addEnv(AppPath + "/../QIF/"); result.addEnv(AppPath + "/../QIF/");
//Installer //Installer
@ -87,7 +85,7 @@ QList<SystemCommandData> QIF::runCmd() {
bool QIF::deployTemplate(PackageControl &pkg) { bool QIF::deployTemplate(PackageControl &pkg) {
if (!initDefaultConfiguratuin()) { if (!initDefaultConfiguratuin()) {
QuasarAppUtils::Params::log("Fail to init rhe default configuration of the qif installer.", QuasarAppUtils::Params::log("Failed to init the default configuration of qif installer.",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -291,4 +289,3 @@ bool QIF::initDefaultConfiguratuin() {
// init default configuration // init default configuration
return collectInfo(DistroModule{cfg->getDefaultPackage()}, generalInfo); return collectInfo(DistroModule{cfg->getDefaultPackage()}, generalInfo);
} }

View File

@ -75,13 +75,16 @@ void parseTargetPrivate(DeployConfig& conf,
auto pair = iconPair.split(DeployCore::getSeparator(1), splitbehavior); auto pair = iconPair.split(DeployCore::getSeparator(1), splitbehavior);
if (pair.size() == 1) { if (pair.size() == 1) {
QuasarAppUtils::Params::log(QString("Set new default icon for all tagets: " + pair.value(0)),
QuasarAppUtils::Debug);
for (auto& editableTarget: cointainer) { for (auto& editableTarget: cointainer) {
(editableTarget.*adder)(pair.value(0)); (editableTarget.*adder)(pair.value(0));
} }
continue; continue;
} }
auto targetsMap = conf.getTargetsListByFilter(pair.value(0)); const auto targetsMap = conf.getTargetsListByFilter(pair.value(0));
if (pair.value(0).isEmpty() || targetsMap.isEmpty()) { if (pair.value(0).isEmpty() || targetsMap.isEmpty()) {
@ -92,8 +95,12 @@ void parseTargetPrivate(DeployConfig& conf,
continue; continue;
} }
auto editableTarget = targetsMap.begin().value(); for (const auto &target: targetsMap) {
(editableTarget->*adder)(pair.value(1)); QuasarAppUtils::Params::log(QString("Set new icon for %0 taget. Icon: %1").
arg(pair.value(0), pair.value(1)),
QuasarAppUtils::Debug);
(target->*adder)(pair.value(1));
}
} }
} }
@ -104,13 +111,13 @@ bool ConfigParser::parseParams() {
QuasarAppUtils::Params::isEndable("confFile"); QuasarAppUtils::Params::isEndable("confFile");
if (path.isEmpty() && if (path.isEmpty() &&
QuasarAppUtils::Params::customParamasSize() <= 0) { QuasarAppUtils::Params::size() <= 0) {
path = DEFAULT_COFIGURATION_FILE; path = DEFAULT_COFIGURATION_FILE;
} }
if (QFile::exists(path)) { if (QFile::exists(path)) {
if (!loadFromFile(path)) { if (!loadFromFile(path)) {
QuasarAppUtils::Params::log("failed to parse " + path, QuasarAppUtils::Params::log("Failed to parse json file : " + path,
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -125,18 +132,18 @@ bool ConfigParser::parseParams() {
QuasarAppUtils::Info); QuasarAppUtils::Info);
if (!parseInfoMode()) { if (!parseInfoMode()) {
QuasarAppUtils::Params::log("show info is failed!", QuasarAppUtils::Params::log("Show info is failed!",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
break; break;
} }
case RunMode::Clear: { case RunMode::Clear: {
QuasarAppUtils::Params::log("clear ...", QuasarAppUtils::Params::log("Clear ...",
QuasarAppUtils::Info); QuasarAppUtils::Info);
if (!parseClearMode()) { if (!parseClearMode()) {
QuasarAppUtils::Params::log("clear is failed!", QuasarAppUtils::Params::log("Clear failed!",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -159,7 +166,7 @@ bool ConfigParser::parseParams() {
QuasarAppUtils::Info); QuasarAppUtils::Info);
if (!parseDeployMode()) { if (!parseDeployMode()) {
QuasarAppUtils::Params::log("deploy is failed!", QuasarAppUtils::Params::log("Deploy failed!",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -185,7 +192,7 @@ bool ConfigParser::parseParams() {
DeployCore::_config = &_config; DeployCore::_config = &_config;
if (createFile && !createFromDeploy(path)) { if (createFile && !createFromDeploy(path)) {
QuasarAppUtils::Params::log("Do not create a deploy config file in " + path, QuasarAppUtils::Params::log("Failed to create a deploy config file in " + path,
QuasarAppUtils::Error); QuasarAppUtils::Error);
} }
@ -548,7 +555,7 @@ bool ConfigParser::initPackages() {
} }
QuasarAppUtils::Params::log( QuasarAppUtils::Params::log(
"Set Default Package to " + defaultPackage, "The default package is " + defaultPackage,
QuasarAppUtils::Info); QuasarAppUtils::Info);
} }
@ -588,7 +595,7 @@ bool ConfigParser::initRunScripts() {
QFileInfo script(pair.value(1)); QFileInfo script(pair.value(1));
if (!script.isFile()) { if (!script.isFile()) {
QuasarAppUtils::Params::log(QString("The %0 is not exits.").arg(script.absoluteFilePath()), QuasarAppUtils::Params::log(QString("The %0 file does not exist.").arg(script.absoluteFilePath()),
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -617,19 +624,21 @@ bool ConfigParser::initQmlInput() {
return true; return true;
} }
void ConfigParser::packagesErrorLog(const QString &flag) { void ConfigParser::packagesErrorLog(const QString &option) {
QuasarAppUtils::Params::log(QString("Set %0 fail, because you try set %0 for not inited package." QuasarAppUtils::Params::log(QString("Failed to set the %0 option, because you are trying to set it for an uninitialized package."
" Use 'targetPackage' flag for init the packages. " " Use the 'targetPackage' flag to init this package. "
"Or if you want to configure emty package use the allowEmptyPackages option for disable this error message.").arg(flag), "Or, if you want to configure an empty package, "
"use the allowEmptyPackages option to disable this error message.").
arg(option),
QuasarAppUtils::Error); QuasarAppUtils::Error);
} }
bool ConfigParser::parseDeployMode() { bool ConfigParser::parseDeployMode() {
if (QuasarAppUtils::Params::isEndable("deploySystem-with-libc")) { if (QuasarAppUtils::Params::isEndable("deploySystem-with-libc")) {
QuasarAppUtils::Params::log("You use depcricated option \"deploySystem-with-libc\"." QuasarAppUtils::Params::log("You are using a deprecated option \"deploySystem-with-libc\"."
" In this version this option is no different from \"deploySystem\"." " In this version this option is no different from \"deploySystem\"."
" Please use the deploySystem option."); " Please use the deploySystem option.", QuasarAppUtils::Warning);
QuasarAppUtils::Params::setEnable("deploySystem", true ); QuasarAppUtils::Params::setEnable("deploySystem", true );
} }
@ -644,7 +653,7 @@ bool ConfigParser::parseDeployMode() {
if (bin.size() && !setTargets(bin)) { if (bin.size() && !setTargets(bin)) {
QuasarAppUtils::Params::log("Sets input targets is failed!", QuasarAppUtils::Params::log("Failed to set targets",
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
} }
@ -653,7 +662,7 @@ bool ConfigParser::parseDeployMode() {
if (!(_config.targets().count() || xData.count())) { if (!(_config.targets().count() || xData.count())) {
QuasarAppUtils::Params::log("The targets initialize is failed!", QuasarAppUtils::Params::log("Failed to initialize targets or extra data!",
QuasarAppUtils::Error); QuasarAppUtils::Error);
QuasarAppUtils::Params::log("Use bin or extraData optins. And check input pathes.", QuasarAppUtils::Params::log("Use bin or extraData optins. And check input pathes.",
@ -668,7 +677,8 @@ bool ConfigParser::parseDeployMode() {
_config.depchLimit = QuasarAppUtils::Params::getArg("recursiveDepth").toInt(&ok); _config.depchLimit = QuasarAppUtils::Params::getArg("recursiveDepth").toInt(&ok);
if (!ok) { if (!ok) {
_config.depchLimit = 0; _config.depchLimit = 0;
QuasarAppUtils::Params::log("recursiveDepth is invalid! use default value 0", QuasarAppUtils::Params::log("Failed to set the recursive depth. The argument of the recursiveDepth option is invalid!"
" Using the default value 0",
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
} }
} }
@ -693,11 +703,12 @@ bool ConfigParser::parseDeployMode() {
if (DeployCore::isSnap()) { if (DeployCore::isSnap()) {
QuasarAppUtils::Params::log("If you are using qmake from the system repository," QuasarAppUtils::Params::log("If you are using qmake from the system repository,"
" then you should use the classic version of the CQtDeployer instead of the snap version." " 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" " 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. " " to system utilities and the environment. "
"For get the classic version of cqtdeployer use the cqtdeployer installer " "For get the classic version of cqtdeployer use the cqtdeployer installer "
"https://github.com/QuasarApp/CQtDeployer/releases"); "https://github.com/QuasarApp/CQtDeployer/releases", QuasarAppUtils::Info);
} }
return false; return false;
@ -787,7 +798,8 @@ void ConfigParser::setTargetDir(const QString &target) {
} else { } else {
_config.setTargetDir(QFileInfo("./" + DISTRO_DIR).absoluteFilePath()); _config.setTargetDir(QFileInfo("./" + DISTRO_DIR).absoluteFilePath());
QuasarAppUtils::Params::log("flag targetDir not used. use default target dir :" + _config.getTargetDir(), QuasarAppUtils::Params::log("The targetDir option is not used."
" CQtDeployer will use default target dir :" + _config.getTargetDir(),
QuasarAppUtils::Info); QuasarAppUtils::Info);
} }
} }
@ -813,14 +825,14 @@ bool ConfigParser::setTargets(const QStringList &value) {
} }
else if (targetInfo.isDir()) { else if (targetInfo.isDir()) {
if (!setTargetsInDir(targetInfo.absoluteFilePath())) { if (!setTargetsInDir(targetInfo.absoluteFilePath())) {
QuasarAppUtils::Params::log(i + " du not contains executable binaries!", QuasarAppUtils::Params::log(i + " does not contain executable binaries!",
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
continue; continue;
} }
isfillList = true; isfillList = true;
} else { } else {
QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " not exits!", QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " does not exist!",
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
} }
} }
@ -849,7 +861,7 @@ QFileInfo ConfigParser::getBinInfo(const QString &bin) {
bool ConfigParser::setTargetsRecursive(const QString &dir) { bool ConfigParser::setTargetsRecursive(const QString &dir) {
if (!setTargetsInDir(dir, true)) { if (!setTargetsInDir(dir, true)) {
QuasarAppUtils::Params::log("setTargetsInDir failed!", QuasarAppUtils::Params::log("setTargetsInDir failed!",
QuasarAppUtils::Warning); QuasarAppUtils::Debug);
return false; return false;
} }
@ -1064,16 +1076,17 @@ bool ConfigParser::initQmakePrivate(const QString &qmake) {
QDir dir(basePath); QDir dir(basePath);
if (!dir.cdUp()) { if (!dir.cdUp()) {
QuasarAppUtils::Params::log("fail init qmake", QuasarAppUtils::Params::log("Failed to initialize qt directories by qmake.",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
QuasarAppUtils::Params::log("exec qmake fail!, try init qtDir from path:" + dir.absolutePath(), QuasarAppUtils::Params::log("Failed to execute the qmake process!"
" Trying to initialize Qt directories from path: " + dir.absolutePath(),
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
if (!setQtDir(dir.absolutePath())){ if (!setQtDir(dir.absolutePath())){
QuasarAppUtils::Params::log("fail init qmake", QuasarAppUtils::Params::log("Failed to initialize Qt directories",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -1087,8 +1100,8 @@ bool ConfigParser::initQmake() {
if (!_config.isNeededQt()) { if (!_config.isNeededQt()) {
QuasarAppUtils::Params::log("deploy only C/C++ libraryes because a qmake is not needed" QuasarAppUtils::Params::log("Deploy only C/C++ libraries because"
" for the distribution", " all target applications do not depend on the Qt libraries",
QuasarAppUtils::Info); QuasarAppUtils::Info);
return true; return true;
} }
@ -1107,8 +1120,9 @@ bool ConfigParser::initQmake() {
auto env = QProcessEnvironment::systemEnvironment(); auto env = QProcessEnvironment::systemEnvironment();
auto proc = DeployCore::findProcess(env.value("PATH"), "qmake"); auto proc = DeployCore::findProcess(env.value("PATH"), "qmake");
if (proc.isEmpty()) { if (proc.isEmpty()) {
QuasarAppUtils::Params::log("The deployment target requires Qt libs, but init qmake is failed." QuasarAppUtils::Params::log("The deployment target requires Qt libraries,"
"Use the qmake option for set a path to qmake.", " but initialize of Qt directories is failed."
" Please use the qmake option to set a path to the qmake executable.",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -1116,8 +1130,10 @@ bool ConfigParser::initQmake() {
return initQmakePrivate(proc); return initQmakePrivate(proc);
} }
QuasarAppUtils::Params::log("You Application requires Qt libs but qmake cannot be found in option 'qmake' or PATH." QuasarAppUtils::Params::log("Your distribution required Qt libraries "
"You use option noCheckPATH. Disable the option noCheckPATH from your deploy command for search qmake from PATH", "but qmake executable cannot be found in the 'qmake' option or RPATH. "
"You are using the option noCheckPATH, "
"please remove this option from your deploy command to search qmake in PATH",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
@ -1125,8 +1141,9 @@ bool ConfigParser::initQmake() {
} }
if (qtList.size() > 1) { if (qtList.size() > 1) {
QuasarAppUtils::Params::log("Your deployment targets were compiled by different qmake," QuasarAppUtils::Params::log("Your deployment targets were compiled by different qmakes, "
"qt auto-capture is not possible. Use the -qmake flag to solve this problem.", "auto-capture of the Qt libraries is not possible. "
"Please use the -qmake flag to solve this problem.",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -1207,32 +1224,32 @@ bool ConfigParser::setQtDir(const QString &value) {
QFileInfo info(value); QFileInfo info(value);
if (!QFile::exists(info.absoluteFilePath() + ("/bin"))) { if (!QFile::exists(info.absoluteFilePath() + ("/bin"))) {
QuasarAppUtils::Params::log("get qt bin fail!"); QuasarAppUtils::Params::log("get qt bin failed!", QuasarAppUtils::Debug);
return false; return false;
} }
_config.qtDir.setBins(info.absoluteFilePath() + ("/bin")); _config.qtDir.setBins(info.absoluteFilePath() + ("/bin"));
if (!QFile::exists(info.absoluteFilePath() + ("/lib"))) { if (!QFile::exists(info.absoluteFilePath() + ("/lib"))) {
QuasarAppUtils::Params::log("get qt lib fail!"); QuasarAppUtils::Params::log("get qt lib failed!", QuasarAppUtils::Debug);
return false; return false;
} }
_config.qtDir.setLibs(info.absoluteFilePath() + ("/lib")); _config.qtDir.setLibs(info.absoluteFilePath() + ("/lib"));
if (!QFile::exists(info.absoluteFilePath() + ("/qml"))) { if (!QFile::exists(info.absoluteFilePath() + ("/qml"))) {
QuasarAppUtils::Params::log("get qt qml fail!"); QuasarAppUtils::Params::log("get qt qml failed!", QuasarAppUtils::Debug);
} else { } else {
_config.qtDir.setQmls(info.absoluteFilePath() + ("/qml")); _config.qtDir.setQmls(info.absoluteFilePath() + ("/qml"));
} }
if (!QFile::exists(info.absoluteFilePath() + ("/plugins"))) { if (!QFile::exists(info.absoluteFilePath() + ("/plugins"))) {
QuasarAppUtils::Params::log("get qt plugins fail!"); QuasarAppUtils::Params::log("get qt plugins failed!", QuasarAppUtils::Debug);
} else { } else {
_config.qtDir.setPlugins(info.absoluteFilePath() + ("/plugins")); _config.qtDir.setPlugins(info.absoluteFilePath() + ("/plugins"));
} }
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
if (!QFile::exists(info.absoluteFilePath() + ("/libexec"))) { if (!QFile::exists(info.absoluteFilePath() + ("/libexec"))) {
QuasarAppUtils::Params::log("get qt libexec fail!"); QuasarAppUtils::Params::log("get qt libexec failed!", QuasarAppUtils::Debug);
} else { } else {
_config.qtDir.setLibexecs(info.absoluteFilePath() + ("/libexec")); _config.qtDir.setLibexecs(info.absoluteFilePath() + ("/libexec"));
} }
@ -1242,13 +1259,13 @@ bool ConfigParser::setQtDir(const QString &value) {
#endif #endif
if (!QFile::exists(info.absoluteFilePath() + ("/translations"))) { if (!QFile::exists(info.absoluteFilePath() + ("/translations"))) {
QuasarAppUtils::Params::log("get qt translations fail!"); QuasarAppUtils::Params::log("get qt translations failed!", QuasarAppUtils::Debug);
} else { } else {
_config.qtDir.setTranslations(info.absoluteFilePath() + ("/translations")); _config.qtDir.setTranslations(info.absoluteFilePath() + ("/translations"));
} }
if (!QFile::exists(info.absoluteFilePath() + ("/resources"))) { if (!QFile::exists(info.absoluteFilePath() + ("/resources"))) {
QuasarAppUtils::Params::log("get qt resources fail!"); QuasarAppUtils::Params::log("get qt resources failed!", QuasarAppUtils::Debug);
} else { } else {
_config.qtDir.setResources(info.absoluteFilePath() + ("/resources")); _config.qtDir.setResources(info.absoluteFilePath() + ("/resources"));
} }
@ -1278,8 +1295,8 @@ void ConfigParser::initExtraPath() {
QFileInfo info(DeployCore::transportPathToSnapRoot(i)); QFileInfo info(DeployCore::transportPathToSnapRoot(i));
if (info.isDir()) { if (info.isDir()) {
if (_config.targets().contains(info.absoluteFilePath())) { if (_config.targets().contains(info.absoluteFilePath())) {
QuasarAppUtils::Params::log("skip the extra lib path because it is target!", QuasarAppUtils::Params::log("Skip the extra library path because it is target!",
QuasarAppUtils::Info); QuasarAppUtils::Debug);
continue; continue;
} }
@ -1292,12 +1309,12 @@ void ConfigParser::initExtraPath() {
_config.extraPaths.addExtraPathsMasks({i}); _config.extraPaths.addExtraPathsMasks({i});
QuasarAppUtils::Params::log(i + " added like a path mask", QuasarAppUtils::Params::log(i + " is added as a path mask",
QuasarAppUtils::Info); QuasarAppUtils::Debug);
} else { } else {
QuasarAppUtils::Params::log(i + " not added in path mask because" QuasarAppUtils::Params::log(i + " not added in path mask because"
" the path mask must be large 2 characters", " the path mask must be large 2 characters",
QuasarAppUtils::Warning); QuasarAppUtils::Debug);
} }
} }
} }
@ -1309,12 +1326,12 @@ void ConfigParser::initExtraNames() {
if (i.size() > 1) { if (i.size() > 1) {
_config.allowedPaths.addtExtraNamesMasks({i}); _config.allowedPaths.addtExtraNamesMasks({i});
QuasarAppUtils::Params::log(i + " added like a file name mask", QuasarAppUtils::Params::log(i + " is added as a filename mask",
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
} else { } else {
QuasarAppUtils::Params::log(i + " not added in file mask because" QuasarAppUtils::Params::log(i + " not added in file mask because"
" the file mask must be large 2 characters", " the file mask must be large 2 characters",
QuasarAppUtils::Warning); QuasarAppUtils::Debug);
} }
} }
}; };
@ -1439,7 +1456,7 @@ void ConfigParser::initEnvirement() {
_config.envirement.addEnv(dirs); _config.envirement.addEnv(dirs);
if (_config.envirement.size() < 2) { if (_config.envirement.size() < 2) {
QuasarAppUtils::Params::log("system environment is empty", QuasarAppUtils::Params::log("System environment is empty",
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
} }
} }
@ -1457,7 +1474,7 @@ bool ConfigParser::checkSnapPermisions() {
QuasarAppUtils::Params::log("You use a deploySystem or extraLibs options," QuasarAppUtils::Params::log("You use a deploySystem or extraLibs options,"
" but not added permision system-backup for cqtdeployer." " but not added permision system-backup for cqtdeployer."
" Please add permision system-backup befor usong cqtdeployer." " Please add permissions system-backup before using cqtdeployer."
" Add system-backup permision from console: ", " Add system-backup permision from console: ",
QuasarAppUtils::Error); QuasarAppUtils::Error);
@ -1503,6 +1520,9 @@ bool ConfigParser::smartMoveTargets() {
QMultiHash<QString, TargetInfo> temp; QMultiHash<QString, TargetInfo> temp;
bool result = true; bool result = true;
QuasarAppUtils::Params::log(QString("Available Targets: "),
QuasarAppUtils::Debug);
for (auto i = _config.targets().cbegin(); i != _config.targets().cend(); ++i) { for (auto i = _config.targets().cbegin(); i != _config.targets().cend(); ++i) {
if (!i.value().isValid()) { if (!i.value().isValid()) {
@ -1521,10 +1541,27 @@ bool ConfigParser::smartMoveTargets() {
} }
auto newTargetKey = targetPath + "/" + target.fileName(); auto newTargetKey = targetPath + "/" + target.fileName();
temp.unite(moveTarget(i.value(), newTargetKey));
const auto newTarget = moveTarget(i.value(), newTargetKey);
temp.unite(newTarget);
QuasarAppUtils::Params::log(QString("Target: " + newTarget.begin().key()),
QuasarAppUtils::Debug);
auto pkgKey = i.value().getPackage(); auto pkgKey = i.value().getPackage();
valueLink(_config.packagesEdit(), pkgKey, DistroModule{pkgKey}).addTarget(newTargetKey); if (!_config.packagesEdit().contains(pkgKey)) {
QuasarAppUtils::Params::log(QString("The target %0 belongs to package %1"
" but this package is not initialized!").
arg(i.key(), pkgKey));
internalError();
return false;
}
valueLink(_config.packagesEdit(), pkgKey,
DistroModule{pkgKey}).addTarget(newTargetKey);
} }
_config.targetsEdit() = temp; _config.targetsEdit() = temp;
@ -1545,15 +1582,10 @@ ConfigParser::ConfigParser(FileManager *filemanager, PluginsParser *pluginsParse
assert(_scaner); assert(_scaner);
assert(_packing); assert(_packing);
#ifdef Q_OS_LINUX _config.appDir = QuasarAppUtils::Params::getCurrentExecutableDir();
_config.appDir = QuasarAppUtils::Params::getArg("appPath");
if (_config.appDir.right(4) == "/bin") { if (_config.appDir.right(4) == "/bin") {
_config.appDir = _config.appDir.left(_config.appDir.size() - 4); _config.appDir = _config.appDir.left(_config.appDir.size() - 4);
} }
#else
_config.appDir = QuasarAppUtils::Params::getArg("appPath");
#endif
QuasarAppUtils::Params::log("appDir = " + _config.appDir); QuasarAppUtils::Params::log("appDir = " + _config.appDir);
} }

View File

@ -80,7 +80,7 @@ private:
bool initQmake(); bool initQmake();
bool initQmlInput(); bool initQmlInput();
void packagesErrorLog(const QString &flag); void packagesErrorLog(const QString &option);
bool setQmake(const QString &value); bool setQmake(const QString &value);
bool setQtDir(const QString &value); bool setQtDir(const QString &value);

View File

@ -66,7 +66,7 @@ QMultiMap<LibPriority, LibInfo> DependenciesScanner::getLibsFromEnvirement(
if (!fillLibInfo(info, lib)) { if (!fillLibInfo(info, lib)) {
QuasarAppUtils::Params::log( QuasarAppUtils::Params::log(
"error extract lib info from " + lib + "(" + libName + ")", "Failed to extract lib info from " + lib + "(" + libName + ")",
QuasarAppUtils::VerboseLvl::Warning); QuasarAppUtils::VerboseLvl::Warning);
continue; continue;
} }
@ -101,14 +101,14 @@ bool DependenciesScanner::fillLibInfo(LibInfo &info, const QString &file) const
} }
void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QString>& libStack) { void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QString>& libStack) {
QuasarAppUtils::Params::log("get recursive dependencies of " + lib.fullPath(), QuasarAppUtils::Params::log("Get the recursive dependencies of " + lib.fullPath(),
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
if (_scanedLibs.contains(lib.fullPath())) { if (_scanedLibs.contains(lib.fullPath())) {
auto scanedLib = _scanedLibs.value(lib.fullPath()); auto scanedLib = _scanedLibs.value(lib.fullPath());
if (!scanedLib.isValid()) { if (!scanedLib.isValid()) {
QuasarAppUtils::Params::log( "no valid lib in scanned libs list!", QuasarAppUtils::Params::log( "Detected an invalid library in scanned library cache!!",
QuasarAppUtils::Error); QuasarAppUtils::Error);
return; return;
} }
@ -120,7 +120,7 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS
if (libStack.contains(lib.fullPath())) { if (libStack.contains(lib.fullPath())) {
QuasarAppUtils::Params::log("A recursive dependency was found in library " + lib.fullPath(), QuasarAppUtils::Params::log("A recursive dependency was found in library " + lib.fullPath(),
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
return; return;
} }
@ -131,8 +131,8 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS
auto libs = getLibsFromEnvirement(i); auto libs = getLibsFromEnvirement(i);
if (!libs.size()) { if (!libs.size()) {
QuasarAppUtils::Params::log("lib for dependency " + i + " not found!!", QuasarAppUtils::Params::log("Cannot find the library for dependency " + i,
QuasarAppUtils::Warning); QuasarAppUtils::Debug);
continue; continue;
} }

View File

@ -105,11 +105,11 @@ DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
void DeployCore::addQtModule(DeployCore::QtModule &module, const QString &path) { void DeployCore::addQtModule(DeployCore::QtModule &module, const QString &path) {
QuasarAppUtils::Params::log("current module " + QString::number(module), QuasarAppUtils::Params::log("Current module " + QString::number(module),
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
auto mod = getQtModule(path); auto mod = getQtModule(path);
QuasarAppUtils::Params::log("add new module from path " + path + QuasarAppUtils::Params::log("Add new module from path " + path +
" module value " + QString::number(mod), " module value " + QString::number(mod),
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
@ -226,6 +226,7 @@ void DeployCore::help() {
" All templates extract into targetDirectory." " All templates extract into targetDirectory."
" For change target directory use the targetDir option." " For change target directory use the targetDir option."
" Example: cqtdeployer -bin myExecutable getDefaultTemplate qif deb."}, " Example: cqtdeployer -bin myExecutable getDefaultTemplate qif deb."},
{"noHashSum", "This option disable computation of a packages hash sum"}
} }
@ -327,9 +328,9 @@ void DeployCore::help() {
} }
}; };
help.unite(QuasarAppUtils::Params::getparamsHelp()); help.unite(QuasarAppUtils::Params::getParamsHelp());
QuasarAppUtils::Params::showHelp(help); QuasarAppUtils::Help::print(help);
return; return;
} }
@ -491,19 +492,19 @@ MSVCVersion DeployCore::getMSVC(const QString &_qtBin) {
QDir dir = QFileInfo(_qtBin).absoluteFilePath(); QDir dir = QFileInfo(_qtBin).absoluteFilePath();
if (!dir.cdUp()) { if (!dir.cdUp()) {
QuasarAppUtils::Params::log("is not standart qt repo"); QuasarAppUtils::Params::log("is not a standard qt repo", QuasarAppUtils::Debug);
return static_cast<MSVCVersion>(res); return static_cast<MSVCVersion>(res);
} }
auto msvcPath = dir.absolutePath(); auto msvcPath = dir.absolutePath();
if (!(dir.cdUp() && dir.cdUp())) { if (!(dir.cdUp() && dir.cdUp())) {
QuasarAppUtils::Params::log("is not standart qt repo"); QuasarAppUtils::Params::log("is not a standard qt repo", QuasarAppUtils::Debug);
return static_cast<MSVCVersion>(res); return static_cast<MSVCVersion>(res);
} }
if (!msvcPath.contains("msvc")) { if (!msvcPath.contains("msvc")) {
QuasarAppUtils::Params::log("vcredis not defined"); QuasarAppUtils::Params::log("vcredist not defined", QuasarAppUtils::Debug);
return static_cast<MSVCVersion>(res); return static_cast<MSVCVersion>(res);
} }
@ -540,7 +541,7 @@ QString DeployCore::getVCredist(const QString &_qtbinDir) {
QDir dir = _qtbinDir; QDir dir = _qtbinDir;
if (!(dir.cdUp() && dir.cdUp() && dir.cdUp() && dir.cd("vcredist"))) { if (!(dir.cdUp() && dir.cdUp() && dir.cdUp() && dir.cd("vcredist"))) {
QuasarAppUtils::Params::log("redist not found!"); QuasarAppUtils::Params::log("vcredist not found!");
return ""; return "";
} }

View File

@ -70,12 +70,14 @@ void Envirement::addEnv(const QStringList &listDirs) {
} }
if (!QFileInfo(path).isDir()) { if (!QFileInfo(path).isDir()) {
QuasarAppUtils::Params::log("is not dir!! :" + path); QuasarAppUtils::Params::log(QString("%0 is not a directory!! ").arg(path),
QuasarAppUtils::Debug);
continue; continue;
} }
if (_dataEnvironment.contains(path)) { if (_dataEnvironment.contains(path)) {
QuasarAppUtils::Params::log ("Environment alredy added: " + path); QuasarAppUtils::Params::log (QString("Path %0 is already added").arg(path),
QuasarAppUtils::Debug);
continue; continue;
} }

View File

@ -27,8 +27,7 @@
#include <fstream> #include <fstream>
bool Extracter::deployMSVC() { bool Extracter::deployMSVC() {
QuasarAppUtils::Params::log("try deploy msvc", QuasarAppUtils::Params::log("Trying to deploy msvc", QuasarAppUtils::Debug);
QuasarAppUtils::Info);
auto msvcInstaller = DeployCore::getVCredist(DeployCore::_config->qtDir.getBins()); auto msvcInstaller = DeployCore::getVCredist(DeployCore::_config->qtDir.getBins());
if (msvcInstaller.isEmpty()) { if (msvcInstaller.isEmpty()) {
@ -146,7 +145,7 @@ void Extracter::copyExtraPlugins(const QString& package) {
if (!_fileManager->copyFile(info.absoluteFilePath(), if (!_fileManager->copyFile(info.absoluteFilePath(),
targetPath + distro.getPluginsOutDir())) { targetPath + distro.getPluginsOutDir())) {
QuasarAppUtils::Params::log("fail to copy extra plugin from:" + info.absoluteFilePath() + QuasarAppUtils::Params::log("Failed to copy extra plugin from:" + info.absoluteFilePath() +
" to: " + targetPath + distro.getPluginsOutDir(), " to: " + targetPath + distro.getPluginsOutDir(),
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
} }
@ -162,7 +161,7 @@ void Extracter::copyExtraPlugins(const QString& package) {
DeployCore::debugExtensions(), DeployCore::debugExtensions(),
&plugins)) { &plugins)) {
QuasarAppUtils::Params::log("fail to copy extra plugin from:" + info.absoluteFilePath() + QuasarAppUtils::Params::log("Failed to copy extra plugin from:" + info.absoluteFilePath() +
" to: " + targetPath + distro.getPluginsOutDir(), " to: " + targetPath + distro.getPluginsOutDir(),
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
} }
@ -211,9 +210,7 @@ void Extracter::copyLibs(const QSet<QString> &files, const QString& package, boo
} }
for (const auto &file : files) { for (const auto &file : files) {
if (!_fileManager->smartCopyFile(file, libOutpath)) { _fileManager->smartCopyFile(file, libOutpath);
QuasarAppUtils::Params::log(file + " not copied");
}
} }
} }
@ -225,7 +222,7 @@ void Extracter::copyExtraData(const QSet<QString> &files, const QString &package
for (const auto &file : files) { for (const auto &file : files) {
if (!_fileManager->cp(file, targetPath + distro.getExtraDataOutDir())) { if (!_fileManager->cp(file, targetPath + distro.getExtraDataOutDir())) {
QuasarAppUtils::Params::log(file + " not copied"); QuasarAppUtils::Params::log("Failed to copy " + file);
} }
} }
} }
@ -243,7 +240,7 @@ void Extracter::copyFiles() {
if (!QuasarAppUtils::Params::isEndable("noStrip") && !_fileManager->strip(cnf->getTargetDir())) { if (!QuasarAppUtils::Params::isEndable("noStrip") && !_fileManager->strip(cnf->getTargetDir())) {
QuasarAppUtils::Params::log("strip failed!"); QuasarAppUtils::Params::log("Failed to strip libraries!");
} }
copyExtraData(_packageDependencyes[i.key()].extraData(), i.key()); copyExtraData(_packageDependencyes[i.key()].extraData(), i.key());
@ -276,7 +273,7 @@ bool Extracter::copyTr() {
bool Extracter::deploy() { bool Extracter::deploy() {
QuasarAppUtils::Params::log("target deploy started!!", QuasarAppUtils::Params::log("target deploy started!!",
QuasarAppUtils::Info); QuasarAppUtils::Debug);
if (!_cqt->smartMoveTargets()) { if (!_cqt->smartMoveTargets()) {
QuasarAppUtils::Params::log("Fail to copy targets", QuasarAppUtils::Error); QuasarAppUtils::Params::log("Fail to copy targets", QuasarAppUtils::Error);
return false; return false;
@ -287,7 +284,7 @@ bool Extracter::deploy() {
extractExtraDataTargets(); extractExtraDataTargets();
if (DeployCore::_config->deployQml && !extractQml()) { if (DeployCore::_config->deployQml && !extractQml()) {
QuasarAppUtils::Params::log("qml not extacted!", QuasarAppUtils::Params::log("Failed to extract qml!",
QuasarAppUtils::Error); QuasarAppUtils::Error);
} }
@ -307,7 +304,7 @@ bool Extracter::deploy() {
} }
if (!deployMSVC()) { if (!deployMSVC()) {
QuasarAppUtils::Params::log("deploy msvc failed", QuasarAppUtils::Warning); QuasarAppUtils::Params::log("Failed to deploy msvc", QuasarAppUtils::Debug);
} }
_metaFileManager->createRunMetaFiles(_targetModules); _metaFileManager->createRunMetaFiles(_targetModules);
@ -428,14 +425,14 @@ bool Extracter::extractQml() {
QFileInfo info(qmlInput); QFileInfo info(qmlInput);
if (!info.isDir()) { if (!info.isDir()) {
QuasarAppUtils::Params::log("extract qml fail! qml source dir not exits or is not dir " + qmlInput, QuasarAppUtils::Params::log("Failed to extract qml! The qml source dir does not exist :" + qmlInput,
QuasarAppUtils::Error); QuasarAppUtils::Error);
continue; continue;
} }
QuasarAppUtils::Params::log("extractQmlFromSource " + info.absoluteFilePath()); QuasarAppUtils::Params::log("extractQmlFromSource " + info.absoluteFilePath());
if (!QFileInfo::exists(cnf->qtDir.getQmls())) { if (!QFileInfo::exists(cnf->qtDir.getQmls())) {
QuasarAppUtils::Params::log("qml dir wrong!", QuasarAppUtils::Params::log("Failed to extract qml! The qt qml dir is not initialized!",
QuasarAppUtils::Warning); QuasarAppUtils::Warning);
continue; continue;
} }
@ -443,7 +440,7 @@ bool Extracter::extractQml() {
QML ownQmlScaner(cnf->qtDir.getQmls(), cnf->isNeededQt(i.key())); QML ownQmlScaner(cnf->qtDir.getQmls(), cnf->isNeededQt(i.key()));
if (!ownQmlScaner.scan(plugins, info.absoluteFilePath())) { if (!ownQmlScaner.scan(plugins, info.absoluteFilePath())) {
QuasarAppUtils::Params::log("qml scaner run failed!", QuasarAppUtils::Params::log("Failed to run qml scanner",
QuasarAppUtils::Error); QuasarAppUtils::Error);
continue; continue;
} }
@ -504,4 +501,3 @@ Extracter::Extracter(FileManager *fileManager, PluginsParser *pluginsParser, Con
_metaFileManager = new MetaFileManager(_fileManager); _metaFileManager = new MetaFileManager(_fileManager);
} }

View File

@ -13,6 +13,7 @@
#include "configparser.h" #include "configparser.h"
#include "deploycore.h" #include "deploycore.h"
#include <QProcess> #include <QProcess>
#include <QStack>
#include <fstream> #include <fstream>
#include "pathutils.h" #include "pathutils.h"
@ -25,11 +26,37 @@ FileManager::FileManager() {
bool FileManager::initDir(const QString &path) { bool FileManager::initDir(const QString &path) {
if (!QFileInfo::exists(path)) { QString workPath = path;
if (!QDir().mkpath(path)) {
if (!QFileInfo::exists(workPath)) {
QStack<QString> toInitDirs;
while (!QFile::exists(workPath)) {
QString dirName = PathUtils::popItem(workPath);
toInitDirs.push(dirName);
};
if (toInitDirs.isEmpty())
return false; return false;
QDir dir(workPath);
while (toInitDirs.size()) {
QString dirName = toInitDirs.pop();
if (!dir.mkdir(dirName)) {
return false;
}
if (!dir.cd(dirName)) {
return false;
}
if (!addToDeployed(dir.absolutePath())) {
return false;
}
} }
addToDeployed(path);
} }
return true; return true;
@ -45,7 +72,7 @@ QStringList FileManager::getDeployedFilesStringList() const {
} }
void FileManager::loadDeployemendFiles(const QString &targetDir) { void FileManager::loadDeployemendFiles(const QString &targetDir) {
auto settings = QuasarAppUtils::Settings::get(); auto settings = QuasarAppUtils::Settings::instance();
if (targetDir.isEmpty()) if (targetDir.isEmpty())
return; return;
@ -65,7 +92,7 @@ bool FileManager::addToDeployed(const QString& path) {
if (info.exists()) { if (info.exists()) {
_deployedFiles += info.absoluteFilePath(); _deployedFiles += info.absoluteFilePath();
if (!QFile::setPermissions(path, static_cast<QFile::Permission>(0x7775))) { if (!QFile::setPermissions(path, static_cast<QFile::Permission>(0x7775))) {
QuasarAppUtils::Params::log("permishens set fail", QuasarAppUtils::Warning); QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning);
} }
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -75,7 +102,7 @@ bool FileManager::addToDeployed(const QString& path) {
DWORD attribute = GetFileAttributesA(stdString.c_str()); DWORD attribute = GetFileAttributesA(stdString.c_str());
if (!SetFileAttributesA(stdString.c_str(), attribute & static_cast<DWORD>(~FILE_ATTRIBUTE_HIDDEN))) { if (!SetFileAttributesA(stdString.c_str(), attribute & static_cast<DWORD>(~FILE_ATTRIBUTE_HIDDEN))) {
QuasarAppUtils::Params::log("attribute set fail", QuasarAppUtils::Warning); QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning);
} }
} }
#endif #endif
@ -90,7 +117,7 @@ void FileManager::removeFromDeployed(const QString &path) {
} }
void FileManager::saveDeploymendFiles(const QString& targetDir) { void FileManager::saveDeploymendFiles(const QString& targetDir) {
auto settings = QuasarAppUtils::Settings::get(); auto settings = QuasarAppUtils::Settings::instance();
settings->setValue(targetDir, getDeployedFilesStringList()); settings->setValue(targetDir, getDeployedFilesStringList());
} }
@ -103,7 +130,7 @@ bool FileManager::strip(const QString &dir) const {
QFileInfo info(dir); QFileInfo info(dir);
if (!info.exists()) { if (!info.exists()) {
QuasarAppUtils::Params::log("dir not exits!"); QuasarAppUtils::Params::log(QString("Directory %0 does not exist!").arg(dir));
return false; return false;
} }
@ -155,8 +182,10 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
} }
} }
QString operation = (isMove)? "move :": "copy";
if (!copy) { if (!copy) {
QuasarAppUtils::Params::log(((isMove)? "skip move :": "skip copy (by mask):" + file )); QuasarAppUtils::Params::log("Skip " + operation + " (by mask) :" + file );
return true; return true;
} }
@ -183,10 +212,10 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
} }
if (isMove) { if (isMove) {
QuasarAppUtils::Params::log( "move :" + file, QuasarAppUtils::Params::log(operation + " :" + file,
QuasarAppUtils::Debug); QuasarAppUtils::Debug);
} else { } else {
QuasarAppUtils::Params::log("copy :" + file, QuasarAppUtils::Params::log(operation + " :" + file,
QuasarAppUtils::Info); QuasarAppUtils::Info);
} }
@ -194,7 +223,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
QFile sourceFile(file); QFile sourceFile(file);
auto sourceFileAbsalutePath = QFileInfo(file).absoluteFilePath(); auto sourceFileAbsalutePath = QFileInfo(file).absoluteFilePath();
bool tarExits = QFileInfo(tergetFile).exists(); bool tarExits = QFileInfo::exists(tergetFile);
if (tarExits && !QuasarAppUtils::Params::isEndable("noOverwrite")) { if (tarExits && !QuasarAppUtils::Params::isEndable("noOverwrite")) {
QuasarAppUtils::Params::log(tergetFile + " already exists!", QuasarAppUtils::Params::log(tergetFile + " already exists!",
QuasarAppUtils::Info); QuasarAppUtils::Info);
@ -205,7 +234,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
sourceFile.rename(tergetFile): sourceFile.rename(tergetFile):
sourceFile.copy(tergetFile))) { sourceFile.copy(tergetFile))) {
QuasarAppUtils::Params::log("Operation fail " + file + " >> " + tergetFile, QuasarAppUtils::Params::log("Failed to " + operation + " from " + file + " to " + tergetFile,
QuasarAppUtils::Error); QuasarAppUtils::Error);
QuasarAppUtils::Params::log(sourceFile.errorString(), QuasarAppUtils::Params::log(sourceFile.errorString(),
@ -233,17 +262,17 @@ bool FileManager::smartCopyFile(const QString &file,
if (file.contains(config->getTargetDir(), ONLY_WIN_CASE_INSENSIATIVE)) { if (file.contains(config->getTargetDir(), ONLY_WIN_CASE_INSENSIATIVE)) {
if (!moveFile(file, target, mask)) { if (!moveFile(file, target, mask)) {
QuasarAppUtils::Params::log(" file not moved! try copy"); QuasarAppUtils::Params::log("Failed to move the file. Trying to copy it");
if (!copyFile(file, target, mask, ifFileTarget)) { if (!copyFile(file, target, mask, ifFileTarget)) {
QuasarAppUtils::Params::log("not copy target to bin dir " + file, QuasarAppUtils::Params::log("Failed to copy the target file " + file,
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
} }
} else { } else {
if (!copyFile(file, target, mask, ifFileTarget)) { if (!copyFile(file, target, mask, ifFileTarget)) {
QuasarAppUtils::Params::log("not copy target to bin dir " + file, QuasarAppUtils::Params::log("Failed to copy the target file " + file,
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
} }
@ -333,19 +362,10 @@ bool FileManager::cp(const QString &from,
return false; return false;
if (info.isDir()) { if (info.isDir()) {
// This is qt bug, filename return emptu value if dir have the seporator on the end of path. return copyFolder(from, to + "/" + PathUtils::getName(info.absoluteFilePath()),
// Qt 5.15.2
auto last = from.right(1);
if (last == "/" || last == "\\") {
last = from.mid(0, from.size() -1 );
info.setFile(last);
}
return copyFolder(from, to + "/" + info.fileName(),
filter, listOfCopiedItems, mask, force); filter, listOfCopiedItems, mask, force);
} }
return copyFile(from, to, mask); return copyFile(from, to, mask);
} }
@ -392,10 +412,10 @@ bool FileManager::moveFolder(const QString &from, const QString &to, const QStri
} }
void FileManager::clear(const QString& targetDir, bool force) { void FileManager::clear(const QString& targetDir, bool force) {
QuasarAppUtils::Params::log( "clear start!", QuasarAppUtils::Params::log( "Clear start!",
QuasarAppUtils::Info); QuasarAppUtils::Info);
if (force) { if (force) {
QuasarAppUtils::Params::log("clear force! " + targetDir, QuasarAppUtils::Params::log("Force clear " + targetDir,
QuasarAppUtils::Info); QuasarAppUtils::Info);
if (QDir(targetDir).removeRecursively()) { if (QDir(targetDir).removeRecursively()) {
return; return;
@ -406,7 +426,7 @@ void FileManager::clear(const QString& targetDir, bool force) {
} }
QMultiMap<int, QFileInfo> sortedOldData; QMultiMap<int, QFileInfo> sortedOldData;
for (auto& i : _deployedFiles) { for (const auto& i : qAsConst(_deployedFiles)) {
sortedOldData.insert(i.size(), QFileInfo(i)); sortedOldData.insert(i.size(), QFileInfo(i));
} }
@ -496,7 +516,7 @@ bool FileManager::copyFiles(const QStringList &source,
if (auto rule = config->ignoreList.isIgnore(libInfo)) { if (auto rule = config->ignoreList.isIgnore(libInfo)) {
QuasarAppUtils::Params::log( QuasarAppUtils::Params::log(
info.absoluteFilePath() + " ignored by rule " + rule->label, info.absoluteFilePath() + " ignored by rule " + rule->label,
QuasarAppUtils::VerboseLvl::Info); QuasarAppUtils::VerboseLvl::Debug);
continue; continue;
} }
@ -504,7 +524,7 @@ bool FileManager::copyFiles(const QStringList &source,
if (!copyFile(info.absoluteFilePath(), distanation , mask)) { if (!copyFile(info.absoluteFilePath(), distanation , mask)) {
QuasarAppUtils::Params::log( QuasarAppUtils::Params::log(
"not copied file " + distanation + "/" + info.fileName(), "Failed to copy file " + distanation + "/" + info.fileName(),
QuasarAppUtils::VerboseLvl::Warning); QuasarAppUtils::VerboseLvl::Warning);
continue; continue;
} }

View File

@ -214,15 +214,14 @@ bool MetaFileManager::createQConf(const QString &target) {
return false; return false;
} }
auto distro = cnf->getDistro(target); auto distro = cnf->getDistro(target);
QString prefix = distro.getRootDir(distro.getBinOutDir());
QString content = QString content =
"[Paths]\n" "[Paths]\n"
"Prefix= ." + distro.getRootDir(distro.getBinOutDir()) + "\n" "Libraries= ." + prefix + distro.getLibOutDir() + "\n"
"Libraries= ." + distro.getLibOutDir() + "\n" "Plugins= ." + prefix + distro.getPluginsOutDir() + "\n"
"Plugins= ." + distro.getPluginsOutDir() + "\n" "Imports= ." + prefix + distro.getQmlOutDir() + "\n"
"Imports= ." + distro.getQmlOutDir() + "\n" "Translations= ." + prefix + distro.getTrOutDir() + "\n"
"Translations= ." + distro.getTrOutDir() + "\n" "Qml2Imports= ." + prefix + distro.getQmlOutDir() + "\n";
"Qml2Imports= ." + distro.getQmlOutDir() + "\n";
content.replace("//", "/"); content.replace("//", "/");
@ -254,12 +253,12 @@ void MetaFileManager::createRunMetaFiles(const QHash<QString, DeployCore::QtModu
for (auto i = DeployCore::_config->targets().cbegin(); i != DeployCore::_config->targets().cend(); ++i) { for (auto i = DeployCore::_config->targets().cbegin(); i != DeployCore::_config->targets().cend(); ++i) {
if (!createRunScript(i.key())) { if (!createRunScript(i.key())) {
QuasarAppUtils::Params::log("run script not created!", QuasarAppUtils::Params::log("Failed to create a run script: " + i.key(),
QuasarAppUtils::Error); QuasarAppUtils::Error);
} }
if (!createQConf(i.key())) { if (!createQConf(i.key())) {
QuasarAppUtils::Params::log("create qt.conf failr", QuasarAppUtils::Warning); QuasarAppUtils::Params::log("Failed to create the qt.conf file", QuasarAppUtils::Warning);
} }
} }
} }

View File

@ -15,6 +15,7 @@
#include <QProcess> #include <QProcess>
#include <QThread> #include <QThread>
#include <cassert> #include <cassert>
#include <QCryptographicHash>
#define TMP_PACKAGE_DIR "tmp_data" #define TMP_PACKAGE_DIR "tmp_data"
@ -40,6 +41,41 @@ void Packing::setDistribution(const QList<iDistribution*> &pakages) {
_pakages = pakages; _pakages = pakages;
} }
void Packing::calcDistributiveHash(const iDistribution* distro) {
if (QuasarAppUtils::Params::isEndable("noHashSum")) {
return;
}
if (!distro) {
internalError();
return;
}
auto files = distro->outPutFiles();
for (const auto &file: files) {
QFileInfo info(file);
QuasarAppUtils::Params::log("Computing hash of " + info.absoluteFilePath(),
QuasarAppUtils::Info);
QFile out(info.absoluteFilePath() + ".md5");
if (!out.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
QuasarAppUtils::Params::log("Failed to open " + info.absoluteFilePath(),
QuasarAppUtils::Error);
continue;
}
out.write(calcHash(info.absoluteFilePath()));
out.close();
_fileManager->addToDeployed(out.fileName());
}
}
bool Packing::create() { bool Packing::create() {
if (!collectPackages()) { if (!collectPackages()) {
@ -55,7 +91,7 @@ bool Packing::create() {
} }
if (!package->deployTemplate(*this)) { if (!package->deployTemplate(*this)) {
QuasarAppUtils::Params::log(QString("Deploy package template error ocured. Package: %0."). QuasarAppUtils::Params::log(QString("Failed to deploy a package template. Package: %0.").
arg(package->getClassName()), arg(package->getClassName()),
QuasarAppUtils::Error); QuasarAppUtils::Error);
return false; return false;
@ -81,6 +117,9 @@ bool Packing::create() {
_proc->start(); _proc->start();
QuasarAppUtils::Params::log(cmd.command + " " + cmd.arguments.join(' '),
QuasarAppUtils::Debug);
if (!_proc->waitForStarted()) { if (!_proc->waitForStarted()) {
QuasarAppUtils::Params::log(_proc->errorString(), QuasarAppUtils::Error); QuasarAppUtils::Params::log(_proc->errorString(), QuasarAppUtils::Error);
QuasarAppUtils::Params::log(QString("Process error code: %0").arg(_proc->error()), QuasarAppUtils::Params::log(QString("Process error code: %0").arg(_proc->error()),
@ -117,6 +156,8 @@ bool Packing::create() {
return false; return false;
} }
calcDistributiveHash(package);
package->removeTemplate(); package->removeTemplate();
delete package; delete package;
} }
@ -124,7 +165,8 @@ bool Packing::create() {
const DeployConfig *cfg = DeployCore::_config; const DeployConfig *cfg = DeployCore::_config;
if (!QDir(cfg->getTargetDir() + "/" + TMP_PACKAGE_DIR).removeRecursively()) { if (!QDir(cfg->getTargetDir() + "/" + TMP_PACKAGE_DIR).removeRecursively()) {
QuasarAppUtils::Params::log("Fail to remove " + cfg->getTargetDir() + "/" + TMP_PACKAGE_DIR); QuasarAppUtils::Params::log("Failed to remove " + cfg->getTargetDir() + "/" + TMP_PACKAGE_DIR,
QuasarAppUtils::Error);
return false; return false;
} }
@ -241,6 +283,18 @@ bool Packing::restorePackagesLocations() {
return true; return true;
} }
QByteArray Packing::calcHash(const QString &file) {
QFile f(file);
if (!f.open(QIODevice::ReadOnly)) {
return "";
}
QByteArray hash = QCryptographicHash::hash(f.readAll(), QCryptographicHash::Md5).toHex();
f.close();
return hash;
}
void Packing::handleOutputUpdate() { void Packing::handleOutputUpdate() {
QByteArray stdoutLog = _proc->readAllStandardOutput(); QByteArray stdoutLog = _proc->readAllStandardOutput();
@ -254,5 +308,3 @@ void Packing::handleOutputUpdate() {
QuasarAppUtils::Params::log(erroutLog, QuasarAppUtils::Params::log(erroutLog,
QuasarAppUtils::Info); QuasarAppUtils::Info);
} }

View File

@ -53,6 +53,19 @@ private:
bool restorePackagesLocations(); bool restorePackagesLocations();
/**
* @brief calcDistributiveHash This method calc md hashes for all pacakges of the @a distro distributive
* @param distro This is pointer to the distributive object.
*/
void calcDistributiveHash(const iDistribution* distro);
/**
* @brief calcHash This method calc md5 hash of the file.
* @param file This is a file path
* @return string value of the file hash. Using the hex.
*/
QByteArray calcHash(const QString& file);
QList<iDistribution*> _pakages; QList<iDistribution*> _pakages;
QProcess *_proc = nullptr; QProcess *_proc = nullptr;
QHash<QString, QString> _packagesLocations; QHash<QString, QString> _packagesLocations;

View File

@ -9,6 +9,7 @@
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
#include <QRegularExpression>
PathUtils::PathUtils() PathUtils::PathUtils()
{ {
@ -21,7 +22,8 @@ QString PathUtils::toFullPath(QString path) {
int index = -1; int index = -1;
do { do {
path.replace("//", "/"); path.replace("//", "/");
} while ((index = path.indexOf("//")) >= 0); index = path.indexOf("//");
} while (index >= 0);
if (path.right(1) != '/') { if (path.right(1) != '/') {
path.insert(path.size(), '/'); path.insert(path.size(), '/');
@ -106,6 +108,42 @@ QString PathUtils::fixPath(const QString &path) {
#endif #endif
} }
QString PathUtils::getName(const QString &path) {
if (path.isEmpty())
return "";
QString fixedPath = toFullPath(path);
if (fixedPath == "/") {
return fixedPath;
}
short endIndex = fixedPath.lastIndexOf(QRegularExpression("[/\\\\]"));
short beginIndex = fixedPath.lastIndexOf(QRegularExpression("[/\\\\]"), endIndex - 1) + 1;
return fixedPath.mid(beginIndex, endIndex - beginIndex);
}
QString PathUtils::popItem(QString &path) {
if (path.isEmpty())
return "";
QString fixedPath = toFullPath(path);
if (fixedPath == "/") {
path = "";
return fixedPath;
}
short endIndex = fixedPath.lastIndexOf(QRegularExpression("[/\\\\]"));
short beginIndex = fixedPath.lastIndexOf(QRegularExpression("[/\\\\]"), endIndex - 1) + 1;
path = fixedPath.left(beginIndex);
return fixedPath.mid(beginIndex, endIndex - beginIndex);
}
QString PathUtils::getReleativePath(QString path) { QString PathUtils::getReleativePath(QString path) {
path = toFullPath(path); path = toFullPath(path);
@ -136,7 +174,10 @@ QString PathUtils::stripPath(QString path) {
QString PathUtils::fullStripPath(QString path) { QString PathUtils::fullStripPath(QString path) {
path = stripPath(path); path = stripPath(path);
if (path.left(1) == '/') { if (path.isEmpty())
return path;
if (path.at(0) == '/') {
return path.remove(0, 1); return path.remove(0, 1);
} }

View File

@ -92,6 +92,20 @@ public:
*/ */
static QString fixPath(const QString & path); static QString fixPath(const QString & path);
/**
* @brief getName This method is altarnatve of the QFileInfo::fileName() method.
* @return name of the object in path.
*/
static QString getName(const QString &path);
/**
* @brief popItem This method remove last item from path.
* @param path This is path of the file of directoey.
* @return return mame pf the poped item.
* @note This method do not check items to exits.
*/
static QString popItem(QString& path);
}; };
#endif // PATHUTILS_H #endif // PATHUTILS_H

View File

@ -88,6 +88,16 @@ bool QML::extractImportsFromDir(const QString &path, bool recursive) {
} }
} }
// task https://github.com/QuasarApp/CQtDeployer/issues/600
// There are no import lines for the qt models module in Qt 6.1, but this module is required for all qml applications.
if (_qtVersion & QtMajorVersion::Qt6) {
auto importQtQml = "QtQml";
if (!_imports.contains(importQtQml)) {
_imports.insert(importQtQml);
extractImportsFromDir(getPathFromImport(importQtQml), recursive);
}
}
if (recursive) { if (recursive) {
for (const auto &info: dirs) { for (const auto &info: dirs) {
extractImportsFromDir(info.absoluteFilePath(), recursive); extractImportsFromDir(info.absoluteFilePath(), recursive);
@ -145,7 +155,7 @@ bool QML::deployPath(const QString &path, QStringList &res) {
for (const auto &info : qAsConst(infoList)) { for (const auto &info : qAsConst(infoList)) {
if (DeployCore::isDebugFile(info.fileName())) { if (DeployCore::isDebugFile(info.fileName())) {
QuasarAppUtils::Params::log("sciped debug lib " + QuasarAppUtils::Params::log("Skip debug library " +
info.absoluteFilePath()); info.absoluteFilePath());
continue; continue;
} }

View File

@ -4,7 +4,7 @@ QT_DIR= $$[QT_HOST_BINS]
win32:QMAKE_BIN= $$QT_DIR/qmake.exe win32:QMAKE_BIN= $$QT_DIR/qmake.exe
win32:LUPDATE = $$QT_DIR/lupdate.exe win32:LUPDATE = $$QT_DIR/lupdate.exe
win32:LRELEASE = $$QT_DIR/lrelease.exe win32:LRELEASE = $$QT_DIR/lrelease.exe
win32:DEPLOYER=$$(cqtdeployer) win32:DEPLOYER=cqtdeployer
contains(QMAKE_HOST.os, Linux):{ contains(QMAKE_HOST.os, Linux):{

View File

@ -3,7 +3,7 @@
<WizardDefaultWidth>640px</WizardDefaultWidth> <WizardDefaultWidth>640px</WizardDefaultWidth>
<WizardDefaultHeight>400px</WizardDefaultHeight> <WizardDefaultHeight>400px</WizardDefaultHeight>
<Name>CQtDeployer</Name> <Name>CQtDeployer</Name>
<Version>1.5.0.31</Version> <Version>1.5.0.34</Version>
<Title>CQtDeployer</Title> <Title>CQtDeployer</Title>
<Publisher>QuasarApp</Publisher> <Publisher>QuasarApp</Publisher>
<StartMenuDir>CQtDeployer</StartMenuDir> <StartMenuDir>CQtDeployer</StartMenuDir>

View File

@ -3,7 +3,7 @@
<WizardDefaultWidth>640px</WizardDefaultWidth> <WizardDefaultWidth>640px</WizardDefaultWidth>
<WizardDefaultHeight>400px</WizardDefaultHeight> <WizardDefaultHeight>400px</WizardDefaultHeight>
<Name>CQtDeployer</Name> <Name>CQtDeployer</Name>
<Version>1.5.0.31</Version> <Version>1.5.0.34</Version>
<Title>CQtDeployer</Title> <Title>CQtDeployer</Title>
<Publisher>QuasarApp</Publisher> <Publisher>QuasarApp</Publisher>
<StartMenuDir>CQtDeployer</StartMenuDir> <StartMenuDir>CQtDeployer</StartMenuDir>

View File

@ -15,6 +15,8 @@ Controller.prototype.ComponentSelectionPageCallback = function()
if (widget !== null && installer.isInstaller()) { if (widget !== null && installer.isInstaller()) {
widget.deselectAll(); widget.deselectAll();
widget.selectComponent('cqtdeployer.1_5'); widget.selectComponent('cqtdeployer.1_5');
widget.selectComponent('QIF');
} }
} }

View File

@ -4,36 +4,36 @@
<context> <context>
<name>controlScript</name> <name>controlScript</name>
<message> <message>
<location filename="controlScript.js" line="24"/> <location filename="controlScript.js" line="26"/>
<source>CQtDeployer</source> <source>CQtDeployer</source>
<translation>CQtDeployer</translation> <translation>CQtDeployer</translation>
</message> </message>
<message> <message>
<location filename="controlScript.js" line="25"/> <location filename="controlScript.js" line="27"/>
<source>Install CQtDeployer</source> <source>Install CQtDeployer</source>
<oldsource>Install Snake</oldsource> <oldsource>Install Snake</oldsource>
<translation>Установка CQtDeployer</translation> <translation>Установка CQtDeployer</translation>
</message> </message>
<message> <message>
<location filename="controlScript.js" line="39"/> <location filename="controlScript.js" line="41"/>
<location filename="controlScript.js" line="45"/> <location filename="controlScript.js" line="47"/>
<source>install in system</source> <source>install in system</source>
<translation>Установка в систему</translation> <translation>Установка в систему</translation>
</message> </message>
<message> <message>
<location filename="controlScript.js" line="39"/> <location filename="controlScript.js" line="41"/>
<location filename="controlScript.js" line="45"/> <location filename="controlScript.js" line="47"/>
<source>Installer</source> <source>Installer</source>
<translation>Установщик</translation> <translation>Установщик</translation>
</message> </message>
<message> <message>
<location filename="controlScript.js" line="40"/> <location filename="controlScript.js" line="42"/>
<source>CQtDeployer successfully installed on your computer to use the call &quot;cqtdeployer&quot;.</source> <source>CQtDeployer successfully installed on your computer to use the call &quot;cqtdeployer&quot;.</source>
<oldsource>To uninstall cqtdeployer on your system, you need administrator rights!. </oldsource> <oldsource>To uninstall cqtdeployer on your system, you need administrator rights!. </oldsource>
<translation type="unfinished">Чтобы удалить cqtdeployer в вашей системе, вам нужны права администратора !. </translation> <translation type="unfinished">Чтобы удалить cqtdeployer в вашей системе, вам нужны права администратора !. </translation>
</message> </message>
<message> <message>
<location filename="controlScript.js" line="46"/> <location filename="controlScript.js" line="48"/>
<source>CQtDeployer successfully installed on your computer to use the call &quot;cqtdeployer&quot;, cqt or cqtdeployer.cqt.</source> <source>CQtDeployer successfully installed on your computer to use the call &quot;cqtdeployer&quot;, cqt or cqtdeployer.cqt.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -1,6 +1,5 @@
.QWidget { .QWidget {
background-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255);
min-width: 640px;
} }
.QLabel { .QLabel {

View File

@ -17,7 +17,14 @@ 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
BASE_DEPLOY_FLAGS_CQT = $$BASE_DEPLOY_FLAGS -targetDir $$DATA_DIR $$OUT_LIB $$OUT_BIN 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 -publisher QuasarApp $$CQT_ICON -deployVersion 1.5.0.34
DEPLOY_TARGET_DEB = $$DEPLOY_TARGET,$$PWD/packages/QIF/data/QIF
deploy_dep.commands += $$DEPLOYER -bin $$DEPLOY_TARGET $$BASE_DEPLOY_FLAGS_CQT deploy_dep.commands += $$DEPLOYER -bin $$DEPLOY_TARGET $$BASE_DEPLOY_FLAGS_CQT
deploy_deb.commands += $$DEPLOYER -bin $$DEPLOY_TARGET_DEB $$BASE_DEPLOY_FLAGS_DEB
win32:CONFIG_FILE = $$PWD/config/configWin.xml win32:CONFIG_FILE = $$PWD/config/configWin.xml
unix:CONFIG_FILE = $$PWD/config/configLinux.xml unix:CONFIG_FILE = $$PWD/config/configLinux.xml
@ -29,7 +36,9 @@ deployOffline.commands = $$EXEC \
$$PWD/../Distro/$$OUT_FILE_OFF $$PWD/../Distro/$$OUT_FILE_OFF
deploy.depends = deploy_dep deploy.depends = deploy_dep
deploy.depends += deployOffline deploy.depends += deployOffline
deploy.depends += deploy_deb
win32:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Windows win32:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Windows
unix:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Linux unix:ONLINE_REPO_DIR = $$ONLINE/CQtDeployer/Linux
@ -84,6 +93,7 @@ include(QIF.pri)
QMAKE_EXTRA_TARGETS += \ QMAKE_EXTRA_TARGETS += \
deploy_dep \ deploy_dep \
deploy_deb \
deployOffline \ deployOffline \
deploy \ deploy \
create_repo \ create_repo \

View File

@ -3,12 +3,11 @@ const VERSION = "1.5"
function Component() function Component()
{ {
generateTr(); generateTr();
component.addDependency("QIF");
} }
function generateTr() { function generateTr() {
component.setValue("DisplayName", qsTr("CQtDeployer " + VERSION + " Alpha")); component.setValue("DisplayName", qsTr("CQtDeployer " + VERSION + " Candidate"));
component.setValue("Description", qsTr("This package contains CQtDeployer version " + VERSION + " Do not use this version because it is unstable and may lead to unwanted bugs or consequences. Use this version exclusively for testing new functionality.")); component.setValue("Description", qsTr("This package contains CQtDeployer version " + VERSION));
} }
Component.prototype.createOperations = function() Component.prototype.createOperations = function()
@ -92,14 +91,14 @@ function systemIntegration() {
component.addOperation('EnvironmentVariable', component.addOperation('EnvironmentVariable',
[ [
"cqtdeployer", "cqtdeployer",
"\"" + targetDir + "\\" + VERSION + "\\cqtdeployer.bat\"" targetDir + "\\" + VERSION + "\\cqtdeployer.bat"
] ]
) )
component.addOperation('EnvironmentVariable', component.addOperation('EnvironmentVariable',
[ [
"cqtDir", "cqtDir",
"\"" + targetDir + "\\" + VERSION + "\\\"" targetDir + "\\" + VERSION + "\\"
] ]
) )

View File

@ -2,7 +2,7 @@
<Package> <Package>
<DisplayName>CQtDeployer 1.5 Beta</DisplayName> <DisplayName>CQtDeployer 1.5 Beta</DisplayName>
<Description>CQtDeployer 1.5 Beta. Do not use this version because it is unstable and may lead to unwanted bugs or consequences. Use this version exclusively for testing new functionality.</Description> <Description>CQtDeployer 1.5 Beta. Do not use this version because it is unstable and may lead to unwanted bugs or consequences. Use this version exclusively for testing new functionality.</Description>
<Version>1.5.0.31</Version> <Version>1.5.0.34</Version>
<Default>true</Default> <Default>true</Default>
<ForcedInstallation>false</ForcedInstallation> <ForcedInstallation>false</ForcedInstallation>
<Script>installscript.js</Script> <Script>installscript.js</Script>

@ -1 +1 @@
Subproject commit d978f47ea5c4750184ae802e79f1f5bc18b95f2f Subproject commit 553e337e6a956534d34dbbfcec42359117aa35d4

View File

@ -44,11 +44,6 @@ class deploytest : public QObject
private: private:
QSet<QString> filesTree; QSet<QString> filesTree;
bool runProcess(const QString& DistroPath,
const QString& filename,
const QString &qt = "");
QStringList getFilesFromDir(const QString& dir);
void runTestParams(QStringList list, void runTestParams(QStringList list,
QSet<QString> *tree = nullptr, QSet<QString> *tree = nullptr,
bool noWarnings = false, bool noWarnings = false,
@ -101,18 +96,17 @@ private slots:
void testOverwrite(); void testOverwrite();
void testOverwriteWithPacking(); void testOverwriteWithPacking();
// tested flags confFile
void testConfFile();
// tested flags binDir // tested flags binDir
void testextraData(); void testextraData();
// tested flags qmlDir qmake // tested flags qmlDir qmake
void testQt(); void testQt();
void testWebEngine(); void testWebEngine();
// tested flags confFile
void testConfFile();
// tested flags targetPackage // tested flags targetPackage
void testPackages(); void testPackages();
@ -142,8 +136,6 @@ private slots:
void testMSVC(); void testMSVC();
void testEmptyParamsString();
// qif flags // qif flags
void testQIF(); void testQIF();
void testQIFMulti(); void testQIFMulti();
@ -183,88 +175,21 @@ private slots:
void testVirtualKeyBoard(); void testVirtualKeyBoard();
// Attention! This test only covers 40% of icon functions // Attention! This test only covers 40% of icon functions
void testIcons(); void testIcons();
void testPathUtils();
void testBinPrefix(); void testBinPrefix();
void testMd5();
void customTest(); void customTest();
}; };
bool deploytest::runProcess(const QString &DistroPath,
const QString &filename,
const QString& qt) {
QProcess p;
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
if (qt.size()) {
auto val = env.value("LD_LIBRARY_PATH","").remove(qt);
env.insert("LD_LIBRARY_PATH", val);
val = env.value("PATH","").remove(qt);
env.insert("PATH", val);
env.insert("QTDIR", "");
} else {
env.clear();
env.insert("QTDIR", "");
}
p.setProcessEnvironment(env);
#ifdef Q_OS_UNIX
p.setProgram(DistroPath + "/" + filename + ".sh");
#else
p.setProgram(DistroPath + "/" + filename + ".exe");
#endif
p.start();
if (!p.waitForFinished(10000)) {
return false;
}
QString str = p.readAll();
if (p.exitCode()) {
qCritical() << p.errorString();
}
if (p.exitCode()) {
qWarning() << "exitCode == " << p.exitCode();
}
if (str.contains("failed to load component", Qt::CaseInsensitive)
|| str.contains("is not installed", Qt::CaseInsensitive) ||
str.contains("error", Qt::CaseInsensitive)) {
return false;
}
return p.exitCode() == 0;
}
QStringList deploytest::getFilesFromDir(const QString &path) {
QDir dir(path);
QStringList res;
auto list = dir.entryInfoList(QDir::Dirs| QDir::Files| QDir::NoDotAndDotDot);
for (const auto &subDir: qAsConst(list)) {
if (subDir.isFile()) {
res.push_back(subDir.fileName());
} else {
res.append(getFilesFromDir(subDir.absoluteFilePath()));
}
}
return res;
}
deploytest::deploytest() { deploytest::deploytest() {
qputenv("QTEST_FUNCTION_TIMEOUT", "1800000"); 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/";
qputenv("PATH", qifwPath.toLatin1().data());
TestUtils utils; TestUtils utils;
QStringList pathList = QProcessEnvironment::systemEnvironment(). QStringList pathList = QProcessEnvironment::systemEnvironment().
@ -530,9 +455,6 @@ void deploytest::testMSVC() {
} }
void deploytest::testEmptyParamsString() {
}
void deploytest::testWebEngine() { void deploytest::testWebEngine() {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
TestUtils utils; TestUtils utils;
@ -562,77 +484,62 @@ void deploytest::testWebEngine() {
void deploytest::testQIF() { void deploytest::testQIF() {
TestUtils utils; TestUtils utils;
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestQMLWidgets"; QString bin = TestBinDir + "TestOnlyC";
QString qmake = TestQtDir + "bin/qmake"; QString qmake = TestQtDir + "bin/qmake";
auto comapareTree = utils.createTree({ auto comapareTree = utils.createTree({
"./" + DISTRO_DIR + "/InstallerTestQMLWidgets.run", "./" + DISTRO_DIR + "/InstallerTestOnlyC.run",
"./" + DISTRO_DIR + "/InstallerTestOnlyC.run.md5",
}); });
#else #else
QString bin = TestBinDir + "TestQMLWidgets.exe"; QString bin = TestBinDir + "TestOnlyC.exe";
QString qmake = TestQtDir + "bin/qmake.exe"; QString qmake = TestQtDir + "bin/qmake.exe";
auto comapareTree = utils.createTree({ auto comapareTree = utils.createTree({
"./" + DISTRO_DIR + "/InstallerTestQMLWidgets.exe", "./" + DISTRO_DIR + "/InstallerTestOnlyC.exe",
"./" + DISTRO_DIR + "/InstallerTestOnlyC.exe.md5",
}); });
#endif #endif
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"qif", "qifFromSystem", "qif", "qifFromSystem",
"-qifStyle", "quasar", "-qifStyle", "quasar",
"-qifBanner", TestBinDir + "/../../res/CQtDeployer_banner_web.png", "-qifBanner", TestBinDir + "/../../res/CQtDeployer_banner_web.png",
"-qifLogo", TestBinDir + "/../../res/CQtDeployer defaultIcon_web.png"}, &comapareTree, true); "-qifLogo", TestBinDir + "/../../res/CQtDeployer defaultIcon_web.png"}, &comapareTree, true);
} }
void deploytest::testQIFMulti() { void deploytest::testQIFMulti() {
TestUtils utils; TestUtils utils;
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestQMLWidgets"; QString target1 = TestBinDir + "TestCPPOnly";
QString target1 = TestBinDir + "TestOnlyC"; QString target2 = TestBinDir + "TestOnlyC";
auto comapareTreeMulti = utils.createTree({ auto comapareTreeMulti = utils.createTree({
"./" + DISTRO_DIR + "/InstallerQtWidgetsProject.run", "./" + DISTRO_DIR + "/InstallerApplication.run",
"./" + DISTRO_DIR + "/InstallerApplication.run.md5",
}); });
#else #else
QString bin = TestBinDir + "TestQMLWidgets.exe"; QString target1 = TestBinDir + "TestCPPOnly.exe";
QString target1 = TestBinDir + "TestOnlyC.exe"; QString target2 = TestBinDir + "TestOnlyC.exe";
auto comapareTreeMulti = utils.createTree({ auto comapareTreeMulti = utils.createTree({
"./" + DISTRO_DIR + "/InstallerQtWidgetsProject.exe", "./" + DISTRO_DIR + "/InstallerApplication.exe",
"./" + DISTRO_DIR + "/InstallerApplication.exe.md5",
}); });
#endif #endif
QString bin = target1;
#ifdef Q_OS_UNIX
QString target2 = TestBinDir + "TestQMLWidgets";
QString target3 = TestBinDir + "QtWidgetsProject";
#else
QString target2 = TestBinDir + "TestQMLWidgets.exe";
QString target3 = TestBinDir + "QtWidgetsProject.exe";
#endif
bin = target1;
bin += "," + target2; bin += "," + target2;
bin += "," + target3;
auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath(); auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath();
runTestParams({"-bin", bin, "force-clear", runTestParams({"-bin", bin, "force-clear",
"-binOut", "/lol",
"-libOut", "/lolLib",
"-trOut", "/lolTr",
"-pluginOut", "/p",
"-qmlOut", "/q",
"-qmlDir", "package2;" + TestBinDir + "/../TestQMLWidgets",
"-targetPackage", packageString, "-targetPackage", packageString,
"qif", "qifFromSystem"}, &comapareTreeMulti, true); "qif", "qifFromSystem"}, &comapareTreeMulti, true);
} }
@ -641,26 +548,28 @@ void deploytest::testQIFCustom() {
TestUtils utils; TestUtils utils;
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "QtWidgetsProject" + "," + TestBinDir + "TestOnlyC"; QString bin = TestBinDir + "TestCPPOnly" + "," + TestBinDir + "TestOnlyC";
QString qmake = TestQtDir + "bin/qmake"; QString qmake = TestQtDir + "bin/qmake";
auto comapareTreeCustom = utils.createTree({ auto comapareTreeCustom = utils.createTree({
"./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run", "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run",
"./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.run.md5",
}); });
#else #else
QString bin = TestBinDir + "QtWidgetsProject.exe" + "," + TestBinDir + "TestOnlyC.exe"; QString bin = TestBinDir + "TestCPPOnly.exe" + "," + TestBinDir + "TestOnlyC.exe";
QString qmake = TestQtDir + "bin/qmake.exe"; QString qmake = TestQtDir + "bin/qmake.exe";
auto comapareTreeCustom = utils.createTree({ auto comapareTreeCustom = utils.createTree({
"./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe", "./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe",
"./" + DISTRO_DIR + "/Installerorg.qtproject.ifw.example.stylesheet.exe.md5",
}); });
#endif #endif
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake, "-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"-qif", TestBinDir + "/../../UnitTests/testRes/QIFCustomTemplate", "-qif", TestBinDir + "/../../UnitTests/testRes/QIFCustomTemplate",
"-name", "org.qtproject.ifw.example.stylesheet", "-name", "org.qtproject.ifw.example.stylesheet",
"qifFromSystem"}, &comapareTreeCustom, true); "qifFromSystem"}, &comapareTreeCustom, true);
@ -672,29 +581,21 @@ void deploytest::testZIP() {
TestUtils utils; TestUtils utils;
auto comapareTree = utils.createTree({ auto comapareTree = utils.createTree({
"./" + DISTRO_DIR + "/TestQMLWidgets.zip", "./" + DISTRO_DIR + "/TestOnlyC.zip",
"./" + DISTRO_DIR + "/TestOnlyC.zip.md5",
}); });
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestQMLWidgets"; QString bin = TestBinDir + "TestOnlyC";
QString qmake = TestQtDir + "bin/qmake";
#else #else
QString bin = TestBinDir + "TestQMLWidgets.exe"; QString bin = TestBinDir + "TestOnlyC.exe";
QString qmake = TestQtDir + "bin/qmake.exe";
#endif #endif
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"zip", "verbose"}, &comapareTree, true); "zip", "verbose"}, &comapareTree, true);
// test clear for zip // test clear for zip
runTestParams({"clear", "verbose"}, nullptr, true); runTestParams({"clear", "verbose"}, nullptr, true);
@ -704,39 +605,26 @@ void deploytest::testZIPMulti() {
TestUtils utils; TestUtils utils;
auto comapareTreeMulti = utils.createTree({ auto comapareTreeMulti = utils.createTree({
"./" + DISTRO_DIR + "/QtWidgetsProject.zip",
"./" + DISTRO_DIR + "/package1.zip", "./" + DISTRO_DIR + "/package1.zip",
"./" + DISTRO_DIR + "/package2.zip", "./" + DISTRO_DIR + "/package2.zip",
"./" + DISTRO_DIR + "/package1.zip.md5",
"./" + DISTRO_DIR + "/package2.zip.md5",
}); });
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestQMLWidgets"; QString target1 = TestBinDir + "TestCPPOnly";
QString target1 = TestBinDir + "TestOnlyC"; QString target2 = TestBinDir + "TestOnlyC";
QString target2 = TestBinDir + "TestQMLWidgets";
QString target3 = TestBinDir + "QtWidgetsProject";
#else #else
QString target2 = TestBinDir + "TestQMLWidgets.exe"; QString target1 = TestBinDir + "TestCPPOnly.exe";
QString target3 = TestBinDir + "QtWidgetsProject.exe"; QString target2 = TestBinDir + "TestOnlyC.exe";
QString bin = TestBinDir + "TestQMLWidgets.exe";
QString target1 = TestBinDir + "TestOnlyC.exe";
#endif #endif
bin = target1; QString bin = target1;
bin += "," + target2; bin += "," + target2;
bin += "," + target3;
auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath(); auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath();
runTestParams({"-bin", bin, "force-clear", runTestParams({"-bin", bin, "force-clear",
"-binOut", "/lol",
"-libOut", "/lolLib",
"-trOut", "/lolTr",
"-pluginOut", "/p",
"-qmlOut", "/q",
"-qmlDir", "package2;" + TestBinDir + "/../TestQMLWidgets",
"-targetPackage", packageString, "-targetPackage", packageString,
"zip"}, &comapareTreeMulti, true); "zip"}, &comapareTreeMulti, true);
} }
@ -747,17 +635,14 @@ void deploytest::testDEB() {
TestUtils utils; TestUtils utils;
auto comapareTree = utils.createTree({ auto comapareTree = utils.createTree({
"./" + DISTRO_DIR + "/TestQMLWidgets.deb", "./" + DISTRO_DIR + "/TestOnlyC.deb",
"./" + DISTRO_DIR + "/TestOnlyC.deb.md5",
}); });
QString bin = TestBinDir + "TestOnlyC";
QString bin = TestBinDir + "TestQMLWidgets";
QString qmake = TestQtDir + "bin/qmake";
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"deb", "verbose"}, &comapareTree, true); "deb", "verbose"}, &comapareTree, true);
// test clear for deb // test clear for deb
@ -772,30 +657,22 @@ void deploytest::testDEBMulti() {
TestUtils utils; TestUtils utils;
auto comapareTreeMulti = utils.createTree({ auto comapareTreeMulti = utils.createTree({
"./" + DISTRO_DIR + "/QtWidgetsProject.deb",
"./" + DISTRO_DIR + "/package1.deb", "./" + DISTRO_DIR + "/package1.deb",
"./" + DISTRO_DIR + "/package2.deb", "./" + DISTRO_DIR + "/package2.deb",
"./" + DISTRO_DIR + "/package1.deb.md5",
"./" + DISTRO_DIR + "/package2.deb.md5",
}); });
QString bin = TestBinDir + "TestQMLWidgets"; QString target1 = TestBinDir + "TestCPPOnly";
QString target1 = TestBinDir + "TestOnlyC";
QString target2 = TestBinDir + "TestQMLWidgets"; QString target2 = TestBinDir + "TestOnlyC";
QString target3 = TestBinDir + "QtWidgetsProject";
bin = target1; QString bin = target1;
bin += "," + target2; bin += "," + target2;
bin += "," + target3;
auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath(); auto packageString = "/package1/;" + QFileInfo(target1).absoluteFilePath() + ",/package2/;" + QFileInfo(target2).absoluteFilePath();
runTestParams({"-bin", bin, "force-clear", runTestParams({"-bin", bin, "force-clear",
"-binOut", "/lol",
"-libOut", "/lolLib",
"-trOut", "/lolTr",
"-pluginOut", "/p",
"-qmlOut", "/q",
"-qmlDir", "package2;" + TestBinDir + "/../TestQMLWidgets",
"-targetPackage", packageString, "-targetPackage", packageString,
"deb"}, &comapareTreeMulti, true); "deb"}, &comapareTreeMulti, true);
#endif #endif
@ -806,17 +683,15 @@ void deploytest::testDEBCustom() {
TestUtils utils; TestUtils utils;
QString bin = TestBinDir + "TestQMLWidgets"; QString bin = TestBinDir + "TestOnlyC";
QString qmake = TestQtDir + "bin/qmake";
auto comapareTreeCustom = utils.createTree({ auto comapareTreeCustom = utils.createTree({
"./" + DISTRO_DIR + "/chrome.deb", "./" + DISTRO_DIR + "/chrome.deb",
"./" + DISTRO_DIR + "/chrome.deb.md5",
}); });
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"-deb", TestBinDir + "/../../UnitTests/testRes/DEBCustomTemplate", "-deb", TestBinDir + "/../../UnitTests/testRes/DEBCustomTemplate",
"-name", "chrome"}, "-name", "chrome"},
&comapareTreeCustom, true); &comapareTreeCustom, true);
@ -829,18 +704,18 @@ void deploytest::testMultiPacking() {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
auto comapareTree = utils.createTree({ auto comapareTree = utils.createTree({
"./" + DISTRO_DIR + "/TestQMLWidgets.zip", "./" + DISTRO_DIR + "/TestOnlyC.zip",
"./" + DISTRO_DIR + "/TestQMLWidgets.deb", "./" + DISTRO_DIR + "/TestOnlyC.deb",
"./" + DISTRO_DIR + "/InstallerTestQMLWidgets.run", "./" + DISTRO_DIR + "/InstallerTestOnlyC.run",
"./" + DISTRO_DIR + "/InstallerTestOnlyC.run.md5",
"./" + DISTRO_DIR + "/TestOnlyC.zip.md5",
"./" + DISTRO_DIR + "/TestOnlyC.deb.md5",
}); });
QString bin = TestBinDir + "TestQMLWidgets"; QString bin = TestBinDir + "TestOnlyC";
QString qmake = TestQtDir + "bin/qmake";
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"zip", "zip",
"qif", "qifFromSystem", "qif", "qifFromSystem",
"deb", "deb",
@ -848,16 +723,14 @@ void deploytest::testMultiPacking() {
#else #else
auto comapareTree = utils.createTree({ auto comapareTree = utils.createTree({
"./" + DISTRO_DIR + "/TestQMLWidgets.zip", "./" + DISTRO_DIR + "/TestOnlyC.zip",
"./" + DISTRO_DIR + "/InstallerTestQMLWidgets.exe", "./" + DISTRO_DIR + "/InstallerTestOnlyC.exe",
"./" + DISTRO_DIR + "/TestOnlyC.zip.md5",
"./" + DISTRO_DIR + "/InstallerTestOnlyC.exe.md5",
}); });
QString bin = TestBinDir + "TestQMLWidgets.exe"; QString bin = TestBinDir + "TestOnlyC.exe";
QString qmake = TestQtDir + "bin/qmake.exe";
runTestParams({"-bin", bin, "clear" , runTestParams({"-bin", bin, "clear" ,
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
"zip", "zip",
"qif", "qifFromSystem", "qif", "qifFromSystem",
"verbose"}, &comapareTree, true); "verbose"}, &comapareTree, true);
@ -1088,41 +961,6 @@ void deploytest::testEmptyPackages() {
"-libDir", TestQtDir + "bin", "-libDir", TestQtDir + "bin",
"-prefix", "package;prefix", "-prefix", "package;prefix",
"allowEmptyPackages"}, &comapareTree); "allowEmptyPackages"}, &comapareTree);
#ifdef Q_OS_UNIX
bin = TestBinDir + "QtWidgetsProject";
comapareTree = utils.createTree(
{
"./" + DISTRO_DIR + "/QtWidgetsProject.zip",
"./" + DISTRO_DIR + "/QtWidgetsProject.deb",
"./" + DISTRO_DIR + "/InstallerQtWidgetsProject.run",
});
runTestParams({"-bin", bin, "force-clear",
"-targetPackage", "/package/;NONE",
"-prefix", "package;prefix",
"allowEmptyPackages",
"qif", "qifFromSystem",
"zip",
"deb"}, &comapareTree);
#else
bin = TestBinDir + "QtWidgetsProject.exe";
comapareTree = utils.createTree(
{
"./" + DISTRO_DIR + "/QtWidgetsProject.zip",
"./" + DISTRO_DIR + "/InstallerQtWidgetsProject.exe",
});
runTestParams({"-bin", bin, "force-clear",
"-targetPackage", "/package/;NONE",
"-prefix", "package;prefix",
"allowEmptyPackages",
"qif", "qifFromSystem",
"zip"
}, &comapareTree);
#endif
} }
void deploytest::testRunScripts() { void deploytest::testRunScripts() {
@ -1175,7 +1013,7 @@ void deploytest::testOverridingDefaultTemplateDEB()
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestOnlyC" + "," + TestBinDir + "QtWidgetsProject"; QString bin = TestBinDir + "TestOnlyC" + "," + TestBinDir + "TestCPPOnly";
QString qmake = TestQtDir + "bin/qmake"; QString qmake = TestQtDir + "bin/qmake";
QDir tempalteDir("temaplate"); QDir tempalteDir("temaplate");
@ -1205,6 +1043,8 @@ void deploytest::testOverridingDefaultTemplateDEB()
comapareTree = utils.createTree( comapareTree = utils.createTree(
{ {
"./" + DISTRO_DIR + "/Test.deb", "./" + DISTRO_DIR + "/Test.deb",
"./" + DISTRO_DIR + "/Test.deb.md5",
}); });
runTestParams( runTestParams(
@ -1237,11 +1077,11 @@ void deploytest::testOverridingDefaultTemplateQIF() {
TestUtils utils; TestUtils utils;
// Prepare bin and qmake values // Prepare bin and qmake values
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestOnlyC" + "," + TestBinDir + "QtWidgetsProject"; QString bin = TestBinDir + "TestOnlyC" + "," + TestBinDir + "TestCPPOnly";
QString qmake = TestQtDir + "bin/qmake"; QString qmake = TestQtDir + "bin/qmake";
#else #else
QString bin = TestBinDir + "TestOnlyC.exe" + "," + TestBinDir + "QtWidgetsProject.exe"; QString bin = TestBinDir + "TestOnlyC.exe" + "," + TestBinDir + "TestCPPOnly.exe";
QString qmake = TestQtDir + "bin/qmake.exe"; QString qmake = TestQtDir + "bin/qmake.exe";
#endif #endif
@ -1276,12 +1116,14 @@ void deploytest::testOverridingDefaultTemplateQIF() {
comapareTree = utils.createTree( comapareTree = utils.createTree(
{ {
"./" + DISTRO_DIR + "/InstallerTest.run", "./" + DISTRO_DIR + "/InstallerTest.run",
"./" + DISTRO_DIR + "/InstallerTest.run.md5",
}); });
#else #else
comapareTree = utils.createTree( comapareTree = utils.createTree(
{ {
"./" + DISTRO_DIR + "/InstallerTest.exe", "./" + DISTRO_DIR + "/InstallerTest.exe",
"./" + DISTRO_DIR + "/InstallerTest.exe.md5",
}); });
#endif #endif
@ -1389,13 +1231,11 @@ void deploytest::testIcons() {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestOnlyC"; QString bin = TestBinDir + "TestOnlyC";
QStringList binMulti = {TestBinDir + "TestOnlyC" , TestBinDir + "TestQMLWidgets", QStringList binMulti = {TestBinDir + "TestOnlyC" , TestBinDir + "TestCPPOnly"};
TestBinDir + "QtWidgetsProject"};
#else #else
QString bin = TestBinDir + "TestOnlyC.exe"; QString bin = TestBinDir + "TestOnlyC.exe";
QStringList binMulti = {TestBinDir + "TestOnlyC.exe" , TestBinDir + "TestQMLWidgets.exe", QStringList binMulti = {TestBinDir + "TestOnlyC.exe" , TestBinDir + "TestCPPOnly.exe"};
TestBinDir + "QtWidgetsProject.exe"};
#endif #endif
@ -1468,6 +1308,76 @@ void deploytest::testIcons() {
} }
void deploytest::testPathUtils() {
// test getName
QMap<QString, QString> cases = {
{"",""},
{"test","test"},
{"t","t"},
{"/","/"},
{"/test","test"},
{"/t","t"},
{"/test/","test"},
{"/t/","t"},
{"/check/test","test"},
{"/check/t","t"},
{"/check/test/","test"},
{"/check/t/","t"},
{"C:\\","C:"},
{"\\","/"},
{"\\test","test"},
{"\\t","t"},
{"\\test\\","test"},
{"\\t\\","t"},
};
for (auto it = cases.begin(); it != cases.end(); ++it) {
if (PathUtils::getName(it.key()) != it.value())
QVERIFY(false);
}
struct Result {
QString result;
QString newPath;
};
// test popItem
QMap<QString, Result> popItemCases = {
{"", {"", ""}},
{"test", {"test", ""}},
{"t", {"t", ""}},
{"/", {"/", ""}},
{"/test", {"test", "/"}},
{"/t", {"t", "/"}},
{"/test/", {"test", "/"}},
{"/t/", {"t", "/"} },
{"/check/test", {"test", "/check/"}},
{"/check/t", {"t", "/check/"}},
{"/check/test/", {"test", "/check/"}},
{"/check/t/", {"t", "/check/"}},
{"C:\\", {"C:", ""}},
{"\\", {"/", ""}},
{"\\test", {"test", "/"}},
{"\\t", {"t", "/"}},
{"\\test\\", {"test", "/"}},
{"\\t\\", {"t", "/"}},
};
for (auto it = popItemCases.begin(); it != popItemCases.end(); ++it) {
QString path = it.key();
QString result = PathUtils::popItem(path);
if (path != it.value().newPath || result != it.value().result)
QVERIFY(false);
}
}
void deploytest::testBinPrefix() { void deploytest::testBinPrefix() {
TestUtils utils; TestUtils utils;
@ -1499,6 +1409,60 @@ void deploytest::testBinPrefix() {
} }
void deploytest::testMd5() {
// This test will check hashes
TestUtils utils;
#ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestOnlyC";
auto outFile = "./" + DISTRO_DIR + "/InstallerTestOnlyC.run";
#else
QString bin = TestBinDir + "TestOnlyC.exe";
auto outFile = "./" + DISTRO_DIR + "/InstallerTestOnlyC.exe";
#endif
auto comapareTreeqif = utils.createTree(
{
outFile,
outFile + ".md5"
});
// Run deploy installer
runTestParams({"-bin", bin,
"force-clear",
"qif",
"qifFromSystem"}, &comapareTreeqif);
QFile file(outFile);
QVERIFY(file.open(QIODevice::ReadOnly));
auto binaryData = file.readAll();
file.close();
file.setFileName(outFile + ".md5");
QVERIFY(file.open(QIODevice::ReadOnly));
auto hash = file.readAll();
file.close();
// Compare hash sum of the installer with realy hash sum of the object.
QVERIFY(QCryptographicHash::hash(binaryData, QCryptographicHash::Md5).toHex() == hash);
comapareTreeqif = utils.createTree(
{
outFile,
});
// Check noHashSum option. CQtDeployer must be skip calculating a hash sum of an installer.
runTestParams({"-bin", bin,
"force-clear",
"noHashSum",
"qif",
"qifFromSystem"}, &comapareTreeqif);
}
void deploytest::customTest() { void deploytest::customTest() {
// runTestParams({"-confFile", "path", // runTestParams({"-confFile", "path",
// "qifFromSystem"}); // "qifFromSystem"});
@ -1974,21 +1938,24 @@ void deploytest::testOverwriteWithPacking() {
TestUtils utils; TestUtils utils;
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
QString bin = TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject"; QString bin = TestBinDir + "TestOnlyC," + TestBinDir + "TestCPPOnly";
#else #else
QString bin = TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe"; QString bin = TestBinDir + "TestOnlyC.exe," + TestBinDir + "TestCPPOnly.exe";
#endif #endif
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
auto comapareTreeqif = utils.createTree( auto comapareTreeqif = utils.createTree(
{ {
"./" + DISTRO_DIR + "/InstallerTest.run", "./" + DISTRO_DIR + "/InstallerTest.run",
"./" + DISTRO_DIR + "/InstallerTest.run.md5",
}); });
#else #else
auto comapareTreeqif = utils.createTree( auto comapareTreeqif = utils.createTree(
{ {
"./" + DISTRO_DIR + "/InstallerTest.exe", "./" + DISTRO_DIR + "/InstallerTest.exe",
"./" + DISTRO_DIR + "/InstallerTest.exe.md5",
}); });
#endif #endif
@ -2008,23 +1975,21 @@ void deploytest::testextraData() {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
auto comapareTree = utils.createTree( auto comapareTree = utils.createTree(
{"./" + DISTRO_DIR + "/build/TestOnlyC", {"./" + DISTRO_DIR + "/build/TestOnlyC",
"./" + DISTRO_DIR + "/build/TestCPPOnly",
"./" + DISTRO_DIR + "/build/QtWidgetsProject", "./" + DISTRO_DIR + "/build/QtWidgetsProject",
"./" + DISTRO_DIR + "/build/TestQMLWidgets", "./" + DISTRO_DIR + "/build/TestQMLWidgets",
"./" + DISTRO_DIR + "/build/basic"}); "./" + DISTRO_DIR + "/build/basic",
"./" + DISTRO_DIR + "/build/quicknanobrowser",
"./" + DISTRO_DIR + "/build/webui"});
#else #else
auto comapareTree = utils.createTree( auto comapareTree = utils.createTree(
{"./" + DISTRO_DIR + "/build/TestOnlyC.exe", {"./" + DISTRO_DIR + "/build/TestOnlyC.exe",
"./" + DISTRO_DIR + "/build/TestCPPOnly.exe",
"./" + DISTRO_DIR + "/build/QtWidgetsProject.exe", "./" + DISTRO_DIR + "/build/QtWidgetsProject.exe",
"./" + DISTRO_DIR + "/build/TestQMLWidgets.exe", "./" + DISTRO_DIR + "/build/TestQMLWidgets.exe",
"./" + DISTRO_DIR + "/build/basic.exe"}); "./" + DISTRO_DIR + "/build/basic.exe"});
#endif #endif
#ifdef Q_OS_UNIX
comapareTree += utils.createTree(
{"./" + DISTRO_DIR + "/build/quicknanobrowser",
"./" + DISTRO_DIR + "/build/webui"});
#endif
runTestParams({"-extraData", TestBinDir, "clear", runTestParams({"-extraData", TestBinDir, "clear",
"noCheckRPATH", "noCheckPATH", "noQt"}, &comapareTree); "noCheckRPATH", "noCheckPATH", "noQt"}, &comapareTree);
@ -2050,54 +2015,44 @@ void deploytest::testConfFile() {
auto comapareTree = utils.createTree( auto comapareTree = utils.createTree(
{"./" + DISTRO_DIR + "/bin/TestOnlyC", {"./" + DISTRO_DIR + "/bin/TestOnlyC",
"./" + DISTRO_DIR + "/bin/qt.conf", "./" + DISTRO_DIR + "/bin/qt.conf",
"./" + DISTRO_DIR + "/bin/QtWidgetsProject", "./" + DISTRO_DIR + "/TestOnlyC.sh"});
"./" + DISTRO_DIR + "/bin/TestQMLWidgets",
"./" + DISTRO_DIR + "/bin/basic",
"./" + DISTRO_DIR + "/TestOnlyC.sh",
"./" + DISTRO_DIR + "/QtWidgetsProject.sh",
"./" + DISTRO_DIR + "/TestQMLWidgets.sh",
"./" + DISTRO_DIR + "/basic.sh"});
#else #else
auto comapareTree = utils.createTree( auto comapareTree = utils.createTree(
{"./" + DISTRO_DIR + "/TestOnlyC.exe", {"./" + DISTRO_DIR + "/TestOnlyC.exe",
"./" + DISTRO_DIR + "/TestOnlyC.bat", "./" + DISTRO_DIR + "/TestOnlyC.bat",
"./" + DISTRO_DIR + "/qt.conf",
"./" + DISTRO_DIR + "/QtWidgetsProject.exe",
"./" + DISTRO_DIR + "/QtWidgetsProject.bat",
"./" + DISTRO_DIR + "/TestQMLWidgets.exe",
"./" + DISTRO_DIR + "/TestQMLWidgets.bat",
"./" + DISTRO_DIR + "/basic.exe",
"./" + DISTRO_DIR + "/basic.bat",
"./" + DISTRO_DIR + "/qt.conf"}); "./" + DISTRO_DIR + "/qt.conf"});
#endif #endif
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
comapareTree += utils.createTree( runTestParams({"-bin", TestBinDir + "TestOnlyC", "clear" , "noCheckRPATH", "noCheckPATH", "noQt",
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
"./" + DISTRO_DIR + "/quicknanobrowser.sh",
"./" + DISTRO_DIR + "/bin/webui",
"./" + DISTRO_DIR + "/webui.sh"});
#endif
runTestParams({"-bin", TestBinDir, "clear" , "noCheckRPATH", "noCheckPATH", "noQt",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree); "-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
#else
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe", "clear" , "noCheckRPATH", "noCheckPATH", "noQt",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
#endif
QVERIFY(QFile::exists(TestBinDir + "/TestConf.json")); QVERIFY(QFile::exists(TestBinDir + "/TestConf.json"));
QFile::remove(TestBinDir + "/TestConf.json"); QFile::remove(TestBinDir + "/TestConf.json");
comapareTree -= utils.createTree(
{"./" + DISTRO_DIR + "/bin/quicknanobrowser",
"./" + DISTRO_DIR + "/quicknanobrowser.sh",
"./" + DISTRO_DIR + "/bin/webui",
"./" + DISTRO_DIR + "/webui.sh"});
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets", comapareTree += utils.createTree(
{"./" + DISTRO_DIR + "/bin/TestCPPOnly",
"./" + DISTRO_DIR + "/TestCPPOnly.sh"});
#else
comapareTree += utils.createTree(
{"./" + DISTRO_DIR + "/TestCPPOnly.exe",
"./" + DISTRO_DIR + "/TestCPPOnly.bat"});
#endif
#ifdef Q_OS_UNIX
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "TestCPPOnly",
"clear", "noCheckRPATH", "noCheckPATH", "noQt", "clear", "noCheckRPATH", "noCheckPATH", "noQt",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree); "-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
#else #else
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestQMLWidgets.exe", runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "TestCPPOnly.exe",
"clear" , "-libDir", "L:/never/absalut/path", "noCheckPATH", "noQt", "clear" , "-libDir", "L:/never/absalut/path", "noCheckPATH", "noQt",
"-confFile", TestBinDir + "/TestConf.json"}, &comapareTree); "-confFile", TestBinDir + "/TestConf.json"}, &comapareTree);
#endif #endif
@ -2116,9 +2071,7 @@ void deploytest::testConfFile() {
QVERIFY(data.contains("\"bin\": [")); QVERIFY(data.contains("\"bin\": ["));
QVERIFY(data.contains("./TestOnlyC")); QVERIFY(data.contains("./TestOnlyC"));
QVERIFY(data.contains("./QtWidgetsProject")); QVERIFY(data.contains("./TestCPPOnly"));
QVERIFY(data.contains("./TestQMLWidgets"));
// QVERIFY(data.contains("\"libDir\": \"/never/absalut/path/\""));
QVERIFY(data.contains("\"clear\": true")); QVERIFY(data.contains("\"clear\": true"));
@ -2133,8 +2086,7 @@ void deploytest::testConfFile() {
QVERIFY(data.contains("\"bin\": [")); QVERIFY(data.contains("\"bin\": ["));
QVERIFY(data.contains("./TestOnlyC.exe")); QVERIFY(data.contains("./TestOnlyC.exe"));
QVERIFY(data.contains("./QtWidgetsProject.exe")); QVERIFY(data.contains("./TestCPPOnly.exe"));
QVERIFY(data.contains("./TestQMLWidgets.exe"));
QVERIFY(data.contains("\"libDir\": \"L:/never/absalut/path\"")); QVERIFY(data.contains("\"libDir\": \"L:/never/absalut/path\""));
QVERIFY(data.contains("\"clear\": true")); QVERIFY(data.contains("\"clear\": true"));
@ -2155,11 +2107,11 @@ void deploytest::testConfFile() {
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "QtWidgetsProject," + TestBinDir + "TestQMLWidgets", runTestParams({"-bin", TestBinDir + "TestOnlyC," + TestBinDir + "TestCPPOnly",
"clear" , "noCheckRPATH", "noCheckPATH", "noQt", "clear" , "noCheckRPATH", "noCheckPATH", "noQt",
"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree); "-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree);
#else #else
runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "QtWidgetsProject.exe," + TestBinDir + "TestQMLWidgets.exe", runTestParams({"-bin", TestBinDir + "TestOnlyC.exe," + TestBinDir + "TestCPPOnly.exe",
"clear" , "noCheckPATH", "noQt", "clear" , "noCheckPATH", "noQt",
"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree); "-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"}, &comapareTree);
#endif #endif
@ -2177,8 +2129,7 @@ void deploytest::testConfFile() {
QVERIFY(data.contains("\"bin\": [")); QVERIFY(data.contains("\"bin\": ["));
QVERIFY(data.contains("./../../../../../build/TestOnlyC")); QVERIFY(data.contains("./../../../../../build/TestOnlyC"));
QVERIFY(data.contains("./../../../../../build/QtWidgetsProject")); QVERIFY(data.contains("./../../../../../build/TestCPPOnly"));
QVERIFY(data.contains("./../../../../../build/TestQMLWidgets"));
QVERIFY(data.contains("\"clear\": true")); QVERIFY(data.contains("\"clear\": true"));
QString qmake = TestQtDir + "bin/qmake"; QString qmake = TestQtDir + "bin/qmake";
@ -2187,8 +2138,7 @@ void deploytest::testConfFile() {
QVERIFY(data.contains("\"bin\": [")); QVERIFY(data.contains("\"bin\": ["));
QVERIFY(data.contains("./../../../../../build/TestOnlyC.exe")); QVERIFY(data.contains("./../../../../../build/TestOnlyC.exe"));
QVERIFY(data.contains("./../../../../../build/QtWidgetsProject.exe")); QVERIFY(data.contains("./../../../../../build/TestCPPOnly.exe"));
QVERIFY(data.contains("./../../../../../build/TestQMLWidgets.exe"));
QVERIFY(data.contains("\"clear\": true")); QVERIFY(data.contains("\"clear\": true"));
QString qmake = TestQtDir + "bin/qmake.exe"; QString qmake = TestQtDir + "bin/qmake.exe";
@ -2199,17 +2149,6 @@ void deploytest::testConfFile() {
QVERIFY(QuasarAppUtils::Params::isEndable("clear")); QVERIFY(QuasarAppUtils::Params::isEndable("clear"));
QVERIFY(QuasarAppUtils::Params::isEndable("bin")); QVERIFY(QuasarAppUtils::Params::isEndable("bin"));
comapareTree += TestModule.qtLibs();
comapareTree += TestModule.qmlLibs();
runTestParams({"-confFile", TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json",
"-qmake", qmake,
"-qmlDir", TestBinDir + "/../TestQMLWidgets",
}, &comapareTree);
QVERIFY(QuasarAppUtils::Params::isEndable("clear"));
QVERIFY(QuasarAppUtils::Params::isEndable("bin"));
QFile::remove(TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json"); QFile::remove(TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json");
// Test generar string in confFile // Test generar string in confFile
@ -2282,15 +2221,13 @@ void deploytest::testConfFile() {
comapareTree = TestModule.onlyC(DISTRO_DIR + "/Dstro1") + comapareTree = TestModule.onlyC(DISTRO_DIR + "/Dstro1") +
TestModule.qtLibs(DISTRO_DIR + "/Dstro2"); TestModule.qtLibs(DISTRO_DIR + "/Dstro2");
#ifdef Q_OS_LINUX
auto qmlDir = TestBinDir + "/../";
#else
auto qmlDir = TestBinDir + "/../TestQMLWidgets";
#endif
runTestParams({"-confFile", file}, runTestParams({"-confFile", file},
&comapareTree); &comapareTree);
QFile::remove(TestBinDir + "/TestConf.json");
QFile::remove(TestBinDir + "/../folder/For/Testing/Deploy/File/TestConf.json");
} }
void deploytest::testPackages() { void deploytest::testPackages() {
@ -2938,12 +2875,11 @@ void deploytest::testOutDirs() {
auto runScript = file.readAll(); auto runScript = file.readAll();
file.close(); file.close();
QVERIFY(runScript.contains("Prefix= ./../")); QVERIFY(runScript.contains("Libraries= ./../lolLib/"));
QVERIFY(runScript.contains("Libraries= ./lolLib/")); QVERIFY(runScript.contains("Plugins= ./../p/"));
QVERIFY(runScript.contains("Plugins= ./p/")); QVERIFY(runScript.contains("Imports= ./../q/"));
QVERIFY(runScript.contains("Imports= ./q/")); QVERIFY(runScript.contains("Translations= ./../lolTr/"));
QVERIFY(runScript.contains("Translations= ./lolTr/")); QVERIFY(runScript.contains("Qml2Imports= ./../q/"));
QVERIFY(runScript.contains("Qml2Imports= ./q/"));
#ifdef Q_OS_WIN #ifdef Q_OS_WIN

View File

@ -33,26 +33,24 @@ DOXYFILE_ENCODING = UTF-8
# The default value is: My Project. # The default value is: My Project.
PROJECT_NAME = CQtDeployer PROJECT_NAME = CQtDeployer
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This # 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 # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = PROJECT_NUMBER =
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short. # quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = PROJECT_BRIEF =
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included # With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55 # in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory. # the logo to the output directory.
PROJECT_LOGO = PROJECT_LOGO = "res/CQtDeployer logo_web.png"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is # into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
@ -162,7 +160,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started. # will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES. # This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH = STRIP_FROM_PATH =
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which # path mentioned in the documentation of a class, which tells the reader which
@ -171,7 +169,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler # specify the list of include paths that are normally passed to the compiler
# using the -I flag. # using the -I flag.
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't # less readable) file names. This can be useful is your file systems doesn't
@ -238,13 +236,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert # "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines. # newlines.
ALIASES = ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only). # This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class" # A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning. # will allow you to use the command class in the itcl::class meaning.
TCL_SUBST = TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For # only. Doxygen will then generate output that is more tailored for C. For
@ -291,7 +289,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen. # the files are not read by doxygen.
EXTENSION_MAPPING = EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable # according to the Markdown format, which allows for more readable
@ -648,7 +646,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if <section_label> ... \endif and \cond <section_label> # sections, marked by \if <section_label> ... \endif and \cond <section_label>
# ... \endcond blocks. # ... \endcond blocks.
ENABLED_SECTIONS = ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
# initial value of a variable or macro / define can have for it to appear in the # initial value of a variable or macro / define can have for it to appear in the
@ -690,7 +688,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file # by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation. # version. For an example see the documentation.
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated # by doxygen. The layout file controls the global structure of the generated
@ -713,7 +711,7 @@ LAYOUT_FILE = QuasarAppLib/CMake/DoxyStyle/DoxygenLayout.xml
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references. # search path. See also \cite for info how to create references.
CITE_BIB_FILES = CITE_BIB_FILES =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to warning and progress messages # Configuration options related to warning and progress messages
@ -778,7 +776,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard # messages should be written. If left blank the output is written to standard
# error (stderr). # error (stderr).
WARN_LOGFILE = WARN_LOGFILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the input files # Configuration options related to the input files
@ -790,11 +788,10 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = Deploy \ INPUT = ./Deploy \
CQtDeployer \ ./md \
doc \ ./README.md
README.md
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@ -877,7 +874,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded
@ -893,7 +890,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to # Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/* # exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS =
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the
@ -904,13 +901,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to # Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/* # exclude all test directories use the pattern */test/*
EXCLUDE_SYMBOLS = EXCLUDE_SYMBOLS =
# The EXAMPLE_PATH tag can be used to specify one or more files or directories # The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include # that contain example code fragments that are included (see the \include
# command). # command).
EXAMPLE_PATH = EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@ -951,7 +948,7 @@ IMAGE_PATH = ./res
# need to set EXTENSION_MAPPING for the extension otherwise the files are not # need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen. # properly processed by doxygen.
INPUT_FILTER = INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the # basis. Doxygen will compare the file name with each pattern and apply the
@ -964,7 +961,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not # need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen. # properly processed by doxygen.
FILTER_PATTERNS = FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will also be used to filter the input files that are used for # INPUT_FILTER) will also be used to filter the input files that are used for
@ -979,7 +976,7 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter). # *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
FILTER_SOURCE_PATTERNS = FILTER_SOURCE_PATTERNS =
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
# is part of the input, its contents will be placed on the main page # is part of the input, its contents will be placed on the main page
@ -1091,7 +1088,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH. # specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
CLANG_OPTIONS = CLANG_OPTIONS =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index # Configuration options related to the alphabetical class index
@ -1117,7 +1114,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers. # while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX = IGNORE_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the HTML output # Configuration options related to the HTML output
@ -1134,7 +1131,7 @@ GENERATE_HTML = YES
# The default directory is: html. # The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = html HTML_OUTPUT = .
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp). # generated HTML page (for example: .htm, .php, .asp).
@ -1161,7 +1158,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation. # of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER = HTML_HEADER =
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard # generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1171,7 +1168,7 @@ HTML_HEADER =
# that doxygen normally uses. # that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER = HTML_FOOTER =
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of # sheet that is used by each HTML page. It can be used to fine-tune the look of
@ -1183,7 +1180,7 @@ HTML_FOOTER =
# obsolete. # obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET = HTML_STYLESHEET =
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# cascading style sheets that are included after the standard style sheets # cascading style sheets that are included after the standard style sheets
@ -1196,7 +1193,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation. # list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = QuasarAppLib/CMake/DoxyStyle/doxygenStyles.css HTML_EXTRA_STYLESHEET = QuasarAppLib/CMake/DoxyStyle/doxygenStyles.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note # other source files which should be copied to the HTML output directory. Note
@ -1206,7 +1203,7 @@ HTML_EXTRA_STYLESHEET = QuasarAppLib/CMake/DoxyStyle/doxygenStyles.css
# files will be copied as-is; there are no commands or markers available. # files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES = HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to # will adjust the colors in the style sheet and background images according to
@ -1335,7 +1332,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory. # written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_FILE = CHM_FILE =
# The HHC_LOCATION tag can be used to specify the location (absolute path # The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty, # including file name) of the HTML help compiler (hhc.exe). If non-empty,
@ -1343,7 +1340,7 @@ CHM_FILE =
# The file has to be specified with full path. # The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION = HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated # The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO). # (YES) or that it should be included in the master .chm file (NO).
@ -1356,7 +1353,7 @@ GENERATE_CHI = NO
# and project file content. # and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING = CHM_INDEX_ENCODING =
# The BINARY_TOC flag controls whether a binary table of contents is generated # The BINARY_TOC flag controls whether a binary table of contents is generated
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
@ -1387,7 +1384,7 @@ GENERATE_QHP = NO
# the HTML output folder. # the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE = QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace # Project output. For more information please see Qt Help Project / Namespace
@ -1395,7 +1392,7 @@ QCH_FILE =
# The default value is: org.doxygen.Project. # The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_NAMESPACE = QuasarAppj QHP_NAMESPACE = QuasarApp
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual # Help Project output. For more information please see Qt Help Project / Virtual
@ -1412,7 +1409,7 @@ QHP_VIRTUAL_FOLDER = doc
# filters). # filters).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME = QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom # custom filter to add. For more information please see Qt Help Project / Custom
@ -1420,21 +1417,21 @@ QHP_CUST_FILTER_NAME =
# filters). # filters).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS = QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see: # project's filter section matches. Qt Help Project / Filter Attributes (see:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location of Qt's # The QHG_LOCATION tag can be used to specify the location of Qt's
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
# generated .qhp file. # generated .qhp file.
# This tag requires that the tag GENERATE_QHP is set to YES. # This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION = QHG_LOCATION =
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
# generated, together with the HTML files, they form an Eclipse help plugin. To # generated, together with the HTML files, they form an Eclipse help plugin. To
@ -1567,7 +1564,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_EXTENSIONS = MATHJAX_EXTENSIONS =
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site # of code that will be used on startup of the MathJax code. See the MathJax site
@ -1575,7 +1572,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation. # example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES. # This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_CODEFILE = MATHJAX_CODEFILE =
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for # When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and # the HTML output. The underlying search engine uses javascript and DHTML and
@ -1635,7 +1632,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details. # Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHENGINE_URL = SEARCHENGINE_URL =
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
# search data is written to a file for indexing by an external tool. With the # search data is written to a file for indexing by an external tool. With the
@ -1651,7 +1648,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project. # projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
EXTERNAL_SEARCH_ID = EXTERNAL_SEARCH_ID =
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
# projects other than the one defined by this configuration file, but that are # projects other than the one defined by this configuration file, but that are
@ -1661,7 +1658,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES. # This tag requires that the tag SEARCHENGINE is set to YES.
EXTRA_SEARCH_MAPPINGS = EXTRA_SEARCH_MAPPINGS =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the LaTeX output # Configuration options related to the LaTeX output
@ -1725,7 +1722,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included. # If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
EXTRA_PACKAGES = EXTRA_PACKAGES =
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
# generated LaTeX document. The header should contain everything until the first # generated LaTeX document. The header should contain everything until the first
@ -1741,7 +1738,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER. # to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HEADER = LATEX_HEADER =
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
# generated LaTeX document. The footer should contain everything after the last # generated LaTeX document. The footer should contain everything after the last
@ -1752,7 +1749,7 @@ LATEX_HEADER =
# Note: Only use a user-defined footer if you know what you are doing! # Note: Only use a user-defined footer if you know what you are doing!
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_FOOTER = LATEX_FOOTER =
# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# LaTeX style sheets that are included after the standard style sheets created # LaTeX style sheets that are included after the standard style sheets created
@ -1763,7 +1760,7 @@ LATEX_FOOTER =
# list). # list).
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EXTRA_STYLESHEET = LATEX_EXTRA_STYLESHEET =
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the LATEX_OUTPUT output # other source files which should be copied to the LATEX_OUTPUT output
@ -1771,7 +1768,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available. # markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES. # This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EXTRA_FILES = LATEX_EXTRA_FILES =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
@ -1879,14 +1876,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses. # default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES. # This tag requires that the tag GENERATE_RTF is set to YES.
RTF_STYLESHEET_FILE = RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is # Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config file. A template extensions file can be generated # similar to doxygen's config file. A template extensions file can be generated
# using doxygen -e rtf extensionFile. # using doxygen -e rtf extensionFile.
# This tag requires that the tag GENERATE_RTF is set to YES. # This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE = RTF_EXTENSIONS_FILE =
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
# with syntax highlighting in the RTF output. # with syntax highlighting in the RTF output.
@ -1931,7 +1928,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed. # MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES. # This tag requires that the tag GENERATE_MAN is set to YES.
MAN_SUBDIR = MAN_SUBDIR =
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
# will generate one additional man file for each entity documented in the real # will generate one additional man file for each entity documented in the real
@ -2044,7 +2041,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables. # overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES. # This tag requires that the tag GENERATE_PERLMOD is set to YES.
PERLMOD_MAKEVAR_PREFIX = PERLMOD_MAKEVAR_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the preprocessor # Configuration options related to the preprocessor
@ -2085,7 +2082,7 @@ SEARCH_INCLUDES = YES
# preprocessor. # preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES. # This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH = INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the # patterns (like *.h and *.hpp) to filter out the header-files in the
@ -2093,7 +2090,7 @@ INCLUDE_PATH =
# used. # used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
# The PREDEFINED tag can be used to specify one or more macro names that are # The PREDEFINED tag can be used to specify one or more macro names that are
# defined before the preprocessor is started (similar to the -D option of e.g. # defined before the preprocessor is started (similar to the -D option of e.g.
@ -2103,7 +2100,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator. # recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The # tag can be used to specify a list of macro names that should be expanded. The
@ -2112,7 +2109,7 @@ PREDEFINED =
# definition found in the source code. # definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all references to function-like macros that are alone on a line, have # remove all references to function-like macros that are alone on a line, have
@ -2141,13 +2138,13 @@ SKIP_FUNCTION_MACROS = YES
# the path). If a tag file is not located in the directory in which doxygen is # the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here. # run, you must also specify the path to the tagfile here.
TAGFILES = TAGFILES =
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to # tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files. # external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE = GENERATE_TAGFILE =
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in # If the ALLEXTERNALS tag is set to YES, all external class will be listed in
# the class index. If set to NO, only the inherited external classes will be # the class index. If set to NO, only the inherited external classes will be
@ -2196,14 +2193,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the # the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path. # default search path.
MSCGEN_PATH = MSCGEN_PATH =
# You can include diagrams made with dia in doxygen documentation. Doxygen will # You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The # then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides. # DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path. # If left empty dia is assumed to be found in the default search path.
DIA_PATH = DIA_PATH =
# If set to YES the inheritance and collaboration graphs will hide inheritance # If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class. # and usage relations if the target is undocumented or is not a class.
@ -2252,7 +2249,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag. # the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTPATH = DOT_FONTPATH =
# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
# each documented class showing the direct and indirect inheritance relations. # each documented class showing the direct and indirect inheritance relations.
@ -2398,26 +2395,26 @@ INTERACTIVE_SVG = YES
# found. If left blank, it is assumed the dot tool can be found in the path. # found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_PATH = DOT_PATH =
# The DOTFILE_DIRS tag can be used to specify one or more directories that # The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the \dotfile # contain dot files that are included in the documentation (see the \dotfile
# command). # command).
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOTFILE_DIRS = DOTFILE_DIRS =
# The MSCFILE_DIRS tag can be used to specify one or more directories that # The MSCFILE_DIRS tag can be used to specify one or more directories that
# contain msc files that are included in the documentation (see the \mscfile # contain msc files that are included in the documentation (see the \mscfile
# command). # command).
MSCFILE_DIRS = MSCFILE_DIRS =
# The DIAFILE_DIRS tag can be used to specify one or more directories that # The DIAFILE_DIRS tag can be used to specify one or more directories that
# contain dia files that are included in the documentation (see the \diafile # contain dia files that are included in the documentation (see the \diafile
# command). # command).
DIAFILE_DIRS = DIAFILE_DIRS =
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
# path where java can find the plantuml.jar file. If left blank, it is assumed # path where java can find the plantuml.jar file. If left blank, it is assumed
@ -2425,17 +2422,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and # generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram. # will not generate output for the diagram.
PLANTUML_JAR_PATH = PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a # When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml. # configuration file for plantuml.
PLANTUML_CFG_FILE = PLANTUML_CFG_FILE =
# When using plantuml, the specified paths are searched for files specified by # When using plantuml, the specified paths are searched for files specified by
# the !include statement in a plantuml block. # the !include statement in a plantuml block.
PLANTUML_INCLUDE_PATH = PLANTUML_INCLUDE_PATH =
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
# that will be shown in the graph. If the number of nodes in a graph becomes # that will be shown in the graph. If the number of nodes in a graph becomes

View File

@ -1,14 +1,16 @@
# Release of the C ++ / Qt and QML application deployment utility 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 and help files. 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. This is the first major update in 2021. CQtDeployer 1.5 contains many useful improvements and help files. 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.
## Complete list of all changes ## Complete list of all changes
## CQtDeployer 1.5.0 ## CQtDeployer 1.5.0
### New features ### New features
- Added new theme of qif installer "quasarDark". - Added new theme of qif installer "quasarDark".
- Added support of work with custom template for qif option. - Added support of work with custom template for qif option.
- Added support of debian packages with. - Added support of debian packages.
- Added support icons for targets. now the icon option work with targets but not packages. - Added support icons for targets. now the icon option work with targets but not packages.
- Added support of the control custom translation files. - Added support of the control custom translation files.
- Added support the deploy nonexecutable data. (extraData option) - Added support the deploy nonexecutable data. (extraData option)
@ -18,21 +20,28 @@ This is the first major update in 2021. CQtDeployer 1.5 contains many useful imp
- Added support create a qif installer using custom template - Added support create a qif installer using custom template
- Added command of init default qif of deb template (getDefaulttemplate) - Added command of init default qif of deb template (getDefaulttemplate)
- Added support of import custom launch scripts - Added support of import custom launch scripts
- Added support qt installer framework 4.0 - Added support of md5 packages hashes
- Added support of Qt6.1
### Fixes ### Fixes
- Fixed stability for the deploySystem option on windows - Fixed stability for the deploySystem option on windows
- Fixed verbose log. - Fixed verbose log.
- Fixed general output log. - Fixed general output log.
- Fixed typo errors in log.
- Fixed crossdeploy of the arm distributions. - Fixed crossdeploy of the arm distributions.
- Fixed deploy Qt6 qml
- Fixed powershell commands on Windows
- bug fixes and improvements. - bug fixes and improvements.
### New Envirement Variables ### New Envirement Variables
- CQT_RUN_FILE - This variable contains path to the run script of the using application. - CQT_RUN_FILE - This variable contains path to the run script of the using application.
- CQT_PKG_ROOT - This variable contains path to root of the current package. - CQT_PKG_ROOT - This variable contains path to root of the current package.
### New parameters ### New parameters
- zip - create a ZIP archive for deployable programs - zip - create a ZIP archive for deployable programs
- deb - Create the deb package for deployment programm - deb - Create the deb package for deployment programm
- homepage - Sets the homepage url for a package - homepage - Sets the homepage url for a package
@ -45,30 +54,103 @@ This is the first major update in 2021. CQtDeployer 1.5 contains many useful imp
- prefix - Sets the prefix for the package relatively a target directory - prefix - Sets the prefix for the package relatively a target directory
- homePage - Sets the homepage url for a package - homePage - Sets the homepage url for a package
- binPrefix - Sets prefix for bin option. - binPrefix - Sets prefix for bin option.
- noHashSum - Disables campute hashes of packages
### Deprecated and removed options ### Deprecated and removed options
- deploySystem-with-libc - instead of this option use the deploySystem option. - deploySystem-with-libc - instead of this option use the deploySystem option.
- allQmlDependes - instead of this option use the qmlDir option. - allQmlDependes - instead of this option use the qmlDir option.
## Detailed analysis of the most interesting changes. ## Detailed analysis of the most interesting changes.
Create a independet deb packages. This features is very conveniently if you want to create server application. ### Debian pacakges
This feature is very conveniently if you want to create server application.
For example i need to create simple server for my simple game. For example i need to create simple server for my simple game.
And my steps: And my steps:
* build my application in the release mode. * build my application in the release mode.
* run cqtdeployer with deb option. * run cqtdeployer with deb option.
``` ```bash
cqtdeployer -bin mySimpleServer deb -qmake ~/Qt/5.15.2/gcc_64/bin/qmake cqtdeployer -bin mySimpleServer deb -qmake ~/Qt/5.15.2/gcc_64/bin/qmake
``` ```
Ьy SimpleServer depends only on qt, so it was enough for me to specify only the path to qmake for my application. Ьy SimpleServer depends only on qt, so it was enough for me to specify only the path to qmake for my application.
It is all!!!. And i get the workly deb package. It is all!!!. And i get the workly deb package.
By Default CQtDeployer create an independet debian packages.
So lets see what contains the generated deb package.
### Zip arrhives
This feature allow compress your distribution pacakges to zip arrhive.
Example:
```bash
cqtdeployer -bin mySimpleServer zip -qmake ~/Qt/5.15.2/gcc_64/bin/qmake
```
### Custom Qt Installer Framework tempaltes.
Now you can override default template of the cqtdeployer. To do this, you must pass the path to your template to the qif parameter.
```
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": [
[
"myCustomInstaller",
"tar1"
]
],
```
``` bash
.
├── config
│ ├── config.xml
│ └── style.qss
└── packages
└── myCustomInstaller
└── meta
├── installscript.qs
└── package.xml
4 directories, 4 files
```
If the folder names do not match the package names then CQtDeployer will use the standard QIF package.
If you have only one package then you can use the **name** option for set name the application.
```bash
cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller
```
#### Do not forget to rename the your package folder to the packaga name of the name option.
# To be completed ```bash
.
├── config
│ ├── config.xml
│ └── style.qss
└── packages
└── myCustomInstaller << "This is folder of the your package"
└── meta
├── installscript.qs
└── package.xml
4 directories, 4 files
```

View File

@ -1,10 +1,12 @@
# Chnage log for all versions of the CQtDeployer. # Chnage log for all versions of the CQtDeployer.
## CQtDeployer 1.5.0 ## CQtDeployer 1.5.0
### New features ### New features
- Added new theme of qif installer "quasarDark". - Added new theme of qif installer "quasarDark".
- Added support of work with custom template for qif option. - Added support of work with custom template for qif option.
- Added support of debian packages with. - Added support of debian packages.
- Added support icons for targets. now the icon option work with targets but not packages. - Added support icons for targets. now the icon option work with targets but not packages.
- Added support of the control custom translation files. - Added support of the control custom translation files.
- Added support the deploy nonexecutable data. (extraData option) - Added support the deploy nonexecutable data. (extraData option)
@ -14,20 +16,28 @@
- Added support create a qif installer using custom template - Added support create a qif installer using custom template
- Added command of init default qif of deb template (getDefaulttemplate) - Added command of init default qif of deb template (getDefaulttemplate)
- Added support of import custom launch scripts - Added support of import custom launch scripts
- Added support of md5 packages hashes
- Added support of Qt6.1
### Fixes ### Fixes
- Fixed stability for the deploySystem option on windows - Fixed stability for the deploySystem option on windows
- Fixed verbose log. - Fixed verbose log.
- Fixed general output log. - Fixed general output log.
- Fixed typo errors in log.
- Fixed crossdeploy of the arm distributions. - Fixed crossdeploy of the arm distributions.
- Fixed deploy Qt6 qml
- Fixed powershell commands on Windows
- bug fixes and improvements. - bug fixes and improvements.
### New Envirement Variables ### New Envirement Variables
- CQT_RUN_FILE - This variable contains path to the run script of the using application. - CQT_RUN_FILE - This variable contains path to the run script of the using application.
- CQT_PKG_ROOT - This variable contains path to root of the current package. - CQT_PKG_ROOT - This variable contains path to root of the current package.
### New parameters ### New parameters
- zip - create a ZIP archive for deployable programs - zip - create a ZIP archive for deployable programs
- deb - Create the deb package for deployment programm - deb - Create the deb package for deployment programm
- homepage - Sets the homepage url for a package - homepage - Sets the homepage url for a package
@ -40,33 +50,44 @@
- prefix - Sets the prefix for the package relatively a target directory - prefix - Sets the prefix for the package relatively a target directory
- homePage - Sets the homepage url for a package - homePage - Sets the homepage url for a package
- binPrefix - Sets prefix for bin option. - binPrefix - Sets prefix for bin option.
- noHashSum - Disables campute hashes of packages
### Deprecated and removed options ### Deprecated and removed options
- deploySystem-with-libc - instead of this option use the deploySystem option. - deploySystem-with-libc - instead of this option use the deploySystem option.
- allQmlDependes - instead of this option use the qmlDir option. - allQmlDependes - instead of this option use the qmlDir option.
## CQtDeployer 1.5.0 Alpha ## CQtDeployer 1.5.0 Alpha
### Corrections ### Corrections
- bug fixes and improvements. - bug fixes and improvements.
### New Features ### New Features
- Added a new Theme for qif installer "quasarDark". - Added a new Theme for qif installer "quasarDark".
### New options ### New options
- zip - create the ZIP arhive for deployement programm - zip - create the ZIP arhive for deployement programm
## CQtDeployer 1.4.7 ## CQtDeployer 1.4.7
### Corrections ### Corrections
- Fixed deploy the qxcb plugin. #438 - Fixed deploy the qxcb plugin. #438
- Fixed deploy the qtGui module. #446 - Fixed deploy the qtGui module. #446
### New Features ### New Features
- Added support of Qt6 #437 - Added support of Qt6 #437
- Added support of Qt installer Framework 4 (with improved command line interface experience) #436 - Added support of Qt installer Framework 4 (with improved command line interface experience) #436
## CQtDeployer 1.4.6 ## CQtDeployer 1.4.6
### Corrections ### Corrections
- Fixed deploy sql drivers #367 - Fixed deploy sql drivers #367
- Fixed algorithm of deploy libraryes. #423 #371 - Fixed algorithm of deploy libraryes. #423 #371
- Fixed working with a qt from the linux system repository. (classic instaler only) #422 - Fixed working with a qt from the linux system repository. (classic instaler only) #422
@ -76,10 +97,13 @@
- Removed deprecated option extractPlugins. #371 - Removed deprecated option extractPlugins. #371
### New options ### New options
- noQt - Ignore the error of initialize of a qmake. Use only if your application does not use the qt framework. - noQt - Ignore the error of initialize of a qmake. Use only if your application does not use the qt framework.
## CQtDeployer 1.4.5 ## CQtDeployer 1.4.5
### Corrections ### Corrections
- Optimized project deployment performance. 60% faster. - Optimized project deployment performance. 60% faster.
- Optimized output size of distributions. Size reduced by 25%. - Optimized output size of distributions. Size reduced by 25%.
- Fixed display of shortcuts after installing deployed applications. - Fixed display of shortcuts after installing deployed applications.
@ -88,6 +112,7 @@
- Minor bug fixes and improvements. - Minor bug fixes and improvements.
### New Features ### New Features
- Added a new deployment plugin management system. - Added a new deployment plugin management system.
### New options ### New options

View File

@ -43,3 +43,44 @@ Or you can describe packages in [configuration file](DeployConfigFile.md)
"deb": true "deb": true
} }
``` ```
## Custom Template for DEB
You can create a own Template fo the debian pacakges.
### The debian pacakge structure:
```bash
└── Debian templates
├── debPacakge1
│ └── DEBIAN
│ ├── control
│ ├── postinst
│ └── prerm
└── debPacakge2
└── DEBIAN
├── control
├── postinst
└── prerm
```
For include your templates into your destribution you need to add path of the Debian templates folder into deployConfig.json
```json
{
"targetPackage": [
[
"debPacakge1",
"tar1"
],
[
"debPacakge2",
"tar2"
],
],
"deb": "./Debian templates"
}
```

View File

@ -67,6 +67,8 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
| noQt | Ignors the error of initialize of a qmake. Use only if your application does not use the qt framework. | | 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. | | allowEmptyPackages | Allows configure the empty packages. |
| getDefaultTemplate | Extracts defaults deb or qif templates. For more information see the extracting default templates [page](ExtractDefaultsTemplates.md) | | 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 |
### Deploy options ### Deploy options

View File

@ -11,7 +11,7 @@ The qif option invoke with path to custo qt installer template or with default i
#### For example: #### For example:
``` bash ```bash
cqtdeployer ... qif cqtdeployer ... qif
``` ```
@ -47,7 +47,7 @@ Or you can describe packages in [configuration file](DeployConfigFile.md)
# Custom Template for QIF # 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. 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
cqtdeployer ... -qif /path/to/my/custom/qif/template cqtdeployer ... -qif /path/to/my/custom/qif/template
``` ```
@ -60,7 +60,7 @@ The qif template should contain 2 folders:
The name of the packages in the packages folder must match the names of the packages during deployment. The name of the packages in the packages folder must match the names of the packages during deployment.
For example: For example:
``` json ```json
"targetPackage": [ "targetPackage": [
[ [
"myCustomInstaller", "myCustomInstaller",
@ -69,7 +69,7 @@ For example:
], ],
``` ```
``` bash ```bash
. .
├── config ├── config
│ ├── config.xml │ ├── config.xml
@ -88,14 +88,14 @@ If the folder names do not match the package names then CQtDeployer will use the
If you have only one package then you can use the **name** option for set name the application. If you have only one package then you can use the **name** option for set name the application.
``` ```bash
cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller
``` ```
#### Do not forget to rename the your package folder to the packaga name of the name option. #### Do not forget to rename the your package folder to the packaga name of the name option.
``` bash ```bash
. .
├── config ├── config
│ ├── config.xml │ ├── config.xml
@ -108,4 +108,4 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller
4 directories, 4 files 4 directories, 4 files
``` ```

View File

@ -69,6 +69,7 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3
| noQt | Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt. | | noQt | Игнорирует ошибку инициализации qmake. Используйте только в том случае, если ваше приложение не использует платформу qt. |
| allowEmptyPackages | Разрешите настраивать пустые пакеты. | | allowEmptyPackages | Разрешите настраивать пустые пакеты. |
| getDefaultTemplate | Извлекает deb или qif шаблоны по умолчанию. Для получения дополнительной информации см. [Страницу](ExtractDefaultsTemplates.md) извлечения шаблонов по умолчанию. | | getDefaultTemplate | Извлекает deb или qif шаблоны по умолчанию. Для получения дополнительной информации см. [Страницу](ExtractDefaultsTemplates.md) извлечения шаблонов по умолчанию. |
| noHashSum | Отключить вычисление хеш-суммы пакетов |
### Параметры развертывания: ### Параметры развертывания:

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,5 +1,5 @@
[Desktop Entry] [Desktop Entry]
Version=1.5.0.31 Version=1.5.0.34
Name=CQtDeployer Name=CQtDeployer
Comment=CQtDeployer Help. Comment=CQtDeployer Help.
Exec=cqtdeployer Exec=cqtdeployer
@ -10,6 +10,6 @@ Categories=Application;
X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=CQtDeployer X-GNOME-Bugzilla-Product=CQtDeployer
X-GNOME-Bugzilla-Component=General X-GNOME-Bugzilla-Component=General
X-GNOME-Bugzilla-Version=1.5.0.31 X-GNOME-Bugzilla-Version=1.5.0.34
StartupNotify=true StartupNotify=true
Name[ru_RU]=CQtDeployer Name[ru_RU]=CQtDeployer

View File

@ -6,7 +6,7 @@
# #
name: cqtdeployer # you probably want to 'snapcraft register <name>' name: cqtdeployer # you probably want to 'snapcraft register <name>'
version: '1.5.0.31' # just for humans, typically '1.2+git' or '1.3.2' version: '1.5.0.34' # just for humans, typically '1.2+git' or '1.3.2'
summary: deploy your qt projects # 79 char long summary summary: deploy your qt projects # 79 char long summary
description: | description: |
Console app for deploy qt libs. Console app for deploy qt libs.

View File

@ -8,7 +8,6 @@ contains(QMAKE_HOST.os, Linux):{
} }
DEPLOYER=cqtdeployer DEPLOYER=cqtdeployer
win32:DEPLOYER=$$(cqtdeployer)
test.commands = test.commands =
deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4 deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4

View File

@ -0,0 +1,10 @@
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
CONFIG += release
SOURCES += \
main.cpp
DESTDIR="$$PWD/../build"

View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/qt/etc">
<file>qt.conf</file>
</qresource>
</RCC>

View File

@ -0,0 +1,9 @@
#include <iostream>
using namespace std;
int main()
{
cout << "TEST DONE (ONLY_C)" << endl;
return 0;
}

View File