mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-04 21:49:35 +00:00
commit
6cd31485da
@ -24,12 +24,10 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
|
||||
if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
|
||||
qWarning() << "wrong parametrs";
|
||||
QuasarAppUtils::Params::log("wrong parametrs", QuasarAppUtils::Warning);
|
||||
DeployCore::help();
|
||||
exit(0);
|
||||
}
|
||||
QuasarAppUtils::Params::setEnable("noWriteInFileLog", true);
|
||||
|
||||
|
||||
Deploy deploy;
|
||||
return deploy.run();
|
||||
|
@ -19,7 +19,7 @@ TEMPLATE = lib
|
||||
|
||||
DEFINES += DEPLOY_LIBRARY
|
||||
|
||||
VERSION = 1.4.1.0
|
||||
VERSION = 1.4.1.2
|
||||
|
||||
DEFINES += APP_VERSION='\\"$$VERSION\\"'
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
"pluginOut": "plug",
|
||||
"binOut": "bin",
|
||||
"recOut": "rec",
|
||||
"verbose": "3",
|
||||
"verbose": "1",
|
||||
"qif": false,
|
||||
"noCheckRPATH": false,
|
||||
"noCheckPATH": false,
|
||||
|
@ -26,7 +26,7 @@
|
||||
"pluginOut": "plug",
|
||||
"binOut": "bin",
|
||||
"recOut": "rec",
|
||||
"verbose": "3",
|
||||
"verbose": "1",
|
||||
"qif": false,
|
||||
"noCheckRPATH": false,
|
||||
"noCheckPATH": false,
|
||||
|
@ -236,7 +236,7 @@ QString QIF::getStyle(const QString& input) const {
|
||||
return f.absoluteFilePath();
|
||||
}
|
||||
|
||||
QuasarAppUtils::Params::verboseLog(input + " not exits",
|
||||
QuasarAppUtils::Params::log(input + " not exits",
|
||||
QuasarAppUtils::Error);
|
||||
|
||||
return "";
|
||||
|
@ -71,7 +71,7 @@ bool ConfigParser::parseParams() {
|
||||
|
||||
if (QFile::exists(path)) {
|
||||
if (!loadFromFile(path)) {
|
||||
QuasarAppUtils::Params::verboseLog("failed to parse " + path,
|
||||
QuasarAppUtils::Params::log("failed to parse " + path,
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
@ -82,39 +82,46 @@ bool ConfigParser::parseParams() {
|
||||
|
||||
switch (DeployCore::getMode()) {
|
||||
case RunMode::Info: {
|
||||
qInfo() << "Print info ..." ;
|
||||
QuasarAppUtils::Params::log("Print info ...",
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
if (!parseInfoMode()) {
|
||||
qCritical() << "show info is failed!";
|
||||
QuasarAppUtils::Params::log("show info is failed!",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RunMode::Clear: {
|
||||
qInfo() << "clear ..." ;
|
||||
QuasarAppUtils::Params::log("clear ...",
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
if (!parseClearMode()) {
|
||||
qCritical() << "clear is failed!";
|
||||
QuasarAppUtils::Params::log("clear is failed!",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case RunMode::Init: {
|
||||
qInfo() << "Init ..." ;
|
||||
|
||||
QuasarAppUtils::Params::log("Init ...",
|
||||
QuasarAppUtils::Info);
|
||||
if (!parseInitMode()) {
|
||||
qCritical() << "init is failed!";
|
||||
QuasarAppUtils::Params::log("init is failed!",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case RunMode::Deploy: {
|
||||
qInfo() << "Deploy ..." ;
|
||||
QuasarAppUtils::Params::log("Deploy ...",
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
if (!parseDeployMode()) {
|
||||
qCritical() << "deploy is failed!";
|
||||
QuasarAppUtils::Params::log("deploy is failed!",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -125,7 +132,7 @@ bool ConfigParser::parseParams() {
|
||||
DeployCore::_config = &_config;
|
||||
|
||||
if (createFile && !createFromDeploy(path)) {
|
||||
QuasarAppUtils::Params::verboseLog("Do not create a deploy config file in " + path,
|
||||
QuasarAppUtils::Params::log("Do not create a deploy config file in " + path,
|
||||
QuasarAppUtils::Error);
|
||||
}
|
||||
|
||||
@ -350,7 +357,7 @@ bool ConfigParser::initDistroStruct() {
|
||||
split(DeployCore::getSeparator(0), QString::SkipEmptyParts);
|
||||
|
||||
auto erroLog = [](const QString &flag){
|
||||
QuasarAppUtils::Params::verboseLog(QString("Set %0 fail, because you try set %0 for not inited package."
|
||||
QuasarAppUtils::Params::log(QString("Set %0 fail, because you try set %0 for not inited package."
|
||||
" Use 'targetPackage' flag for init the packages").arg(flag),
|
||||
QuasarAppUtils::Error);
|
||||
};
|
||||
@ -449,7 +456,7 @@ bool ConfigParser::initPackages() {
|
||||
}
|
||||
}
|
||||
|
||||
QuasarAppUtils::Params::verboseLog(
|
||||
QuasarAppUtils::Params::log(
|
||||
"Set Default Package to " + defaultPackage,
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
@ -468,7 +475,7 @@ bool ConfigParser::initQmlInput() {
|
||||
}
|
||||
|
||||
auto erroLog = [](const QString &flag){
|
||||
QuasarAppUtils::Params::verboseLog(QString("Set %0 fail, because you try set %0 for not inited package."
|
||||
QuasarAppUtils::Params::log(QString("Set %0 fail, because you try set %0 for not inited package."
|
||||
" Use 'targetPackage' flag for init the packages").arg(flag),
|
||||
QuasarAppUtils::Error);
|
||||
};
|
||||
@ -497,7 +504,8 @@ bool ConfigParser::parseDeployMode() {
|
||||
|
||||
auto binDir = QuasarAppUtils::Params::getStrArg("binDir");
|
||||
if (!setTargetsRecursive(binDir)) {
|
||||
qCritical() << "setTargetDir fail!";
|
||||
QuasarAppUtils::Params::log("setTargetDir fail!",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -517,7 +525,8 @@ bool ConfigParser::parseDeployMode() {
|
||||
_config.depchLimit = QuasarAppUtils::Params::getArg("recursiveDepth").toInt(&ok);
|
||||
if (!ok) {
|
||||
_config.depchLimit = 0;
|
||||
qWarning() << "recursiveDepth is invalid! use default value 0";
|
||||
QuasarAppUtils::Params::log("recursiveDepth is invalid! use default value 0",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
|
||||
@ -620,7 +629,8 @@ void ConfigParser::setTargetDir(const QString &target) {
|
||||
} else {
|
||||
|
||||
_config.setTargetDir(QFileInfo("./" + DISTRO_DIR).absoluteFilePath());
|
||||
qInfo () << "flag targetDir not used." << "use default target dir :" << _config.getTargetDir();
|
||||
QuasarAppUtils::Params::log("flag targetDir not used. use default target dir :" + _config.getTargetDir(),
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -642,13 +652,15 @@ bool ConfigParser::setTargets(const QStringList &value) {
|
||||
}
|
||||
else if (targetInfo.isDir()) {
|
||||
if (!setBinDir(i)) {
|
||||
DeployCore::verboseLog(i + " du not contains executable binaries!");
|
||||
QuasarAppUtils::Params::log(i + " du not contains executable binaries!",
|
||||
QuasarAppUtils::Debug);
|
||||
continue;
|
||||
}
|
||||
isfillList = true;
|
||||
|
||||
} else {
|
||||
DeployCore::verboseLog(targetInfo.absoluteFilePath() + " not exits!");
|
||||
QuasarAppUtils::Params::log(targetInfo.absoluteFilePath() + " not exits!",
|
||||
QuasarAppUtils::Debug);
|
||||
}
|
||||
}
|
||||
|
||||
@ -662,7 +674,8 @@ bool ConfigParser::setTargets(const QStringList &value) {
|
||||
|
||||
bool ConfigParser::setTargetsRecursive(const QString &dir) {
|
||||
if (!setBinDir(dir, true)) {
|
||||
qWarning() << "setBinDir failed!";
|
||||
QuasarAppUtils::Params::log("setBinDir failed!",
|
||||
QuasarAppUtils::Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -674,10 +687,12 @@ bool ConfigParser::setTargetsRecursive(const QString &dir) {
|
||||
bool ConfigParser::setBinDir(const QString &dir, bool recursive) {
|
||||
QDir d(dir);
|
||||
if (dir.isEmpty() || !d.exists()) {
|
||||
DeployCore::verboseLog(dir + " dir not exits!");
|
||||
QuasarAppUtils::Params::log(dir + " dir not exits!",
|
||||
QuasarAppUtils::Debug);
|
||||
return false;
|
||||
}
|
||||
DeployCore::verboseLog("setBinDir check path: " + dir);
|
||||
QuasarAppUtils::Params::log("setBinDir check path: " + dir,
|
||||
QuasarAppUtils::Debug);
|
||||
QFileInfoList list;
|
||||
|
||||
if (recursive) {
|
||||
@ -859,16 +874,16 @@ bool ConfigParser::initQmakePrivate(const QString &qmake) {
|
||||
QDir dir(basePath);
|
||||
|
||||
if (!dir.cdUp()) {
|
||||
QuasarAppUtils::Params::verboseLog("fail init qmake",
|
||||
QuasarAppUtils::Params::log("fail init qmake",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("exec qmake fail!, try init qtDir from path:" + dir.absolutePath(),
|
||||
QuasarAppUtils::Params::log("exec qmake fail!, try init qtDir from path:" + dir.absolutePath(),
|
||||
QuasarAppUtils::Warning);
|
||||
|
||||
if (!setQtDir(dir.absolutePath())){
|
||||
QuasarAppUtils::Params::verboseLog("fail ini qmake",
|
||||
QuasarAppUtils::Params::log("fail ini qmake",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
@ -893,19 +908,22 @@ bool ConfigParser::initQmake() {
|
||||
if (!QuasarAppUtils::Params::isEndable("noCheckPATH") && isNeededQt()) {
|
||||
auto env = QProcessEnvironment::systemEnvironment();
|
||||
auto proc = DeployCore::findProcess(env.value("PATH"), "qmake");
|
||||
if (proc.isEmpty())
|
||||
if (proc.isEmpty()) {
|
||||
QuasarAppUtils::Params::log("The deployment target requir Qt libs, but init qmake is failed.",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
return initQmakePrivate(proc);
|
||||
}
|
||||
|
||||
qInfo() << "deploy only C libs because qmake is not found";
|
||||
QuasarAppUtils::Params::log("deploy only C libs because qmake is not found",
|
||||
QuasarAppUtils::Info);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
if (qtList.size() > 1) {
|
||||
QuasarAppUtils::Params::verboseLog("Your deployment targets were compiled by different qmake,"
|
||||
QuasarAppUtils::Params::log("Your deployment targets were compiled by different qmake,"
|
||||
"qt auto-capture is not possible. Use the -qmake flag to solve this problem.",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
@ -939,7 +957,7 @@ bool ConfigParser::setQmake(const QString &value) {
|
||||
|
||||
proc.start();
|
||||
if (!proc.waitForFinished(1000)) {
|
||||
QuasarAppUtils::Params::verboseLog("run qmake fail!");
|
||||
QuasarAppUtils::Params::log("run qmake fail!");
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -983,32 +1001,32 @@ bool ConfigParser::setQtDir(const QString &value) {
|
||||
QFileInfo info(value);
|
||||
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/bin"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt bin fail!");
|
||||
QuasarAppUtils::Params::log("get qt bin fail!");
|
||||
return false;
|
||||
}
|
||||
_config.qtDir.setBins(info.absoluteFilePath() + ("/bin"));
|
||||
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/lib"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt lib fail!");
|
||||
QuasarAppUtils::Params::log("get qt lib fail!");
|
||||
return false;
|
||||
}
|
||||
_config.qtDir.setLibs(info.absoluteFilePath() + ("/lib"));
|
||||
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/qml"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt qml fail!");
|
||||
QuasarAppUtils::Params::log("get qt qml fail!");
|
||||
} else {
|
||||
_config.qtDir.setQmls(info.absoluteFilePath() + ("/qml"));
|
||||
}
|
||||
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/plugins"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt plugins fail!");
|
||||
QuasarAppUtils::Params::log("get qt plugins fail!");
|
||||
} else {
|
||||
_config.qtDir.setPlugins(info.absoluteFilePath() + ("/plugins"));
|
||||
}
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/libexec"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt libexec fail!");
|
||||
QuasarAppUtils::Params::log("get qt libexec fail!");
|
||||
} else {
|
||||
_config.qtDir.setLibexecs(info.absoluteFilePath() + ("/libexec"));
|
||||
}
|
||||
@ -1018,13 +1036,13 @@ bool ConfigParser::setQtDir(const QString &value) {
|
||||
#endif
|
||||
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/translations"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt translations fail!");
|
||||
QuasarAppUtils::Params::log("get qt translations fail!");
|
||||
} else {
|
||||
_config.qtDir.setTranslations(info.absoluteFilePath() + ("/translations"));
|
||||
}
|
||||
|
||||
if (!QFile::exists(info.absoluteFilePath() + ("/resources"))) {
|
||||
QuasarAppUtils::Params::verboseLog("get qt resources fail!");
|
||||
QuasarAppUtils::Params::log("get qt resources fail!");
|
||||
} else {
|
||||
_config.qtDir.setResources(info.absoluteFilePath() + ("/resources"));
|
||||
}
|
||||
@ -1049,7 +1067,7 @@ void ConfigParser::setExtraPath(const QStringList &value) {
|
||||
QFileInfo info(i);
|
||||
if (info.isDir()) {
|
||||
if (_config.targets().contains(info.absoluteFilePath())) {
|
||||
QuasarAppUtils::Params::verboseLog("skip the extra lib path because it is target!",
|
||||
QuasarAppUtils::Params::log("skip the extra lib path because it is target!",
|
||||
QuasarAppUtils::Info);
|
||||
continue;
|
||||
}
|
||||
@ -1063,10 +1081,10 @@ void ConfigParser::setExtraPath(const QStringList &value) {
|
||||
|
||||
_config.extraPaths.addExtraPathsMasks({i});
|
||||
|
||||
QuasarAppUtils::Params::verboseLog(i + " added like a path mask",
|
||||
QuasarAppUtils::Params::log(i + " added like a path mask",
|
||||
QuasarAppUtils::Info);
|
||||
} else {
|
||||
QuasarAppUtils::Params::verboseLog(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",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
@ -1078,10 +1096,10 @@ void ConfigParser::setExtraNames(const QStringList &value) {
|
||||
if (i.size() > 1) {
|
||||
_config.extraPaths.addtExtraNamesMasks({i});
|
||||
|
||||
QuasarAppUtils::Params::verboseLog(i + " added like a file name mask",
|
||||
QuasarAppUtils::Params::log(i + " added like a file name mask",
|
||||
QuasarAppUtils::Info);
|
||||
} else {
|
||||
QuasarAppUtils::Params::verboseLog(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",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
@ -1141,7 +1159,8 @@ void ConfigParser::initEnvirement() {
|
||||
_config.envirement.addEnv(dirs);
|
||||
|
||||
if (_config.envirement.size() < 2) {
|
||||
qWarning() << "system environment is empty";
|
||||
QuasarAppUtils::Params::log("system environment is empty",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1219,5 +1238,5 @@ ConfigParser::ConfigParser(FileManager *filemanager, DependenciesScanner* scaner
|
||||
_config.appDir = QuasarAppUtils::Params::getStrArg("appPath");
|
||||
#endif
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("appDir = " + _config.appDir);
|
||||
QuasarAppUtils::Params::log("appDir = " + _config.appDir);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ QMultiMap<LibPriority, LibInfo> DependenciesScanner::getLibsFromEnvirement(
|
||||
}
|
||||
|
||||
if (!fillLibInfo(info, lib)) {
|
||||
QuasarAppUtils::Params::verboseLog(
|
||||
QuasarAppUtils::Params::log(
|
||||
"error extract lib info from " + lib + "(" + libName + ")",
|
||||
QuasarAppUtils::VerboseLvl::Warning);
|
||||
continue;
|
||||
@ -88,14 +88,15 @@ bool DependenciesScanner::fillLibInfo(LibInfo &info, const QString &file) const
|
||||
}
|
||||
|
||||
void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QString>& libStack) {
|
||||
QuasarAppUtils::Params::verboseLog("get recursive dependencies of " + lib.fullPath(),
|
||||
QuasarAppUtils::Params::log("get recursive dependencies of " + lib.fullPath(),
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
if (_scanedLibs.contains(lib.fullPath())) {
|
||||
auto scanedLib = _scanedLibs.value(lib.fullPath());
|
||||
|
||||
if (!scanedLib.isValid()) {
|
||||
qCritical() << "no valid lib in scaned libs list!";
|
||||
QuasarAppUtils::Params::log( "no valid lib in scaned libs list!",
|
||||
QuasarAppUtils::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -105,7 +106,7 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS
|
||||
}
|
||||
|
||||
if (libStack.contains(lib.fullPath())) {
|
||||
QuasarAppUtils::Params::verboseLog("A recursive dependency was found in library " + lib.fullPath(),
|
||||
QuasarAppUtils::Params::log("A recursive dependency was found in library " + lib.fullPath(),
|
||||
QuasarAppUtils::Warning);
|
||||
return;
|
||||
}
|
||||
@ -117,7 +118,7 @@ void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QS
|
||||
auto libs = getLibsFromEnvirement(i);
|
||||
|
||||
if (!libs.size()) {
|
||||
QuasarAppUtils::Params::verboseLog("lib for dependese " + i + " not findet!!",
|
||||
QuasarAppUtils::Params::log("lib for dependese " + i + " not findet!!",
|
||||
QuasarAppUtils::Warning);
|
||||
continue;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <QFileInfo>
|
||||
#include <QLibraryInfo>
|
||||
#include <configparser.h>
|
||||
#include <iostream>
|
||||
|
||||
//QString DeployCore::qtDir = "";
|
||||
//QStringList DeployCore::extraPaths = QStringList();
|
||||
@ -99,11 +100,11 @@ DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
|
||||
|
||||
void DeployCore::addQtModule(DeployCore::QtModule &module, const QString &path) {
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("current module " + QString::number(module),
|
||||
QuasarAppUtils::Params::log("current module " + QString::number(module),
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
auto mod = getQtModule(path);
|
||||
QuasarAppUtils::Params::verboseLog("add new module from path " + path +
|
||||
QuasarAppUtils::Params::log("add new module from path " + path +
|
||||
" module value " + QString::number(mod),
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
@ -135,12 +136,6 @@ LibPriority DeployCore::getLibPriority(const QString &lib) {
|
||||
return SystemLib;
|
||||
}
|
||||
|
||||
void DeployCore::verboseLog(const QString &str) {
|
||||
if (QuasarAppUtils::Params::isEndable("verbose")) {
|
||||
qDebug() << str;
|
||||
}
|
||||
}
|
||||
|
||||
#define C(X) QuasarAppUtils::Params::isEndable(X)
|
||||
RunMode DeployCore::getMode() {
|
||||
if (C("help") || C("h") || C("v") || C("version")) {
|
||||
@ -236,16 +231,13 @@ void DeployCore::help() {
|
||||
{"-releaseDate [package;val,val]", "Sets release date for package"},
|
||||
{"-icon [package;val,val]", "Sets path to icon for package"},
|
||||
{"-publisher [package;val,val]", "Sets publisher for package"},
|
||||
{"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style. Available styles: quasar "},
|
||||
{"-qifBanner [path/to/banner.png]", "Sets path to the banner png file."},
|
||||
{"-qifLogo [path/to/logo.png]", "Sets path to the logo png file."},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"Part 4 QtInstallFramework options", {
|
||||
{"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style. Available styles: quasar "},
|
||||
{"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style. Available styles: quasar, quasarDark "},
|
||||
{"-qifBanner [path/to/banner.png]", "Sets path to the banner png file."},
|
||||
{"-qifLogo [path/to/logo.png]", "Sets path to the logo png file."},
|
||||
}
|
||||
@ -339,8 +331,8 @@ QString DeployCore::getQtVersion() {
|
||||
}
|
||||
|
||||
void DeployCore::printVersion() {
|
||||
qInfo() << "CQtDeployer: " + getAppVersion() + " " + getAppVersionName();
|
||||
qInfo() << "Qt: " + getQtVersion();
|
||||
std::cout << QString{"CQtDeployer: " + getAppVersion() + " " + getAppVersionName()}.toStdString() << std::endl;
|
||||
std::cout << QString{"Qt: " + getQtVersion()}.toStdString() << std::endl;
|
||||
}
|
||||
|
||||
bool DeployCore::isExecutable(const QFileInfo& file) {
|
||||
@ -392,19 +384,19 @@ MSVCVersion DeployCore::getMSVC(const QString &_qtBin) {
|
||||
QDir dir = QFileInfo(_qtBin).absoluteFilePath();
|
||||
|
||||
if (!dir.cdUp()) {
|
||||
QuasarAppUtils::Params::verboseLog("is not standart qt repo");
|
||||
QuasarAppUtils::Params::log("is not standart qt repo");
|
||||
return static_cast<MSVCVersion>(res);
|
||||
}
|
||||
|
||||
auto msvcPath = dir.absolutePath();
|
||||
|
||||
if (!(dir.cdUp() && dir.cdUp())) {
|
||||
QuasarAppUtils::Params::verboseLog("is not standart qt repo");
|
||||
QuasarAppUtils::Params::log("is not standart qt repo");
|
||||
return static_cast<MSVCVersion>(res);
|
||||
}
|
||||
|
||||
if (!msvcPath.contains("msvc")) {
|
||||
QuasarAppUtils::Params::verboseLog("vcredis not defined");
|
||||
QuasarAppUtils::Params::log("vcredis not defined");
|
||||
return static_cast<MSVCVersion>(res);
|
||||
}
|
||||
|
||||
@ -441,7 +433,7 @@ QString DeployCore::getVCredist(const QString &_qtbinDir) {
|
||||
QDir dir = _qtbinDir;
|
||||
|
||||
if (!(dir.cdUp() && dir.cdUp() && dir.cdUp() && dir.cd("vcredist"))) {
|
||||
QuasarAppUtils::Params::verboseLog("redist not findet!");
|
||||
QuasarAppUtils::Params::log("redist not findet!");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,6 @@ public:
|
||||
static DeployCore::QtModule getQtModule(const QString& path);
|
||||
static void addQtModule(DeployCore::QtModule& module, const QString& path);
|
||||
|
||||
static void verboseLog(const QString &str);
|
||||
static RunMode getMode();
|
||||
static void help();
|
||||
static QStringList helpKeys();
|
||||
|
@ -61,12 +61,12 @@ void Envirement::addEnv(const QStringList &listDirs) {
|
||||
}
|
||||
|
||||
if (!QFileInfo(path).isDir()) {
|
||||
QuasarAppUtils::Params::verboseLog("is not dir!! :" + path);
|
||||
QuasarAppUtils::Params::log("is not dir!! :" + path);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_dataEnvironment.contains(path)) {
|
||||
QuasarAppUtils::Params::verboseLog ("Environment alredy added: " + path);
|
||||
QuasarAppUtils::Params::log ("Environment alredy added: " + path);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,8 @@
|
||||
#include <fstream>
|
||||
|
||||
bool Extracter::deployMSVC() {
|
||||
qInfo () << "try deploy msvc";
|
||||
QuasarAppUtils::Params::log("try deploy msvc",
|
||||
QuasarAppUtils::Info);
|
||||
auto msvcInstaller = DeployCore::getVCredist(DeployCore::_config->qtDir.getBins());
|
||||
|
||||
if (msvcInstaller.isEmpty()) {
|
||||
@ -51,16 +52,16 @@ bool Extracter::extractWebEngine() {
|
||||
|
||||
const auto &package = i.key();
|
||||
if (isWebEngine(package)) {
|
||||
auto webEngeneBin = DeployCore::_config->qtDir.getLibexecs();
|
||||
if (DeployCore::_config->qtDir.getQtPlatform() & Platform::Unix) {
|
||||
auto webEngeneBin = cnf->qtDir.getLibexecs();
|
||||
if (cnf->qtDir.getQtPlatform() & Platform::Unix) {
|
||||
webEngeneBin += "/QtWebEngineProcess";
|
||||
} else {
|
||||
webEngeneBin += "/QtWebEngineProcess.exe";
|
||||
}
|
||||
|
||||
auto destWebEngine = DeployCore::_config->getTargetDir() + "/" + package + DeployCore::_config->packages()[package].getBinOutDir();
|
||||
auto resOut = DeployCore::_config->getTargetDir() + "/" + package + DeployCore::_config->packages()[package].getResOutDir();
|
||||
auto res = DeployCore::_config->qtDir.getResources();
|
||||
auto destWebEngine = cnf->getTargetDir() + "/" + package + cnf->packages()[package].getBinOutDir();
|
||||
auto resOut = cnf->getTargetDir() + "/" + package + cnf->packages()[package].getResOutDir();
|
||||
auto res = cnf->qtDir.getResources();
|
||||
|
||||
if (!_fileManager->copyFile(webEngeneBin, destWebEngine)) {
|
||||
return false;
|
||||
@ -106,14 +107,14 @@ void Extracter::copyExtraPlugins(const QString& package) {
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
|
||||
for (auto extraPlugin : DeployCore::_config->extraPlugins) {
|
||||
for (auto extraPlugin : cnf->extraPlugins) {
|
||||
|
||||
if (!PathUtils::isPath(extraPlugin)) {
|
||||
extraPlugin = DeployCore::_config->qtDir.getPlugins() + "/" + extraPlugin;
|
||||
extraPlugin = cnf->qtDir.getPlugins() + "/" + extraPlugin;
|
||||
}
|
||||
|
||||
info.setFile(extraPlugin);
|
||||
if (info.isDir() && DeployCore::_config->qtDir.isQt(info.absoluteFilePath())) {
|
||||
if (info.isDir() && cnf->qtDir.isQt(info.absoluteFilePath())) {
|
||||
copyPlugin(info.absoluteFilePath(), package);
|
||||
|
||||
} else if (info.exists()) {
|
||||
@ -128,7 +129,8 @@ void Extracter::copyExtraPlugins(const QString& package) {
|
||||
void Extracter::copyPlugins(const QStringList &list, const QString& package) {
|
||||
for (const auto &plugin : list) {
|
||||
if (!copyPlugin(plugin, package)) {
|
||||
qWarning() << plugin << " not copied!";
|
||||
QuasarAppUtils::Params::log("not copied!",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
copyExtraPlugins(package);
|
||||
@ -148,8 +150,8 @@ void Extracter::extractAllTargets() {
|
||||
void Extracter::clear() {
|
||||
if (QuasarAppUtils::Params::isEndable("clear") ||
|
||||
QuasarAppUtils::Params::isEndable("force-clear")) {
|
||||
qInfo() << "clear old data";
|
||||
|
||||
QuasarAppUtils::Params::log("clear old data",
|
||||
QuasarAppUtils::Info);
|
||||
_fileManager->clear(DeployCore::_config->getTargetDir(),
|
||||
QuasarAppUtils::Params::isEndable("force-clear"));
|
||||
}
|
||||
@ -175,7 +177,7 @@ void Extracter::copyLibs(const QSet<QString> &files, const QString& package) {
|
||||
|
||||
for (const auto &file : files) {
|
||||
if (!_fileManager->smartCopyFile(file, targetPath + distro.getLibOutDir())) {
|
||||
QuasarAppUtils::Params::verboseLog(file + " not copied");
|
||||
QuasarAppUtils::Params::log(file + " not copied");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -192,7 +194,7 @@ void Extracter::copyFiles() {
|
||||
}
|
||||
|
||||
if (!QuasarAppUtils::Params::isEndable("noStrip") && !_fileManager->strip(cnf->getTargetDir())) {
|
||||
QuasarAppUtils::Params::verboseLog("strip failed!");
|
||||
QuasarAppUtils::Params::log("strip failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -206,7 +208,7 @@ void Extracter::copyTr() {
|
||||
for (auto i = cnf->packages().cbegin(); i != cnf->packages().cend(); ++i) {
|
||||
if (!copyTranslations(DeployCore::extractTranslation(_packageDependencyes[i.key()].neadedLibs()),
|
||||
i.key())) {
|
||||
QuasarAppUtils::Params::verboseLog("Failed to copy standard Qt translations",
|
||||
QuasarAppUtils::Params::log("Failed to copy standard Qt translations",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
@ -215,15 +217,16 @@ void Extracter::copyTr() {
|
||||
}
|
||||
|
||||
void Extracter::deploy() {
|
||||
qInfo() << "target deploy started!!";
|
||||
|
||||
QuasarAppUtils::Params::log("target deploy started!!",
|
||||
QuasarAppUtils::Info);
|
||||
clear();
|
||||
_cqt->smartMoveTargets();
|
||||
_scaner->setEnvironment(DeployCore::_config->envirement.environmentList());
|
||||
extractAllTargets();
|
||||
|
||||
if (DeployCore::_config->deployQml && !extractQml()) {
|
||||
qCritical() << "qml not extacted!";
|
||||
QuasarAppUtils::Params::log("qml not extacted!",
|
||||
QuasarAppUtils::Error);
|
||||
}
|
||||
|
||||
extractPlugins();
|
||||
@ -233,16 +236,16 @@ void Extracter::deploy() {
|
||||
copyTr();
|
||||
|
||||
if (!extractWebEngine()) {
|
||||
QuasarAppUtils::Params::verboseLog("deploy webEngine failed", QuasarAppUtils::Error);
|
||||
QuasarAppUtils::Params::log("deploy webEngine failed", QuasarAppUtils::Error);
|
||||
}
|
||||
|
||||
if (!deployMSVC()) {
|
||||
QuasarAppUtils::Params::verboseLog("deploy msvc failed");
|
||||
QuasarAppUtils::Params::log("deploy msvc failed");
|
||||
}
|
||||
|
||||
_metaFileManager->createRunMetaFiles();
|
||||
|
||||
qInfo() << "deploy done!";
|
||||
QuasarAppUtils::Params::log("deploy done!",
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
}
|
||||
|
||||
@ -271,7 +274,7 @@ bool Extracter::copyTranslations(const QStringList &list, const QString& package
|
||||
|
||||
if (isWebEngine(package)) {
|
||||
auto trOut = targetPath + distro.getTrOutDir();
|
||||
auto tr = DeployCore::_config->qtDir.getTranslations() + "/qtwebengine_locales";
|
||||
auto tr = cnf->qtDir.getTranslations() + "/qtwebengine_locales";
|
||||
_fileManager->copyFolder(tr, trOut + "/qtwebengine_locales");
|
||||
}
|
||||
|
||||
@ -306,8 +309,8 @@ void Extracter::extractLib(const QString &file,
|
||||
const QString& mask) {
|
||||
|
||||
assert(depMap);
|
||||
|
||||
qInfo() << "extract lib :" << file;
|
||||
QuasarAppUtils::Params::log("extract lib :" + file,
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
auto data = _scaner->scan(file);
|
||||
|
||||
@ -342,14 +345,13 @@ void Extracter::extractPluginLib(const QString& item, const QString& package) {
|
||||
}
|
||||
|
||||
bool Extracter::extractQmlAll() {
|
||||
|
||||
if (!QFileInfo::exists(DeployCore::_config->qtDir.getQmls())) {
|
||||
qWarning() << "qml dir wrong!";
|
||||
return false;
|
||||
}
|
||||
|
||||
auto cnf = DeployCore::_config;
|
||||
|
||||
if (!QFileInfo::exists(cnf->qtDir.getQmls())) {
|
||||
QuasarAppUtils::Params::log("qml dir wrong!",
|
||||
QuasarAppUtils::Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto i = cnf->packages().cbegin(); i != cnf->packages().cend(); ++i) {
|
||||
auto targetPath = cnf->getTargetDir() + "/" + i.key();
|
||||
@ -389,20 +391,22 @@ bool Extracter::extractQmlFromSource() {
|
||||
QFileInfo info(qmlInput);
|
||||
|
||||
if (!info.isDir()) {
|
||||
qCritical() << "extract qml fail! qml source dir not exits or is not dir " << qmlInput;
|
||||
QuasarAppUtils::Params::log("extract qml fail! qml source dir not exits or is not dir " + qmlInput,
|
||||
QuasarAppUtils::Error);
|
||||
continue;
|
||||
}
|
||||
QuasarAppUtils::Params::verboseLog("extractQmlFromSource " + info.absoluteFilePath());
|
||||
QuasarAppUtils::Params::log("extractQmlFromSource " + info.absoluteFilePath());
|
||||
|
||||
if (!QFileInfo::exists(cnf->qtDir.getQmls())) {
|
||||
qWarning() << "qml dir wrong!";
|
||||
QuasarAppUtils::Params::log("qml dir wrong!",
|
||||
QuasarAppUtils::Warning);
|
||||
continue;
|
||||
}
|
||||
|
||||
QML ownQmlScaner(cnf->qtDir.getQmls());
|
||||
|
||||
if (!ownQmlScaner.scan(plugins, info.absoluteFilePath())) {
|
||||
QuasarAppUtils::Params::verboseLog("qml scaner run failed!",
|
||||
QuasarAppUtils::Params::log("qml scaner run failed!",
|
||||
QuasarAppUtils::Error);
|
||||
continue;
|
||||
}
|
||||
@ -451,7 +455,7 @@ void Extracter::extract(const QString &file,
|
||||
|
||||
extractLib(file, depMap, mask);
|
||||
} else {
|
||||
QuasarAppUtils::Params::verboseLog("file with sufix " + sufix + " not supported!");
|
||||
QuasarAppUtils::Params::log("file with sufix " + sufix + " not supported!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ bool FileManager::addToDeployed(const QString& path) {
|
||||
|| completeSufix.toLower() == "sh")) {
|
||||
|
||||
if (!QFile::setPermissions(path, static_cast<QFile::Permission>(0x7777))) {
|
||||
QuasarAppUtils::Params::verboseLog("permishens set fail", QuasarAppUtils::Warning);
|
||||
QuasarAppUtils::Params::log("permishens set fail", QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ bool FileManager::addToDeployed(const QString& path) {
|
||||
|
||||
DWORD attribute = GetFileAttributesA(stdString.c_str());
|
||||
if (!SetFileAttributesA(stdString.c_str(), attribute & static_cast<DWORD>(~FILE_ATTRIBUTE_HIDDEN))) {
|
||||
QuasarAppUtils::Params::verboseLog("attribute set fail", QuasarAppUtils::Warning);
|
||||
QuasarAppUtils::Params::log("attribute set fail", QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -101,7 +101,7 @@ bool FileManager::strip(const QString &dir) const {
|
||||
QFileInfo info(dir);
|
||||
|
||||
if (!info.exists()) {
|
||||
QuasarAppUtils::Params::verboseLog("dir not exits!");
|
||||
QuasarAppUtils::Params::log("dir not exits!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
}
|
||||
|
||||
if (!copy) {
|
||||
QuasarAppUtils::Params::verboseLog(((isMove)? "skip move :": "skip copy :" + file));
|
||||
QuasarAppUtils::Params::log(((isMove)? "skip move :": "skip copy :" + file));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -180,15 +180,15 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
return false;
|
||||
}
|
||||
|
||||
qInfo() << ((isMove)? "move :": "copy :") << file;
|
||||
|
||||
QuasarAppUtils::Params::log(((isMove)? "move :": "copy :") + file,
|
||||
QuasarAppUtils::Info);
|
||||
QFile sourceFile(file);
|
||||
|
||||
if (!((isMove)?
|
||||
sourceFile.rename(tergetFile):
|
||||
sourceFile.copy(tergetFile))) {
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("Qt Operation fail " + file + " >> " + tergetFile +
|
||||
QuasarAppUtils::Params::log("Qt Operation fail " + file + " >> " + tergetFile +
|
||||
" Qt error: " + sourceFile.errorString(),
|
||||
QuasarAppUtils::Warning);
|
||||
|
||||
@ -206,7 +206,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
dst << src.rdbuf();
|
||||
|
||||
if (!QFileInfo::exists(tergetFile)) {
|
||||
QuasarAppUtils::Params::verboseLog("std Operation fail file not copied. "
|
||||
QuasarAppUtils::Params::log("std Operation fail file not copied. "
|
||||
"Сheck if you have access to the target dir",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
@ -220,7 +220,8 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
} else {
|
||||
|
||||
if (QFileInfo(tergetFile).exists()) {
|
||||
qInfo() << tergetFile << " already exists!";
|
||||
QuasarAppUtils::Params::log(tergetFile + " already exists!",
|
||||
QuasarAppUtils::Info);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -244,16 +245,18 @@ bool FileManager::smartCopyFile(const QString &file,
|
||||
|
||||
if (file.contains(config->getTargetDir(), ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||
if (!moveFile(file, target, mask)) {
|
||||
QuasarAppUtils::Params::verboseLog(" file not moved! try copy");
|
||||
QuasarAppUtils::Params::log(" file not moved! try copy");
|
||||
|
||||
if (!copyFile(file, target, mask, ifFileTarget)) {
|
||||
qCritical() << "not copy target to bin dir " << file;
|
||||
QuasarAppUtils::Params::log("not copy target to bin dir " + file,
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!copyFile(file, target, mask, ifFileTarget)) {
|
||||
qCritical() << "not copy target to bin dir " << file;
|
||||
QuasarAppUtils::Params::log("not copy target to bin dir " + file,
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -287,7 +290,7 @@ bool FileManager::copyFolder(const QString &from, const QString &to, const QStri
|
||||
}
|
||||
|
||||
if (!skipFilter.isEmpty()) {
|
||||
QuasarAppUtils::Params::verboseLog(
|
||||
QuasarAppUtils::Params::log(
|
||||
item.absoluteFilePath() + " ignored by filter " + skipFilter,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
continue;
|
||||
@ -301,14 +304,14 @@ bool FileManager::copyFolder(const QString &from, const QString &to, const QStri
|
||||
|
||||
if (config)
|
||||
if (auto rule = config->ignoreList.isIgnore(info)) {
|
||||
QuasarAppUtils::Params::verboseLog(
|
||||
QuasarAppUtils::Params::log(
|
||||
item.absoluteFilePath() + " ignored by rule " + rule->label,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!copyFile(item.absoluteFilePath(), to , mask)) {
|
||||
QuasarAppUtils::Params::verboseLog(
|
||||
QuasarAppUtils::Params::log(
|
||||
"not copied file " + to + "/" + item.fileName(),
|
||||
QuasarAppUtils::VerboseLvl::Warning);
|
||||
continue;
|
||||
@ -355,16 +358,16 @@ bool FileManager::moveFolder(const QString &from, const QString &to, const QStri
|
||||
}
|
||||
|
||||
void FileManager::clear(const QString& targetDir, bool force) {
|
||||
qInfo() << "clear start!";
|
||||
|
||||
QuasarAppUtils::Params::log( "clear start!",
|
||||
QuasarAppUtils::Info);
|
||||
if (force) {
|
||||
qInfo() << "clear force! " << targetDir;
|
||||
|
||||
QuasarAppUtils::Params::log("clear force! " + targetDir,
|
||||
QuasarAppUtils::Info);
|
||||
if (QDir(targetDir).removeRecursively()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("Remove target Dir fail, try remove old deployemend files",
|
||||
QuasarAppUtils::Params::log("Remove target Dir fail, try remove old deployemend files",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
@ -383,14 +386,16 @@ void FileManager::clear(const QString& targetDir, bool force) {
|
||||
|
||||
if (index.value().isFile()) {
|
||||
if (removeFile(index.value())) {
|
||||
qInfo() << "Remove " << index.value().absoluteFilePath() << " because it is deployed file";
|
||||
QuasarAppUtils::Params::log("Remove " + index.value().absoluteFilePath() + " because it is deployed file",
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
|
||||
} else {
|
||||
QDir qdir(index.value().absoluteFilePath());
|
||||
if (!qdir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries).count()) {
|
||||
qdir.removeRecursively();
|
||||
qInfo() << "Remove " << index.value().absoluteFilePath() << " because it is empty";
|
||||
QuasarAppUtils::Params::log("Remove " + index.value().absoluteFilePath() + " because it is empty",
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -407,11 +412,11 @@ bool FileManager::copyFile(const QString &file, const QString &target,
|
||||
bool FileManager::removeFile(const QFileInfo &file) {
|
||||
|
||||
if (!QFile::remove(file.absoluteFilePath())) {
|
||||
QuasarAppUtils::Params::verboseLog("Qt Operation fail (remove file) " + file.absoluteFilePath(),
|
||||
QuasarAppUtils::Params::log("Qt Operation fail (remove file) " + file.absoluteFilePath(),
|
||||
QuasarAppUtils::Warning);
|
||||
|
||||
if (remove(file.absoluteFilePath().toLatin1())) {
|
||||
QuasarAppUtils::Params::verboseLog("std Operation fail file not removed." + file.absoluteFilePath(),
|
||||
QuasarAppUtils::Params::log("std Operation fail file not removed." + file.absoluteFilePath(),
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ void IgnoreRule::addRule(const IgnoreData &rule) {
|
||||
|
||||
bool IgnoreRule::check(const LibInfo &info, const QString& ignoreLabel) const {
|
||||
if (info.fullPath().contains(ignoreLabel, Qt::CaseInsensitive)) {
|
||||
QuasarAppUtils::Params::verboseLog(info.fullPath() + " ignored by filter" + ignoreLabel);
|
||||
QuasarAppUtils::Params::log(info.fullPath() + " ignored by filter" + ignoreLabel);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -210,11 +210,12 @@ void MetaFileManager::createRunMetaFiles() {
|
||||
for (auto i = DeployCore::_config->targets().cbegin(); i != DeployCore::_config->targets().cend(); ++i) {
|
||||
|
||||
if (!createRunScript(i.key())) {
|
||||
qCritical() << "run script not created!";
|
||||
QuasarAppUtils::Params::log("run script not created!",
|
||||
QuasarAppUtils::Error);
|
||||
}
|
||||
|
||||
if (!createQConf(i.key())) {
|
||||
QuasarAppUtils::Params::verboseLog("create qt.conf failr", QuasarAppUtils::Warning);
|
||||
QuasarAppUtils::Params::log("create qt.conf failr", QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ bool Packing::create() {
|
||||
QString erroutLog = _proc->readAllStandardError();
|
||||
auto message = QString("message = %0").arg(stdoutLog + " " + erroutLog);
|
||||
|
||||
QuasarAppUtils::Params::verboseLog(message,
|
||||
QuasarAppUtils::Params::log(message,
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
_pakage->removeTemplate();
|
||||
@ -72,10 +72,12 @@ void Packing::handleOutputUpdate() {
|
||||
QByteArray erroutLog = _proc->readAllStandardError();
|
||||
|
||||
if (stdoutLog.size())
|
||||
qInfo() << stdoutLog;
|
||||
QuasarAppUtils::Params::log(stdoutLog,
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
if (erroutLog.size())
|
||||
qInfo() << erroutLog;
|
||||
QuasarAppUtils::Params::log(erroutLog,
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,13 +72,13 @@ bool PluginsParser::scan(const QString& pluginPath,
|
||||
|
||||
auto plugins = QDir(pluginPath).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("Modules Number :" + QString::number(qtModules), QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Params::log("Modules Number :" + QString::number(qtModules), QuasarAppUtils::Info);
|
||||
|
||||
for (const auto &plugin: plugins) {
|
||||
auto module = qtModuleForPlugin(plugin.fileName());
|
||||
if (qtModules & module) {
|
||||
|
||||
QuasarAppUtils::Params::verboseLog("deploye plugin : " + plugin.absoluteFilePath(), QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Params::log("deploye plugin : " + plugin.absoluteFilePath(), QuasarAppUtils::Info);
|
||||
|
||||
resDependencies.append(plugin.absoluteFilePath());
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ bool QML::deployPath(const QString &path, QStringList &res) {
|
||||
for (auto info : infoList) {
|
||||
if (info.fileName().contains(".so.debug") ||
|
||||
info.fileName().contains("d.dll")) {
|
||||
QuasarAppUtils::Params::verboseLog("sciped debug lib " +
|
||||
QuasarAppUtils::Params::log("sciped debug lib " +
|
||||
info.absoluteFilePath());
|
||||
continue;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
||||
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
||||
<Name>CQtDeployer</Name>
|
||||
<Version>1.4.1.0</Version>
|
||||
<Version>1.4.1.2</Version>
|
||||
<Title>CQtDeployer</Title>
|
||||
<Publisher>QuasarApp</Publisher>
|
||||
<StartMenuDir>CQtDeployer</StartMenuDir>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
||||
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
||||
<Name>CQtDeployer</Name>
|
||||
<Version>1.4.1.0</Version>
|
||||
<Version>1.4.1.2</Version>
|
||||
<Title>CQtDeployer</Title>
|
||||
<Publisher>QuasarApp</Publisher>
|
||||
<StartMenuDir>CQtDeployer</StartMenuDir>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<Package>
|
||||
<DisplayName>CQtDeployer 1.4</DisplayName>
|
||||
<Description>CQtDeployer 1.4</Description>
|
||||
<Version>1.4.1.0</Version>
|
||||
<Version>1.4.1.2</Version>
|
||||
<Default>true</Default>
|
||||
<ForcedInstallation>false</ForcedInstallation>
|
||||
<Script>installscript.js</Script>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 0dda7b918953579ab4009af8021f3de651e48531
|
||||
Subproject commit b932e8c65e9a9918e9a3ea35f345f8e35b275895
|
@ -47,7 +47,7 @@ private:
|
||||
|
||||
QSet<QString> getFilesTree(const QStringList& keys = {});
|
||||
|
||||
void runTestParams(const QStringList &list,
|
||||
void runTestParams(QStringList list,
|
||||
QSet<QString> *tree = nullptr,
|
||||
const QStringList &checkableKeys = {},
|
||||
bool noWarnings = false,
|
||||
@ -932,7 +932,7 @@ void deploytest::testSetTargetDir() {
|
||||
|
||||
}
|
||||
|
||||
void deploytest::runTestParams(const QStringList &list,
|
||||
void deploytest::runTestParams(QStringList list,
|
||||
QSet<QString>* tree,
|
||||
const QStringList &checkableKeys,
|
||||
bool noWarnings, bool onlySize) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
name: cqtdeployer # you probably want to 'snapcraft register <name>'
|
||||
version: '1.4.1.0' # just for humans, typically '1.2+git' or '1.3.2'
|
||||
version: '1.4.1.2' # just for humans, typically '1.2+git' or '1.3.2'
|
||||
summary: deploy your qt projects # 79 char long summary
|
||||
description: |
|
||||
Console app for deploy qt libs.
|
||||
|
2
test.pri
2
test.pri
@ -15,7 +15,7 @@ deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir
|
||||
|
||||
!android:test.depends = deployTest
|
||||
unix:!android:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000
|
||||
win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o $$PWD/buildLog.log
|
||||
win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000
|
||||
|
||||
contains(QMAKE_HOST.os, Linux):{
|
||||
win32:test.commands =
|
||||
|
Loading…
x
Reference in New Issue
Block a user