mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-08 15:39:35 +00:00
Merge branch 'v1.4' into qif
This commit is contained in:
commit
20d7df7e2e
@ -53,6 +53,7 @@ SOURCES += \
|
|||||||
deploy.cpp \
|
deploy.cpp \
|
||||||
deploycore.cpp \
|
deploycore.cpp \
|
||||||
envirement.cpp \
|
envirement.cpp \
|
||||||
|
extra.cpp \
|
||||||
extracter.cpp \
|
extracter.cpp \
|
||||||
filemanager.cpp \
|
filemanager.cpp \
|
||||||
idistribution.cpp \
|
idistribution.cpp \
|
||||||
@ -68,6 +69,7 @@ SOURCES += \
|
|||||||
qif.cpp \
|
qif.cpp \
|
||||||
qml.cpp \
|
qml.cpp \
|
||||||
libinfo.cpp \
|
libinfo.cpp \
|
||||||
|
qtdir.cpp \
|
||||||
targetinfo.cpp
|
targetinfo.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
@ -80,6 +82,7 @@ HEADERS += \
|
|||||||
deploy_global.h \
|
deploy_global.h \
|
||||||
deploycore.h \
|
deploycore.h \
|
||||||
envirement.h \
|
envirement.h \
|
||||||
|
extra.h \
|
||||||
extracter.h \
|
extracter.h \
|
||||||
filemanager.h \
|
filemanager.h \
|
||||||
idistribution.h \
|
idistribution.h \
|
||||||
@ -95,6 +98,7 @@ HEADERS += \
|
|||||||
qif.h \
|
qif.h \
|
||||||
qml.h \
|
qml.h \
|
||||||
libinfo.h \
|
libinfo.h \
|
||||||
|
qtdir.h \
|
||||||
targetinfo.h
|
targetinfo.h
|
||||||
|
|
||||||
STATECHARTS +=
|
STATECHARTS +=
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include "pathutils.h"
|
#include "pathutils.h"
|
||||||
#include "quasarapp.h"
|
#include "quasarapp.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
bool ConfigParser::parseParams() {
|
bool ConfigParser::parseParams() {
|
||||||
|
|
||||||
auto path = QuasarAppUtils::Params::getStrArg("confFile");
|
auto path = QuasarAppUtils::Params::getStrArg("confFile");
|
||||||
@ -558,29 +560,44 @@ void ConfigParser::initIgnoreList()
|
|||||||
_config.ignoreList.addRule(addRuleUnix("libnss"));
|
_config.ignoreList.addRule(addRuleUnix("libnss"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// envWin.addEnv(recursiveInvairement("C:/Windows", 3), "", "");
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
// ruleWin.prority = ExtraLib;
|
auto path = env.value("PATH");
|
||||||
// ruleWin.platform = Win;
|
auto winPath = findWindowsPath(path);
|
||||||
// ruleWin.enfirement = envWin;
|
|
||||||
|
|
||||||
// auto addRuleWin = [&ruleWin](const QString & lib) {
|
envWin.addEnv(recursiveInvairement(winPath + "/System32", 2), "", "");
|
||||||
// ruleWin.label = lib;
|
envWin.addEnv(recursiveInvairement(winPath + "/SysWOW64", 2), "", "");
|
||||||
// return ruleWin;
|
|
||||||
// };
|
ruleWin.prority = SystemLib;
|
||||||
|
ruleWin.platform = Win;
|
||||||
|
ruleWin.enfirement = envWin;
|
||||||
|
|
||||||
|
auto addRuleWin = [&ruleWin](const QString & lib) {
|
||||||
|
ruleWin.label = lib;
|
||||||
|
return ruleWin;
|
||||||
|
};
|
||||||
|
|
||||||
|
// win and core libs : see https://en.wikipedia.org/wiki/Microsoft_Windows_library_files
|
||||||
|
_config.ignoreList.addRule(addRuleWin("Hal.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("NTDLL.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("KERNEL32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("GDI32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("USER32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("COMCTL32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("COMDLG32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("WS2_32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("ADVAPI32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("NETAPI32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("OLE32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("SHSCRAP.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("WINMM.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("IMM32.DLL"));
|
||||||
|
_config.ignoreList.addRule(addRuleWin("KernelBase.DLL"));
|
||||||
|
|
||||||
// _config.ignoreList.addRule(addRuleWin("kernelBase"));
|
|
||||||
// _config.ignoreList.addRule(addRuleWin("gdi32"));
|
|
||||||
// _config.ignoreList.addRule(addRuleWin("kernel32"));
|
|
||||||
// _config.ignoreList.addRule(addRuleWin("msvcrt"));
|
|
||||||
// _config.ignoreList.addRule(addRuleWin("user32"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigParser::initIgnoreEnvList() {
|
void ConfigParser::initIgnoreEnvList() {
|
||||||
QStringList ignoreEnvList;
|
QStringList ignoreEnvList;
|
||||||
|
|
||||||
// remove windows from envirement,
|
|
||||||
ignoreEnvList.push_back(":/Windows");
|
|
||||||
|
|
||||||
if (QuasarAppUtils::Params::isEndable("ignoreEnv")) {
|
if (QuasarAppUtils::Params::isEndable("ignoreEnv")) {
|
||||||
auto ignoreList = QuasarAppUtils::Params::getStrArg("ignoreEnv").
|
auto ignoreList = QuasarAppUtils::Params::getStrArg("ignoreEnv").
|
||||||
split(DeployCore::getSeparator(0));
|
split(DeployCore::getSeparator(0));
|
||||||
@ -696,31 +713,31 @@ bool ConfigParser::setQmake(const QString &value) {
|
|||||||
|
|
||||||
for (auto &value : list) {
|
for (auto &value : list) {
|
||||||
if (value.contains("QT_INSTALL_LIBS")) {
|
if (value.contains("QT_INSTALL_LIBS")) {
|
||||||
_config.qtDir.libs = getPathFrmoQmakeLine(value);
|
_config.qtDir.setLibs(getPathFrmoQmakeLine(value));
|
||||||
} else if (value.contains("QT_INSTALL_LIBEXECS")) {
|
} else if (value.contains("QT_INSTALL_LIBEXECS")) {
|
||||||
_config.qtDir.libexecs = getPathFrmoQmakeLine(value);
|
_config.qtDir.setLibexecs(getPathFrmoQmakeLine(value));
|
||||||
} else if (value.contains("QT_INSTALL_BINS")) {
|
} else if (value.contains("QT_INSTALL_BINS")) {
|
||||||
_config.qtDir.bins = getPathFrmoQmakeLine(value);
|
_config.qtDir.setBins(getPathFrmoQmakeLine(value));
|
||||||
} else if (value.contains("QT_INSTALL_PLUGINS")) {
|
} else if (value.contains("QT_INSTALL_PLUGINS")) {
|
||||||
_config.qtDir.plugins = getPathFrmoQmakeLine(value);
|
_config.qtDir.setPlugins(getPathFrmoQmakeLine(value));
|
||||||
} else if (value.contains("QT_INSTALL_QML")) {
|
} else if (value.contains("QT_INSTALL_QML")) {
|
||||||
_config.qtDir.qmls = getPathFrmoQmakeLine(value);
|
_config.qtDir.setQmls(getPathFrmoQmakeLine(value));
|
||||||
} else if (value.contains("QT_INSTALL_TRANSLATIONS")) {
|
} else if (value.contains("QT_INSTALL_TRANSLATIONS")) {
|
||||||
_config.qtDir.translations = getPathFrmoQmakeLine(value);
|
_config.qtDir.setTranslations(getPathFrmoQmakeLine(value));
|
||||||
} else if (value.contains("QT_INSTALL_DATA")) {
|
} else if (value.contains("QT_INSTALL_DATA")) {
|
||||||
_config.qtDir.resources = getPathFrmoQmakeLine(value) + "/resources";
|
_config.qtDir.setResources(getPathFrmoQmakeLine(value) + "/resources");
|
||||||
} else if (value.contains("QMAKE_XSPEC")) {
|
} else if (value.contains("QMAKE_XSPEC")) {
|
||||||
auto val = value.split(':').value(1);
|
auto val = value.split(':').value(1);
|
||||||
|
|
||||||
if (val.contains("win32")) {
|
if (val.contains("win32")) {
|
||||||
_config.qtDir.qtPlatform = Platform::Win;
|
_config.qtDir.setQtPlatform(Platform::Win);
|
||||||
} else {
|
} else {
|
||||||
_config.qtDir.qtPlatform = Platform::Unix;
|
_config.qtDir.setQtPlatform(Platform::Unix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_config.envirement.addEnv(_config.qtDir.libs, _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(_config.qtDir.getLibs(), _config.appDir, _config.getTargetDir());
|
||||||
_config.envirement.addEnv(_config.qtDir.bins, _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(_config.qtDir.getBins(), _config.appDir, _config.getTargetDir());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -733,58 +750,58 @@ bool ConfigParser::setQtDir(const QString &value) {
|
|||||||
QuasarAppUtils::Params::verboseLog("get qt bin fail!");
|
QuasarAppUtils::Params::verboseLog("get qt bin fail!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_config.qtDir.bins = info.absoluteFilePath() + ("/bin");
|
_config.qtDir.setBins(info.absoluteFilePath() + ("/bin"));
|
||||||
|
|
||||||
if (!QFile::exists(info.absoluteFilePath() + ("/lib"))) {
|
if (!QFile::exists(info.absoluteFilePath() + ("/lib"))) {
|
||||||
QuasarAppUtils::Params::verboseLog("get qt lib fail!");
|
QuasarAppUtils::Params::verboseLog("get qt lib fail!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_config.qtDir.libs = info.absoluteFilePath() + ("/lib");
|
_config.qtDir.setLibs(info.absoluteFilePath() + ("/lib"));
|
||||||
|
|
||||||
if (!QFile::exists(info.absoluteFilePath() + ("/qml"))) {
|
if (!QFile::exists(info.absoluteFilePath() + ("/qml"))) {
|
||||||
QuasarAppUtils::Params::verboseLog("get qt qml fail!");
|
QuasarAppUtils::Params::verboseLog("get qt qml fail!");
|
||||||
} else {
|
} else {
|
||||||
_config.qtDir.qmls = info.absoluteFilePath() + ("/qml");
|
_config.qtDir.setQmls(info.absoluteFilePath() + ("/qml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!QFile::exists(info.absoluteFilePath() + ("/plugins"))) {
|
if (!QFile::exists(info.absoluteFilePath() + ("/plugins"))) {
|
||||||
QuasarAppUtils::Params::verboseLog("get qt plugins fail!");
|
QuasarAppUtils::Params::verboseLog("get qt plugins fail!");
|
||||||
} else {
|
} else {
|
||||||
_config.qtDir.plugins = 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::verboseLog("get qt libexec fail!");
|
QuasarAppUtils::Params::verboseLog("get qt libexec fail!");
|
||||||
} else {
|
} else {
|
||||||
_config.qtDir.libexecs = info.absoluteFilePath() + ("/libexec");
|
_config.qtDir.setLibexecs(info.absoluteFilePath() + ("/libexec"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
_config.qtDir.libexecs = info.absoluteFilePath() + ("/bin");
|
_config.qtDir.setLibexecs(info.absoluteFilePath() + ("/bin"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!QFile::exists(info.absoluteFilePath() + ("/translations"))) {
|
if (!QFile::exists(info.absoluteFilePath() + ("/translations"))) {
|
||||||
QuasarAppUtils::Params::verboseLog("get qt translations fail!");
|
QuasarAppUtils::Params::verboseLog("get qt translations fail!");
|
||||||
} else {
|
} else {
|
||||||
_config.qtDir.translations = info.absoluteFilePath() + ("/translations");
|
_config.qtDir.setTranslations(info.absoluteFilePath() + ("/translations"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!QFile::exists(info.absoluteFilePath() + ("/resources"))) {
|
if (!QFile::exists(info.absoluteFilePath() + ("/resources"))) {
|
||||||
QuasarAppUtils::Params::verboseLog("get qt resources fail!");
|
QuasarAppUtils::Params::verboseLog("get qt resources fail!");
|
||||||
} else {
|
} else {
|
||||||
_config.qtDir.resources = info.absoluteFilePath() + ("/resources");
|
_config.qtDir.setResources(info.absoluteFilePath() + ("/resources"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
_config.qtDir.qtPlatform = Platform::Unix;
|
_config.qtDir.setQtPlatform(Platform::Unix);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
_config.qtDir.qtPlatform = Platform::Win;
|
_config.qtDir.setQtPlatform(Platform::Win);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_config.envirement.addEnv(_config.qtDir.libs, _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(_config.qtDir.getLibs(), _config.appDir, _config.getTargetDir());
|
||||||
_config.envirement.addEnv(_config.qtDir.bins, _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(_config.qtDir.getBins(), _config.appDir, _config.getTargetDir());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -803,12 +820,12 @@ void ConfigParser::setExtraPath(const QStringList &value) {
|
|||||||
|
|
||||||
dir.setPath(info.absoluteFilePath());
|
dir.setPath(info.absoluteFilePath());
|
||||||
auto extraDirs = getSetDirsRecursive(QDir::fromNativeSeparators(info.absoluteFilePath()), _config.depchLimit);
|
auto extraDirs = getSetDirsRecursive(QDir::fromNativeSeparators(info.absoluteFilePath()), _config.depchLimit);
|
||||||
_config.extraPaths.extraPaths.unite(extraDirs);
|
_config.extraPaths.addExtraPaths(extraDirs);
|
||||||
|
|
||||||
_config.envirement.addEnv(recursiveInvairement(dir), _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(recursiveInvairement(dir), _config.appDir, _config.getTargetDir());
|
||||||
} else if (i.size() > 1) {
|
} else if (i.size() > 1) {
|
||||||
|
|
||||||
_config.extraPaths.extraPathsMasks.insert(i);
|
_config.extraPaths.addExtraPathsMasks({i});
|
||||||
|
|
||||||
QuasarAppUtils::Params::verboseLog(i + " added like a path mask",
|
QuasarAppUtils::Params::verboseLog(i + " added like a path mask",
|
||||||
QuasarAppUtils::Info);
|
QuasarAppUtils::Info);
|
||||||
@ -823,7 +840,7 @@ void ConfigParser::setExtraPath(const QStringList &value) {
|
|||||||
void ConfigParser::setExtraNames(const QStringList &value) {
|
void ConfigParser::setExtraNames(const QStringList &value) {
|
||||||
for (auto i : value) {
|
for (auto i : value) {
|
||||||
if (i.size() > 1) {
|
if (i.size() > 1) {
|
||||||
_config.extraPaths.extraPathsMasks.insert(i);
|
_config.extraPaths.addtExtraNamesMasks({i});
|
||||||
|
|
||||||
QuasarAppUtils::Params::verboseLog(i + " added like a file name mask",
|
QuasarAppUtils::Params::verboseLog(i + " added like a file name mask",
|
||||||
QuasarAppUtils::Info);
|
QuasarAppUtils::Info);
|
||||||
@ -883,16 +900,44 @@ QString ConfigParser::recursiveInvairement(const QString &dir, int depch) {
|
|||||||
return recursiveInvairement(_dir, 0, depch);
|
return recursiveInvairement(_dir, 0, depch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ConfigParser::findWindowsPath(const QString& path) const {
|
||||||
|
auto list = path.split(';');
|
||||||
|
QString win_magic = "windows";
|
||||||
|
|
||||||
|
for (auto i: list ) {
|
||||||
|
int index = i.indexOf(win_magic, 0, Qt::CaseInsensitive);
|
||||||
|
if (index > 0 && i.size() == index + win_magic.size()) {
|
||||||
|
return QDir::fromNativeSeparators(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "C:/" + win_magic;
|
||||||
|
}
|
||||||
|
|
||||||
void ConfigParser::initEnvirement() {
|
void ConfigParser::initEnvirement() {
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
|
|
||||||
|
auto path = env.value("PATH");
|
||||||
|
|
||||||
_config.envirement.addEnv(env.value("LD_LIBRARY_PATH"), _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(env.value("LD_LIBRARY_PATH"), _config.appDir, _config.getTargetDir());
|
||||||
_config.envirement.addEnv(env.value("PATH"), _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(path, _config.appDir, _config.getTargetDir());
|
||||||
|
|
||||||
|
|
||||||
QStringList dirs;
|
QStringList dirs;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
|
||||||
dirs.append(getDirsRecursive("/lib", 5));
|
dirs.append(getDirsRecursive("/lib", 5));
|
||||||
dirs.append(getDirsRecursive("/usr/lib", 5));
|
dirs.append(getDirsRecursive("/usr/lib", 5));
|
||||||
|
#else
|
||||||
|
auto winPath = findWindowsPath(path);
|
||||||
|
dirs.append(getDirsRecursive(winPath + "/System32", 2));
|
||||||
|
dirs.append(getDirsRecursive(winPath + "/SysWOW64", 2));
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (auto &&i : dirs) {
|
for (auto &&i : dirs) {
|
||||||
_config.envirement.addEnv(i, _config.appDir, _config.getTargetDir());
|
_config.envirement.addEnv(i, _config.appDir, _config.getTargetDir());
|
||||||
@ -974,4 +1019,3 @@ ConfigParser::ConfigParser(FileManager *filemanager, DependenciesScanner* scaner
|
|||||||
|
|
||||||
QuasarAppUtils::Params::verboseLog("appDir = " + _config.appDir);
|
QuasarAppUtils::Params::verboseLog("appDir = " + _config.appDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ private:
|
|||||||
|
|
||||||
QString readKeyArray(int separatorLvl, const QJsonArray &array, const QString &confFileDir) const;
|
QString readKeyArray(int separatorLvl, const QJsonArray &array, const QString &confFileDir) const;
|
||||||
QJsonValue writeKeyArray(int separatorLvl, const QString ¶meter, const QString &confFileDir) const;
|
QJsonValue writeKeyArray(int separatorLvl, const QString ¶meter, const QString &confFileDir) const;
|
||||||
|
QString findWindowsPath(const QString &path) const;
|
||||||
public:
|
public:
|
||||||
ConfigParser(FileManager *filemanager, DependenciesScanner *scaner);
|
ConfigParser(FileManager *filemanager, DependenciesScanner *scaner);
|
||||||
bool parseParams();
|
bool parseParams();
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "dependenciesscanner.h"
|
#include "dependenciesscanner.h"
|
||||||
#include "deploycore.h"
|
#include "deploycore.h"
|
||||||
#include "quasarapp.h"
|
#include "quasarapp.h"
|
||||||
|
#include "configparser.h"
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@ -58,9 +59,12 @@ QMultiMap<LibPriority, LibInfo> DependenciesScanner::getLibsFromEnvirement(
|
|||||||
|
|
||||||
info.setPriority(priority);
|
info.setPriority(priority);
|
||||||
|
|
||||||
|
if (!DeployCore::_config->ignoreList.isIgnore(info)) {
|
||||||
res.insertMulti(info.getPriority(), info);
|
res.insertMulti(info.getPriority(), info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +151,6 @@ void DependenciesScanner::setEnvironment(const QStringList &env) {
|
|||||||
QDir::Files| QDir::NoDotAndDotDot);
|
QDir::Files| QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
for (auto i : list) {
|
for (auto i : list) {
|
||||||
|
|
||||||
_EnvLibs.insertMulti(i.fileName().toUpper(), i.absoluteFilePath());
|
_EnvLibs.insertMulti(i.fileName().toUpper(), i.absoluteFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,36 +38,3 @@ DistroStruct DeployConfig::getDistroFromPrefix(const QString &prefix) const {
|
|||||||
|
|
||||||
return prefixes.value("");
|
return prefixes.value("");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QtDir::isQt(const QString& path) const {
|
|
||||||
|
|
||||||
return
|
|
||||||
(!libs.isEmpty() && path.contains(libs)) ||
|
|
||||||
(!bins.isEmpty() && path.contains(bins)) ||
|
|
||||||
(!libexecs.isEmpty() && path.contains(libexecs)) ||
|
|
||||||
(!plugins.isEmpty() && path.contains(plugins)) ||
|
|
||||||
(!qmls.isEmpty() && path.contains(qmls)) ||
|
|
||||||
(!translations.isEmpty() && path.contains(translations)) ||
|
|
||||||
(!resources.isEmpty() && path.contains(resources));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Extra::contains(const QString &path) const {
|
|
||||||
QFileInfo info(path);
|
|
||||||
if (extraPaths.contains(info.absolutePath())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto i: extraPathsMasks) {
|
|
||||||
if (info.absoluteFilePath().contains(i)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto i: extraNamesMasks) {
|
|
||||||
if (info.fileName().contains(i)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
@ -3,32 +3,11 @@
|
|||||||
#include "deploy_global.h"
|
#include "deploy_global.h"
|
||||||
|
|
||||||
#include "distromodule.h"
|
#include "distromodule.h"
|
||||||
|
#include "extra.h"
|
||||||
#include "ignorerule.h"
|
#include "ignorerule.h"
|
||||||
|
#include "qtdir.h"
|
||||||
#include "targetinfo.h"
|
#include "targetinfo.h"
|
||||||
|
|
||||||
struct DEPLOYSHARED_EXPORT QtDir {
|
|
||||||
QString libs;
|
|
||||||
QString bins;
|
|
||||||
QString libexecs;
|
|
||||||
QString plugins;
|
|
||||||
QString qmls;
|
|
||||||
QString translations;
|
|
||||||
QString resources;
|
|
||||||
|
|
||||||
Platform qtPlatform;
|
|
||||||
|
|
||||||
bool isQt(const QString &path) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DEPLOYSHARED_EXPORT Extra {
|
|
||||||
QSet<QString> extraPaths;
|
|
||||||
QSet<QString> extraPathsMasks;
|
|
||||||
QSet<QString> extraNamesMasks;
|
|
||||||
|
|
||||||
bool contains(const QString &path) const;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class DEPLOYSHARED_EXPORT DeployConfig {
|
class DEPLOYSHARED_EXPORT DeployConfig {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -6,11 +6,20 @@
|
|||||||
//#
|
//#
|
||||||
|
|
||||||
#include "envirement.h"
|
#include "envirement.h"
|
||||||
|
#include "pathutils.h"
|
||||||
#include "quasarapp.h"
|
#include "quasarapp.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
QSet<QString> Envirement::upper(const QSet<QString>& set) const {
|
||||||
|
QSet<QString> res;
|
||||||
|
for (auto &i : set) {
|
||||||
|
res.insert(PathUtils::fixPath(i));
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
QStringList Envirement::deployEnvironment() const
|
QStringList Envirement::deployEnvironment() const
|
||||||
{
|
{
|
||||||
return _deployEnvironment.toList();
|
return _deployEnvironment.toList();
|
||||||
@ -23,7 +32,7 @@ QStringList Envirement::ignoreEnvList() const
|
|||||||
|
|
||||||
void Envirement::setIgnoreEnvList(const QStringList &ignoreEnvList)
|
void Envirement::setIgnoreEnvList(const QStringList &ignoreEnvList)
|
||||||
{
|
{
|
||||||
_ignoreEnvList = ignoreEnvList.toSet();
|
_ignoreEnvList = upper(ignoreEnvList.toSet());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Envirement::addEnv(const QString &dir, const QString &appDir, const QString& targetDir) {
|
void Envirement::addEnv(const QString &dir, const QString &appDir, const QString& targetDir) {
|
||||||
@ -45,16 +54,9 @@ void Envirement::addEnv(const QString &dir, const QString &appDir, const QString
|
|||||||
auto path = QFileInfo(dir).absoluteFilePath();
|
auto path = QFileInfo(dir).absoluteFilePath();
|
||||||
|
|
||||||
for (QString i :_ignoreEnvList) {
|
for (QString i :_ignoreEnvList) {
|
||||||
|
if (path.contains(i, ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
if (path.contains(i, Qt::CaseInsensitive)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (path.contains(i)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!appDir.isEmpty() && path.contains(appDir)) {
|
if (!appDir.isEmpty() && path.contains(appDir)) {
|
||||||
@ -77,16 +79,19 @@ void Envirement::addEnv(const QString &dir, const QString &appDir, const QString
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_deployEnvironment.insert(QDir::fromNativeSeparators(path));
|
_deployEnvironment.insert(PathUtils::fixPath(QDir::fromNativeSeparators(path)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Envirement::inThisEnvirement(const QString &file) const {
|
bool Envirement::inThisEnvirement(const QString &file) const {
|
||||||
QFileInfo info (file);
|
QFileInfo info (file);
|
||||||
|
|
||||||
if (info.isFile()) {
|
if (info.isFile()) {
|
||||||
return _deployEnvironment.contains(info.absolutePath());
|
return _deployEnvironment.contains(PathUtils::fixPath(info.absolutePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return _deployEnvironment.contains(file);
|
return _deployEnvironment.contains(PathUtils::fixPath(file));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Envirement::size() const {
|
int Envirement::size() const {
|
||||||
|
@ -20,6 +20,7 @@ private:
|
|||||||
QSet<QString> _ignoreEnvList;
|
QSet<QString> _ignoreEnvList;
|
||||||
QSet<QString> _deployEnvironment;
|
QSet<QString> _deployEnvironment;
|
||||||
|
|
||||||
|
QSet<QString> upper(const QSet<QString> &set) const;
|
||||||
public:
|
public:
|
||||||
Envirement();
|
Envirement();
|
||||||
QStringList deployEnvironment() const;
|
QStringList deployEnvironment() const;
|
||||||
|
72
Deploy/extra.cpp
Normal file
72
Deploy/extra.cpp
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#include "extra.h"
|
||||||
|
#include "pathutils.h"
|
||||||
|
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QSet<QString> Extra::getExtraPathsMasks() const {
|
||||||
|
return extraPathsMasks;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extra::setExtraPathsMasks(const QSet<QString> &value) {
|
||||||
|
extraPathsMasks = upper(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extra::addExtraPathsMasks(const QSet<QString> &value) {
|
||||||
|
extraPathsMasks += upper(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> Extra::getExtraNamesMasks() const {
|
||||||
|
return extraNamesMasks;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extra::setExtraNamesMasks(const QSet<QString> &value) {
|
||||||
|
extraNamesMasks = upper(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extra::addtExtraNamesMasks(const QSet<QString> &value) {
|
||||||
|
extraNamesMasks += upper(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> Extra::upper(const QSet<QString>& set) const {
|
||||||
|
QSet<QString> res;
|
||||||
|
for (auto &i : set) {
|
||||||
|
res.insert(PathUtils::fixPath(i));
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<QString> Extra::getExtraPaths() const {
|
||||||
|
return extraPaths;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extra::setExtraPaths(const QSet<QString> &value) {
|
||||||
|
extraPaths = upper(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Extra::addExtraPaths(const QSet<QString> &value) {
|
||||||
|
extraPaths += upper(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Extra::contains(const QString &path) const {
|
||||||
|
QFileInfo info(path);
|
||||||
|
if (extraPaths.contains(PathUtils::fixPath(info.absolutePath()))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto i: extraPathsMasks) {
|
||||||
|
if (PathUtils::fixPath(info.absoluteFilePath()).contains(i)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto i: extraNamesMasks) {
|
||||||
|
if (PathUtils::fixPath(info.fileName()).contains(i)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
31
Deploy/extra.h
Normal file
31
Deploy/extra.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef EXTRA_H
|
||||||
|
#define EXTRA_H
|
||||||
|
#include "deploy_global.h"
|
||||||
|
|
||||||
|
#include <QSet>
|
||||||
|
|
||||||
|
|
||||||
|
class DEPLOYSHARED_EXPORT Extra {
|
||||||
|
QSet<QString> extraPaths;
|
||||||
|
QSet<QString> extraPathsMasks;
|
||||||
|
QSet<QString> extraNamesMasks;
|
||||||
|
|
||||||
|
QSet<QString> upper(const QSet<QString> & ) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
QSet<QString> getExtraPaths() const;
|
||||||
|
void setExtraPaths(const QSet<QString> &value);
|
||||||
|
void addExtraPaths(const QSet<QString> &value);
|
||||||
|
|
||||||
|
QSet<QString> getExtraPathsMasks() const;
|
||||||
|
void setExtraPathsMasks(const QSet<QString> &value);
|
||||||
|
void addExtraPathsMasks(const QSet<QString> &value);
|
||||||
|
|
||||||
|
QSet<QString> getExtraNamesMasks() const;
|
||||||
|
void setExtraNamesMasks(const QSet<QString> &value);
|
||||||
|
void addtExtraNamesMasks(const QSet<QString> &value);
|
||||||
|
|
||||||
|
bool contains(const QString &path) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif // EXTRA_H
|
@ -22,12 +22,13 @@
|
|||||||
#include <quasarapp.h>
|
#include <quasarapp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
bool Extracter::deployMSVC() {
|
bool Extracter::deployMSVC() {
|
||||||
qInfo () << "try deploy msvc";
|
qInfo () << "try deploy msvc";
|
||||||
auto msvcInstaller = DeployCore::getVCredist(DeployCore::_config->qtDir.bins);
|
auto msvcInstaller = DeployCore::getVCredist(DeployCore::_config->qtDir.getBins());
|
||||||
|
|
||||||
if (msvcInstaller.isEmpty()) {
|
if (msvcInstaller.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
@ -50,8 +51,8 @@ bool Extracter::extractWebEngine() {
|
|||||||
|
|
||||||
auto prefix = i.key();
|
auto prefix = i.key();
|
||||||
if (isWebEngine(prefix)) {
|
if (isWebEngine(prefix)) {
|
||||||
auto webEngeneBin = DeployCore::_config->qtDir.libexecs;
|
auto webEngeneBin = DeployCore::_config->qtDir.getLibexecs();
|
||||||
if (DeployCore::_config->qtDir.qtPlatform & Platform::Unix) {
|
if (DeployCore::_config->qtDir.getQtPlatform() & Platform::Unix) {
|
||||||
webEngeneBin += "/QtWebEngineProcess";
|
webEngeneBin += "/QtWebEngineProcess";
|
||||||
} else {
|
} else {
|
||||||
webEngeneBin += "/QtWebEngineProcess.exe";
|
webEngeneBin += "/QtWebEngineProcess.exe";
|
||||||
@ -59,7 +60,7 @@ bool Extracter::extractWebEngine() {
|
|||||||
|
|
||||||
auto destWebEngine = DeployCore::_config->getTargetDir() + prefix + DeployCore::_config->prefixes[prefix].getBinOutDir();
|
auto destWebEngine = DeployCore::_config->getTargetDir() + prefix + DeployCore::_config->prefixes[prefix].getBinOutDir();
|
||||||
auto resOut = DeployCore::_config->getTargetDir() + prefix + DeployCore::_config->prefixes[prefix].getResOutDir();
|
auto resOut = DeployCore::_config->getTargetDir() + prefix + DeployCore::_config->prefixes[prefix].getResOutDir();
|
||||||
auto res = DeployCore::_config->qtDir.resources;
|
auto res = DeployCore::_config->qtDir.getResources();
|
||||||
|
|
||||||
if (!_fileManager->copyFile(webEngeneBin, destWebEngine)) {
|
if (!_fileManager->copyFile(webEngeneBin, destWebEngine)) {
|
||||||
return false;
|
return false;
|
||||||
@ -112,7 +113,7 @@ void Extracter::copyExtraPlugins(const QString& prefix) {
|
|||||||
for (auto extraPlugin : DeployCore::_config->extraPlugins) {
|
for (auto extraPlugin : DeployCore::_config->extraPlugins) {
|
||||||
|
|
||||||
if (!PathUtils::isPath(extraPlugin)) {
|
if (!PathUtils::isPath(extraPlugin)) {
|
||||||
extraPlugin = DeployCore::_config->qtDir.plugins + "/" + extraPlugin;
|
extraPlugin = DeployCore::_config->qtDir.getPlugins() + "/" + extraPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
info.setFile(extraPlugin);
|
info.setFile(extraPlugin);
|
||||||
@ -171,7 +172,7 @@ void Extracter::extractPlugins() {
|
|||||||
auto distro = cnf->getDistroFromPrefix(i.key());
|
auto distro = cnf->getDistroFromPrefix(i.key());
|
||||||
|
|
||||||
QStringList plugins;
|
QStringList plugins;
|
||||||
pluginsParser.scan(cnf->qtDir.plugins, plugins, _prefixDependencyes[i.key()].qtModules());
|
pluginsParser.scan(cnf->qtDir.getPlugins(), plugins, _prefixDependencyes[i.key()].qtModules());
|
||||||
copyPlugins(plugins, i.key());
|
copyPlugins(plugins, i.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -260,7 +261,7 @@ bool Extracter::copyTranslations(QStringList list, const QString& prefix) {
|
|||||||
|
|
||||||
auto cnf = DeployCore::_config;
|
auto cnf = DeployCore::_config;
|
||||||
|
|
||||||
QDir dir(cnf->qtDir.translations);
|
QDir dir(cnf->qtDir.getTranslations());
|
||||||
if (!dir.exists() || list.isEmpty()) {
|
if (!dir.exists() || list.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -281,7 +282,7 @@ bool Extracter::copyTranslations(QStringList list, const QString& prefix) {
|
|||||||
|
|
||||||
if (isWebEngine(prefix)) {
|
if (isWebEngine(prefix)) {
|
||||||
auto trOut = targetPath + distro.getTrOutDir();
|
auto trOut = targetPath + distro.getTrOutDir();
|
||||||
auto tr = DeployCore::_config->qtDir.translations + "/qtwebengine_locales";
|
auto tr = DeployCore::_config->qtDir.getTranslations() + "/qtwebengine_locales";
|
||||||
_fileManager->copyFolder(tr, trOut + "/qtwebengine_locales");
|
_fileManager->copyFolder(tr, trOut + "/qtwebengine_locales");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,7 +324,7 @@ void Extracter::extractLib(const QString &file,
|
|||||||
|
|
||||||
for (auto &line : data) {
|
for (auto &line : data) {
|
||||||
|
|
||||||
if (mask.size() && !line.getName().contains(mask)) {
|
if (mask.size() && !line.getName().contains(mask, ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +346,7 @@ void Extracter::extractLib(const QString &file,
|
|||||||
|
|
||||||
bool Extracter::extractQmlAll() {
|
bool Extracter::extractQmlAll() {
|
||||||
|
|
||||||
if (!QFileInfo::exists(DeployCore::_config->qtDir.qmls)) {
|
if (!QFileInfo::exists(DeployCore::_config->qtDir.getQmls())) {
|
||||||
qWarning() << "qml dir wrong!";
|
qWarning() << "qml dir wrong!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -359,7 +360,7 @@ bool Extracter::extractQmlAll() {
|
|||||||
|
|
||||||
QStringList listItems;
|
QStringList listItems;
|
||||||
|
|
||||||
if (!_fileManager->copyFolder(cnf->qtDir.qmls, targetPath + distro.getQmlOutDir(),
|
if (!_fileManager->copyFolder(cnf->qtDir.getQmls(), targetPath + distro.getQmlOutDir(),
|
||||||
QStringList() << ".so.debug" << "d.dll" << ".pdb",
|
QStringList() << ".so.debug" << "d.dll" << ".pdb",
|
||||||
&listItems)) {
|
&listItems)) {
|
||||||
return false;
|
return false;
|
||||||
@ -390,7 +391,7 @@ bool Extracter::extractQmlFromSource(const QString& sourceDir) {
|
|||||||
|
|
||||||
QuasarAppUtils::Params::verboseLog("extractQmlFromSource " + info.absoluteFilePath());
|
QuasarAppUtils::Params::verboseLog("extractQmlFromSource " + info.absoluteFilePath());
|
||||||
|
|
||||||
if (!QFileInfo::exists(cnf->qtDir.qmls)) {
|
if (!QFileInfo::exists(cnf->qtDir.getQmls())) {
|
||||||
qWarning() << "qml dir wrong!";
|
qWarning() << "qml dir wrong!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -400,7 +401,7 @@ bool Extracter::extractQmlFromSource(const QString& sourceDir) {
|
|||||||
QStringList filter;
|
QStringList filter;
|
||||||
filter << ".so.debug" << "d.dll" << ".pdb";
|
filter << ".so.debug" << "d.dll" << ".pdb";
|
||||||
|
|
||||||
QML ownQmlScaner(cnf->qtDir.qmls);
|
QML ownQmlScaner(cnf->qtDir.getQmls());
|
||||||
|
|
||||||
if (!ownQmlScaner.scan(plugins, info.absoluteFilePath())) {
|
if (!ownQmlScaner.scan(plugins, info.absoluteFilePath())) {
|
||||||
QuasarAppUtils::Params::verboseLog("qml scaner run failed!");
|
QuasarAppUtils::Params::verboseLog("qml scaner run failed!");
|
||||||
@ -411,7 +412,7 @@ bool Extracter::extractQmlFromSource(const QString& sourceDir) {
|
|||||||
auto targetPath = cnf->getTargetDir() + i.key();
|
auto targetPath = cnf->getTargetDir() + i.key();
|
||||||
auto distro = cnf->getDistroFromPrefix(i.key());
|
auto distro = cnf->getDistroFromPrefix(i.key());
|
||||||
|
|
||||||
if (!_fileManager->copyFolder(cnf->qtDir.qmls,
|
if (!_fileManager->copyFolder(cnf->qtDir.getQmls(),
|
||||||
targetPath + distro.getQmlOutDir(),
|
targetPath + distro.getQmlOutDir(),
|
||||||
filter , &listItems, &plugins)) {
|
filter , &listItems, &plugins)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "deploycore.h"
|
#include "deploycore.h"
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include "pathutils.h"
|
||||||
|
|
||||||
FileManager::FileManager() {
|
FileManager::FileManager() {
|
||||||
}
|
}
|
||||||
@ -75,7 +76,7 @@ void FileManager::saveDeploymendFiles(const QString& targetDir) {
|
|||||||
bool FileManager::strip(const QString &dir) const {
|
bool FileManager::strip(const QString &dir) const {
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
Q_UNUSED(dir);
|
Q_UNUSED(dir)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
QFileInfo info(dir);
|
QFileInfo info(dir);
|
||||||
@ -126,7 +127,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
|||||||
bool copy = !masks;
|
bool copy = !masks;
|
||||||
if (masks) {
|
if (masks) {
|
||||||
for (auto mask : *masks) {
|
for (auto mask : *masks) {
|
||||||
if (info.absoluteFilePath().contains(mask)) {
|
if (info.absoluteFilePath().contains(mask, ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||||
copy = true;
|
copy = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -208,7 +209,7 @@ bool FileManager::removeFile(const QString &file) {
|
|||||||
bool FileManager::smartCopyFile(const QString &file, const QString &target, QStringList *mask) {
|
bool FileManager::smartCopyFile(const QString &file, const QString &target, QStringList *mask) {
|
||||||
auto config = DeployCore::_config;
|
auto config = DeployCore::_config;
|
||||||
|
|
||||||
if (file.contains(config->getTargetDir())) {
|
if (file.contains(config->getTargetDir(), ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||||
if (!moveFile(file, target, mask)) {
|
if (!moveFile(file, target, mask)) {
|
||||||
QuasarAppUtils::Params::verboseLog(" file not moved! try copy");
|
QuasarAppUtils::Params::verboseLog(" file not moved! try copy");
|
||||||
|
|
||||||
@ -246,7 +247,7 @@ bool FileManager::copyFolder(const QString &from, const QString &to, const QStri
|
|||||||
|
|
||||||
QString skipFilter = "";
|
QString skipFilter = "";
|
||||||
for (auto && i: filter) {
|
for (auto && i: filter) {
|
||||||
if (item.fileName().contains(i)) {
|
if (item.fileName().contains(i, ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||||
skipFilter = i;
|
skipFilter = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ void IgnoreRule::addRule(const IgnoreData &rule) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IgnoreRule::check(const LibInfo &info, const QString& ignoreLabel) const {
|
bool IgnoreRule::check(const LibInfo &info, const QString& ignoreLabel) const {
|
||||||
if (info.fullPath().contains(ignoreLabel)) {
|
if (info.fullPath().contains(ignoreLabel, Qt::CaseInsensitive)) {
|
||||||
QuasarAppUtils::Params::verboseLog(info.fullPath() + " ignored by filter" + ignoreLabel);
|
QuasarAppUtils::Params::verboseLog(info.fullPath() + " ignored by filter" + ignoreLabel);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libinfo.h"
|
#include "libinfo.h"
|
||||||
|
#include "pathutils.h"
|
||||||
|
|
||||||
bool operator ==(const LibInfo &left, const LibInfo &right) {
|
bool operator ==(const LibInfo &left, const LibInfo &right) {
|
||||||
return left.fullPath() == right.fullPath();
|
return left.fullPath() == right.fullPath();
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <configparser.h>
|
#include <configparser.h>
|
||||||
#include "filemanager.h"
|
#include "filemanager.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
bool MetaFileManager::createRunScriptWindows(const QString &target) {
|
bool MetaFileManager::createRunScriptWindows(const QString &target) {
|
||||||
|
|
||||||
|
@ -88,6 +88,14 @@ bool PathUtils::isAbsalutPath(const QString &path) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString PathUtils::fixPath(const QString &path) {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
return path.toUpper();
|
||||||
|
#else
|
||||||
|
return path;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
QString PathUtils::getReleativePath(QString path) {
|
QString PathUtils::getReleativePath(QString path) {
|
||||||
path = toFullPath(path);
|
path = toFullPath(path);
|
||||||
|
|
||||||
|
@ -5,12 +5,20 @@
|
|||||||
//# of this license document, but changing it is not allowed.
|
//# of this license document, but changing it is not allowed.
|
||||||
//#
|
//#
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
#include "deploy_global.h"
|
|
||||||
|
|
||||||
#ifndef PATHUTILS_H
|
#ifndef PATHUTILS_H
|
||||||
#define PATHUTILS_H
|
#define PATHUTILS_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include "deploy_global.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#define ONLY_WIN_CASE_INSENSIATIVE Qt::CaseInsensitive
|
||||||
|
#else
|
||||||
|
#define ONLY_WIN_CASE_INSENSIATIVE Qt::CaseSensitive
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The PathUtils class
|
* @brief The PathUtils class
|
||||||
*
|
*
|
||||||
@ -69,6 +77,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
static bool isAbsalutPath(const QString &path);
|
static bool isAbsalutPath(const QString &path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief fixPath - this method make upper case for all symbols of path on windows os. on linux doing nothing
|
||||||
|
* @param path - a input path
|
||||||
|
* @return return a fixed path
|
||||||
|
*/
|
||||||
|
static QString fixPath(const QString & path);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PATHUTILS_H
|
#endif // PATHUTILS_H
|
||||||
|
@ -52,7 +52,7 @@ bool PE::getDep(peparse::parsed_pe_internal * internal, LibInfo &res) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.getDependncies().size();
|
return res.getDependncies().size() || !imports.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
PE::PE(): IGetLibInfo () {
|
PE::PE(): IGetLibInfo () {
|
||||||
@ -77,6 +77,7 @@ bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
|||||||
info.setPath(QFileInfo(lib).absolutePath());
|
info.setPath(QFileInfo(lib).absolutePath());
|
||||||
|
|
||||||
if (!getDep(parsedPeLib->internal, info)) {
|
if (!getDep(parsedPeLib->internal, info)) {
|
||||||
|
peparse::DestructParsedPE(parsedPeLib);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
81
Deploy/qtdir.cpp
Normal file
81
Deploy/qtdir.cpp
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
#include "pathutils.h"
|
||||||
|
#include "qtdir.h"
|
||||||
|
|
||||||
|
QString QtDir::getLibs() const {
|
||||||
|
return libs;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setLibs(const QString &value) {
|
||||||
|
libs = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QtDir::getBins() const {
|
||||||
|
return bins;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setBins(const QString &value) {
|
||||||
|
bins = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QtDir::getLibexecs() const {
|
||||||
|
return libexecs;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setLibexecs(const QString &value) {
|
||||||
|
libexecs = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QtDir::getPlugins() const {
|
||||||
|
return plugins;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setPlugins(const QString &value) {
|
||||||
|
plugins = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QtDir::getQmls() const {
|
||||||
|
return qmls;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setQmls(const QString &value)
|
||||||
|
{
|
||||||
|
qmls = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QtDir::getTranslations() const {
|
||||||
|
return translations;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setTranslations(const QString &value) {
|
||||||
|
translations = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QtDir::getResources() const{
|
||||||
|
return resources;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setResources(const QString &value) {
|
||||||
|
resources = PathUtils::fixPath(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
Platform QtDir::getQtPlatform() const {
|
||||||
|
return qtPlatform;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtDir::setQtPlatform(const Platform &value) {
|
||||||
|
qtPlatform = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QtDir::isQt(QString path) const {
|
||||||
|
|
||||||
|
path = PathUtils::fixPath(path);
|
||||||
|
|
||||||
|
return
|
||||||
|
(!libs.isEmpty() && path.contains(libs)) ||
|
||||||
|
(!bins.isEmpty() && path.contains(bins)) ||
|
||||||
|
(!libexecs.isEmpty() && path.contains(libexecs)) ||
|
||||||
|
(!plugins.isEmpty() && path.contains(plugins)) ||
|
||||||
|
(!qmls.isEmpty() && path.contains(qmls)) ||
|
||||||
|
(!translations.isEmpty() && path.contains(translations)) ||
|
||||||
|
(!resources.isEmpty() && path.contains(resources));
|
||||||
|
}
|
41
Deploy/qtdir.h
Normal file
41
Deploy/qtdir.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#ifndef QTDIR_H
|
||||||
|
#define QTDIR_H
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
#include "deploy_global.h"
|
||||||
|
#include "deploycore.h"
|
||||||
|
|
||||||
|
class DEPLOYSHARED_EXPORT QtDir {
|
||||||
|
QString libs;
|
||||||
|
QString bins;
|
||||||
|
QString libexecs;
|
||||||
|
QString plugins;
|
||||||
|
QString qmls;
|
||||||
|
QString translations;
|
||||||
|
QString resources;
|
||||||
|
|
||||||
|
Platform qtPlatform;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
QString getLibs() const;
|
||||||
|
void setLibs(const QString &value);
|
||||||
|
QString getBins() const;
|
||||||
|
void setBins(const QString &value);
|
||||||
|
QString getLibexecs() const;
|
||||||
|
void setLibexecs(const QString &value);
|
||||||
|
QString getPlugins() const;
|
||||||
|
void setPlugins(const QString &value);
|
||||||
|
QString getQmls() const;
|
||||||
|
void setQmls(const QString &value);
|
||||||
|
QString getTranslations() const;
|
||||||
|
void setTranslations(const QString &value);
|
||||||
|
QString getResources() const;
|
||||||
|
void setResources(const QString &value);
|
||||||
|
Platform getQtPlatform() const;
|
||||||
|
void setQtPlatform(const Platform &value);
|
||||||
|
bool isQt(QString path) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // QTDIR_H
|
@ -64,9 +64,13 @@ releaseSnap.commands = snapcraft push *.snap # bad patern
|
|||||||
|
|
||||||
unix:deploy.depends += clearSnap
|
unix:deploy.depends += clearSnap
|
||||||
unix:deploy.depends += buildSnap
|
unix:deploy.depends += buildSnap
|
||||||
unix:deploy.depends += deploySnap
|
|
||||||
|
|
||||||
unix:deploy.release += releaseSnap
|
!isEmpty( ONLINE ) {
|
||||||
|
|
||||||
|
message(Snap)
|
||||||
|
unix:deploy.depends += deploySnap
|
||||||
|
unix:release.depends += releaseSnap
|
||||||
|
}
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
$$META_DIR/* \
|
$$META_DIR/* \
|
||||||
|
@ -36,12 +36,28 @@ function systemIntegration() {
|
|||||||
|
|
||||||
if (!installer.fileExists(homeDir + "/.local/bin")) {
|
if (!installer.fileExists(homeDir + "/.local/bin")) {
|
||||||
|
|
||||||
component.addOperation('Execute', ["mkpath", "-p", homeDir + "/.local/bin"])
|
component.addOperation('Execute', ["mkdir", "-p", homeDir + "/.local/bin"])
|
||||||
|
|
||||||
QMessageBox["warning"](qsTr("install in system"), qsTr("Installer"),
|
QMessageBox["warning"](qsTr("install in system"), qsTr("Installer"),
|
||||||
qsTr("The \"~/local/bin\" folder was not initialized, you may need to reboot to work correctly!"),
|
qsTr("The \"~/local/bin\" folder was not initialized, you may need to reboot to work correctly!"),
|
||||||
QMessageBox.Ok);
|
QMessageBox.Ok);
|
||||||
|
|
||||||
|
var ansver = installer.execute('cat', [homeDir + "/.profile"]);
|
||||||
|
var result;
|
||||||
|
if (ansver.length >= 2) {
|
||||||
|
result = ansver[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!result.includes("/.local/bin")) {
|
||||||
|
|
||||||
|
var script = '\n# set PATH so it includes users private bin if it exists (generated by cqtdeployer installer) \n' +
|
||||||
|
'if [ -d "$HOME/.local/bin" ] ; then \n' +
|
||||||
|
' PATH="$HOME/.local/bin:$PATH" \n' +
|
||||||
|
'fi \n';
|
||||||
|
|
||||||
|
component.addOperation('AppendFile', [homeDir + "/.profile", script])
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
component.addOperation('Execute', ["ln", "-sf", targetDir + "/" + VERSION + "/cqtdeployer.sh",
|
component.addOperation('Execute', ["ln", "-sf", targetDir + "/" + VERSION + "/cqtdeployer.sh",
|
||||||
homeDir + "/.local/bin/cqtdeployer"],
|
homeDir + "/.local/bin/cqtdeployer"],
|
||||||
|
81
README.md
81
README.md
@ -28,19 +28,37 @@ Key differences of this program:
|
|||||||
|
|
||||||
See list of all options [here](./doc/Options.md)
|
See list of all options [here](./doc/Options.md)
|
||||||
|
|
||||||
## Build for Linux
|
|
||||||
- install qt and qt QtInstallFrameWork from [qtInstaller](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
|
||||||
- qmake -r
|
|
||||||
- make -j$(nproc)
|
|
||||||
- make deploy # this command requires the installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
|
||||||
- ./Distro/CQtDeployerInstaller.run
|
|
||||||
|
|
||||||
## Build for Windows
|
#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear
|
||||||
- install qt and qt QtInstallFrameWork from [qtInstaller](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
|
||||||
- qmake -r
|
|
||||||
- make -j$(nproc)
|
## Build for Linux
|
||||||
- make deploy # this command requires the installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4)
|
||||||
- ./Distro/CQtDeployerInstaller.exe
|
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
||||||
|
- cd CQtDeployer
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- qmake -r
|
||||||
|
- Here you must definitely call the qmake that was loaded from the 1st item.
|
||||||
|
- Example: ~/Qt/5.14.0/gcc_64/bin/qmake -r
|
||||||
|
- make -j$(nproc)
|
||||||
|
- make deploy
|
||||||
|
- #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
||||||
|
- ./Distro/CQtDeployerInstaller.run
|
||||||
|
|
||||||
|
## Build for Windows (CMD)
|
||||||
|
- install qt and qt QtInstallFrameWork from [qt installer](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f9bb77-7bb77-4bb77-4)
|
||||||
|
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
||||||
|
- cd CQtDeployer
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- SET PATH=C:/Qt/Tools/mingw730_64/bin;%PATH%
|
||||||
|
- It is important to set up the qt environment.
|
||||||
|
- qmake.exe -r
|
||||||
|
- Here you must definitely call the qmake that was loaded from the 1st item.
|
||||||
|
- Example: C:/Qt/5.14.0/mingw73_64/bin/qmake.exe -r
|
||||||
|
- migw32-make.exe -j$(nproc)
|
||||||
|
- migw32-make.exe deploy
|
||||||
|
- #this command requires installed [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
||||||
|
- ./Distro/CQtDeployerInstaller.exe
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
You can download the latest version of the application [here](https://github.com/QuasarApp/CQtDeployer/releases).
|
You can download the latest version of the application [here](https://github.com/QuasarApp/CQtDeployer/releases).
|
||||||
@ -88,19 +106,34 @@ Qt CQtDeployer - это приложением для извлечения вс
|
|||||||
|
|
||||||
Смотрите список всех опций [здесь](./doc/Options.md)
|
Смотрите список всех опций [здесь](./doc/Options.md)
|
||||||
|
|
||||||
## Build для Linux
|
|
||||||
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
|
||||||
- qmake -r
|
|
||||||
- make -j$(nproc)
|
|
||||||
- make deploy # эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
|
||||||
- ./Distro/CQtDeployerInstaller.run
|
|
||||||
|
|
||||||
## Build для Windows
|
## Build для Linux
|
||||||
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
||||||
- qmake -r
|
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
||||||
- make -j$(nproc)
|
- cd CQtDeployer
|
||||||
- make deploy # эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
- git submodule update --init --recursive
|
||||||
- ./Distro/CQtDeployerInstaller.exe
|
- qmake -r
|
||||||
|
- Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта.
|
||||||
|
- Пример: ~/Qt/5.14.0/gcc_64/bin/qmake -r
|
||||||
|
- make -j$(nproc)
|
||||||
|
- make deploy
|
||||||
|
- эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
||||||
|
- ./Distro/CQtDeployerInstaller.run
|
||||||
|
|
||||||
|
## Build для Windows (CMD)
|
||||||
|
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
|
||||||
|
- git clone https://github.com/QuasarApp/CQtDeployer.git
|
||||||
|
- cd CQtDeployer
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- SET PATH=C:/Qt/Tools/mingw730_64/bin;%PATH%
|
||||||
|
- Здесь важно настроить окружение qt.
|
||||||
|
- qmake.exe -r
|
||||||
|
- Здесь нужно обязательно вызвать тот qmake, который был загружен из 1го пункта.
|
||||||
|
- Пример: C:/Qt/5.14.0/mingw73_64/bin/qmake.exe -r
|
||||||
|
- migw32-make.exe -j$(nproc)
|
||||||
|
- migw32-make.exe deploy
|
||||||
|
- эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/CQtDeployer/releases)
|
||||||
|
- ./Distro/CQtDeployerInstaller.exe
|
||||||
|
|
||||||
### Snap
|
### Snap
|
||||||
[](https://snapcraft.io/cqtdeployer)
|
[](https://snapcraft.io/cqtdeployer)
|
||||||
|
@ -1249,12 +1249,6 @@ void deploytest::testIgnore() {
|
|||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
QString bin = TestBinDir + "QtWidgetsProject";
|
QString bin = TestBinDir + "QtWidgetsProject";
|
||||||
QString qmake = TestQtDir + "bin/qmake";
|
QString qmake = TestQtDir + "bin/qmake";
|
||||||
comapareTree += utils.createTree(
|
|
||||||
{
|
|
||||||
"./" + DISTRO_DIR + "/lib/libicudata.so",
|
|
||||||
"./" + DISTRO_DIR + "/lib/libicui18n.so",
|
|
||||||
"./" + DISTRO_DIR + "/lib/libicuuc.so"
|
|
||||||
});
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
QString bin = TestBinDir + "QtWidgetsProject.exe";
|
QString bin = TestBinDir + "QtWidgetsProject.exe";
|
||||||
@ -1286,10 +1280,6 @@ void deploytest::testIgnore() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
auto removeTree = utils.createTree({
|
auto removeTree = utils.createTree({
|
||||||
"./" + DISTRO_DIR + "/lib/libQt5VirtualKeyboard.so",
|
|
||||||
});
|
|
||||||
|
|
||||||
auto removeTreePlugins = utils.createTree({
|
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/libqtvirtualkeyboard_hangul.so",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/libqtvirtualkeyboard_hangul.so",
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/libqtvirtualkeyboard_openwnn.so",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/libqtvirtualkeyboard_openwnn.so",
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/libqtvirtualkeyboard_pinyin.so",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/libqtvirtualkeyboard_pinyin.so",
|
||||||
@ -1309,19 +1299,15 @@ void deploytest::testIgnore() {
|
|||||||
|
|
||||||
auto removeTree = utils.createTree({
|
auto removeTree = utils.createTree({
|
||||||
"./" + DISTRO_DIR + "/Qt5VirtualKeyboard.dll",
|
"./" + DISTRO_DIR + "/Qt5VirtualKeyboard.dll",
|
||||||
});
|
"./" + DISTRO_DIR + "/plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll",
|
||||||
|
|
||||||
auto removeTreePlugins = utils.createTree({
|
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_hangul.dll",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_hangul.dll",
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_openwnn.dll",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_openwnn.dll",
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_pinyin.dll",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_pinyin.dll",
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_tcime.dll",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_tcime.dll",
|
||||||
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_thai.dll",
|
"./" + DISTRO_DIR + "/plugins/virtualkeyboard/qtvirtualkeyboard_thai.dll"
|
||||||
"./" + DISTRO_DIR + "/plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll",
|
|
||||||
"./" + DISTRO_DIR + "/Qt5VirtualKeyboard.dll",
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
runTestParams({"-bin", bin, "clear" ,
|
runTestParams({"-bin", bin, "clear" ,
|
||||||
@ -1329,19 +1315,12 @@ void deploytest::testIgnore() {
|
|||||||
"-ignoreEnv", TestQtDir + "/lib," + TestQtDir + "/bin" }, &comapareTree);
|
"-ignoreEnv", TestQtDir + "/lib," + TestQtDir + "/bin" }, &comapareTree);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
comapareTree = Modules::qtLibs() - removeTree;
|
comapareTree = Modules::qtLibs() - removeTree;
|
||||||
|
|
||||||
runTestParams({"-bin", bin, "clear" ,
|
runTestParams({"-bin", bin, "clear" ,
|
||||||
"-qmake", qmake,
|
"-qmake", qmake,
|
||||||
"-ignore", "VirtualKeyboard"}, &comapareTree);
|
"-ignore", "VirtualKeyboard"}, &comapareTree);
|
||||||
|
|
||||||
comapareTree = Modules::qtLibs() - removeTreePlugins;
|
|
||||||
|
|
||||||
runTestParams({"-bin", bin, "clear" ,
|
|
||||||
"-qmake", qmake,
|
|
||||||
"-ignore", "VirtualKeyboard,virtualkeyboard"}, &comapareTree);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void deploytest::testLibDir() {
|
void deploytest::testLibDir() {
|
||||||
@ -1524,9 +1503,29 @@ void deploytest::testSystemLib() {
|
|||||||
auto comapareTree = utils.createTree(
|
auto comapareTree = utils.createTree(
|
||||||
{
|
{
|
||||||
"./" + DISTRO_DIR + "/TestOnlyC.exe",
|
"./" + DISTRO_DIR + "/TestOnlyC.exe",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-console-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-datetime-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-debug-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-errorhandling-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-fibers-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-file-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-handle-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-heap-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-localization-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-memory-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-namedpipe-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-processenvironment-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-processthreads-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-profile-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-string-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-synch-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-synch-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-sysinfo-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-util-l1-1-0.dll",
|
||||||
"./" + DISTRO_DIR + "/libgcc_s_seh-1.dll",
|
"./" + DISTRO_DIR + "/libgcc_s_seh-1.dll",
|
||||||
"./" + DISTRO_DIR + "/libstdc++-6.dll",
|
"./" + DISTRO_DIR + "/libstdc++-6.dll",
|
||||||
"./" + DISTRO_DIR + "/libwinpthread-1.dll",
|
"./" + DISTRO_DIR + "/libwinpthread-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/msvcrt.dll",
|
||||||
"./" + DISTRO_DIR + "/qt.conf"
|
"./" + DISTRO_DIR + "/qt.conf"
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1573,6 +1572,99 @@ void deploytest::testSystemLib() {
|
|||||||
|
|
||||||
QVERIFY(runScript.contains("export LD_PRELOAD="));
|
QVERIFY(runScript.contains("export LD_PRELOAD="));
|
||||||
|
|
||||||
|
#else
|
||||||
|
QString qmake = TestQtDir + "bin/qmake.exe";
|
||||||
|
bin = TestBinDir + "QtWidgetsProject.exe";
|
||||||
|
|
||||||
|
comapareTree += Modules::qtLibs();
|
||||||
|
|
||||||
|
comapareTree -= utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + DISTRO_DIR + "/TestOnlyC.exe",
|
||||||
|
});
|
||||||
|
|
||||||
|
comapareTree += utils.createTree(
|
||||||
|
{
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-console-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-datetime-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-debug-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-errorhandling-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-fibers-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-file-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-handle-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-heap-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-localization-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-memory-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-namedpipe-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-processenvironment-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-processthreads-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-profile-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-string-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-synch-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-synch-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-sysinfo-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-util-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/libgcc_s_seh-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/libstdc++-6.dll",
|
||||||
|
"./" + DISTRO_DIR + "/libwinpthread-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/msvcrt.dll",
|
||||||
|
"./" + DISTRO_DIR + "/qt.conf",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-Core-Heap-Obsolete-L1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-Core-Kernel32-Private-L1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-Core-Kernel32-Private-L1-1-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-Eventing-ClassicProvider-L1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-Eventing-Provider-L1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-core-file-l2-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-core-localization-obsolete-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-core-string-l2-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-core-string-obsolete-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/API-MS-Win-devices-config-L1-1-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-delayload-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-file-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-file-l1-2-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-interlocked-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-io-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-io-l1-1-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-kernel32-legacy-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-kernel32-legacy-l1-1-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-memory-l1-1-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-privateprofile-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-processthreads-l1-1-1.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-realtime-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-registry-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-rtlsupport-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-shlwapi-legacy-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-shlwapi-obsolete-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-stringansi-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-sysinfo-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-threadpool-l1-2-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-threadpool-legacy-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-timezone-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-url-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-version-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-core-wow64-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-crt-math-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-crt-private-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-crt-runtime-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-crt-string-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-crt-time-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-security-base-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/api-ms-win-security-cryptoapi-l1-1-0.dll",
|
||||||
|
"./" + DISTRO_DIR + "/dwmapi.dll",
|
||||||
|
"./" + DISTRO_DIR + "/mpr.dll",
|
||||||
|
"./" + DISTRO_DIR + "/profapi.dll",
|
||||||
|
"./" + DISTRO_DIR + "/rpcrt4.dll",
|
||||||
|
"./" + DISTRO_DIR + "/shell32.dll",
|
||||||
|
"./" + DISTRO_DIR + "/userenv.dll",
|
||||||
|
"./" + DISTRO_DIR + "/uxtheme.dll",
|
||||||
|
"./" + DISTRO_DIR + "/version.dll",
|
||||||
|
"./" + DISTRO_DIR + "/win32u.dll"
|
||||||
|
});
|
||||||
|
|
||||||
|
runTestParams({"-bin", bin, "clear" ,
|
||||||
|
"-qmake", qmake,
|
||||||
|
"deploySystem"
|
||||||
|
}, &comapareTree, true);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
BIN
res/screenshots/Example Run Win10.png
Normal file
BIN
res/screenshots/Example Run Win10.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
BIN
res/screenshots/Help Win10.png
Normal file
BIN
res/screenshots/Help Win10.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 465 KiB |
Before Width: | Height: | Size: 343 KiB After Width: | Height: | Size: 343 KiB |
BIN
res/screenshots/Result Win10.png
Normal file
BIN
res/screenshots/Result Win10.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 420 KiB |
Loading…
x
Reference in New Issue
Block a user