mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-28 10:44:33 +00:00
added variable CQT_PKG_ROOT for applications.
This variable contains path to root of the applications.
This commit is contained in:
parent
d7b48f3529
commit
daa9011832
@ -45,20 +45,16 @@ bool parsePackagesPrivate(Container& mainContainer,
|
||||
for (const auto& str: inputParamsList) {
|
||||
auto paramsList = str.split(DeployCore::getSeparator(1));
|
||||
auto first = paramsList.value(0, "");
|
||||
auto second = paramsList.value(1, "");
|
||||
if (paramsList.size() == 1)
|
||||
(valueLink(mainContainer, defaultPackage, DistroModule{defaultPackage}).*adder)(first);
|
||||
|
||||
else {
|
||||
|
||||
|
||||
bool skipError = QuasarAppUtils::Params::isEndable("allowEmptyPackages");
|
||||
first = PathUtils::fullStripPath(first);
|
||||
if (!skipError && !mainContainer.contains(first)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
for (int i = 1; i < paramsList.size(); ++i) {
|
||||
(valueLink(mainContainer, first, DistroModule{first}).*adder)(paramsList[i]);
|
||||
}
|
||||
@ -713,10 +709,6 @@ bool ConfigParser::parseInitMode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ConfigParser::parseGetTemplateMode() {
|
||||
|
||||
}
|
||||
|
||||
bool ConfigParser::parseClearMode() {
|
||||
setTargetDir("./" + DISTRO_DIR);
|
||||
|
||||
@ -825,7 +817,7 @@ bool ConfigParser::setTargetsInDir(const QString &dir, bool recursive) {
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
for (const auto &file : list) {
|
||||
for (const auto &file : qAsConst(list)) {
|
||||
|
||||
if (file.isDir()) {
|
||||
result |= setTargetsInDir(file.absoluteFilePath(), recursive);
|
||||
|
@ -55,7 +55,6 @@ private:
|
||||
bool parseDeployMode();
|
||||
bool parseInfoMode();
|
||||
bool parseInitMode();
|
||||
bool parseGetTemplateMode();
|
||||
|
||||
bool parseClearMode();
|
||||
|
||||
|
@ -111,8 +111,8 @@ void Extracter::extractExtraDataTargets() {
|
||||
auto cfg = DeployCore::_config;
|
||||
for (auto i = cfg->packages().cbegin(); i != cfg->packages().cend(); ++i) {
|
||||
auto &dep = _packageDependencyes[i.key()];
|
||||
|
||||
for (const auto &target : i.value().extraData()) {
|
||||
const auto extraData = i.value().extraData();
|
||||
for (const auto &target : extraData) {
|
||||
dep.addExtraData(target);
|
||||
}
|
||||
}
|
||||
@ -136,8 +136,9 @@ void Extracter::copyExtraPlugins(const QString& package) {
|
||||
auto cnf = DeployCore::_config;
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
const auto plugins = distro.extraPlugins();
|
||||
|
||||
for (auto extraPlugin : distro.extraPlugins()) {
|
||||
for (const auto &extraPlugin : plugins) {
|
||||
|
||||
info.setFile(extraPlugin);
|
||||
|
||||
@ -166,7 +167,7 @@ void Extracter::copyExtraPlugins(const QString& package) {
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
for (const auto& plugin : plugins) {
|
||||
for (const auto& plugin : qAsConst(plugins)) {
|
||||
extractPluginLib(plugin, package);
|
||||
}
|
||||
}
|
||||
@ -190,7 +191,7 @@ void Extracter::extractPlugins() {
|
||||
_fileManager->copyFiles(plugins, targetPath + distro.getPluginsOutDir(), 1,
|
||||
DeployCore::debugExtensions(), &listItems);
|
||||
|
||||
for (const auto &item : listItems) {
|
||||
for (const auto &item : qAsConst(listItems)) {
|
||||
extractPluginLib(item, i.key());
|
||||
}
|
||||
|
||||
@ -397,8 +398,8 @@ bool Extracter::extractQml() {
|
||||
|
||||
QStringList plugins;
|
||||
QStringList listItems;
|
||||
|
||||
for (const auto &qmlInput: distro.qmlInput()) {
|
||||
const auto qmlInput = distro.qmlInput();
|
||||
for (const auto &qmlInput: qmlInput) {
|
||||
QFileInfo info(qmlInput);
|
||||
|
||||
if (!info.isDir()) {
|
||||
@ -430,7 +431,7 @@ bool Extracter::extractQml() {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto &item : listItems) {
|
||||
for (const auto &item : qAsConst(listItems)) {
|
||||
extractPluginLib(item, i.key());
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,9 @@ bool MetaFileManager::createRunScriptWindows(const QString &target) {
|
||||
content =
|
||||
"@echo off \n"
|
||||
"SET BASE_DIR=%~dp0\n"
|
||||
"SET PATH=%BASE_DIR%" + distro.getLibOutDir() + ";%PATH%\n"
|
||||
"SET PATH=\"%BASE_DIR%\"" + distro.getLibOutDir() + ";%PATH%\n"
|
||||
"SET CQT_PKG_ROOT=\"%BASE_DIR%\"\n"
|
||||
|
||||
"%2\n"
|
||||
"call \"%BASE_DIR%" + distro.getBinOutDir() + "%0\" %1 \n";
|
||||
|
||||
@ -101,6 +103,8 @@ bool MetaFileManager::createRunScriptLinux(const QString &target) {
|
||||
"export QT_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() + ":$QT_PLUGIN_PATH\n"
|
||||
"export QTWEBENGINEPROCESS_PATH=\"$BASE_DIR\"" + distro.getBinOutDir() + "QtWebEngineProcess\n"
|
||||
"export QTDIR=\"$BASE_DIR\"\n"
|
||||
"export CQT_PKG_ROOT=\"$BASE_DIR\"\n"
|
||||
|
||||
"export "
|
||||
"QT_QPA_PLATFORM_PLUGIN_PATH=\"$BASE_DIR\"" + distro.getPluginsOutDir() +
|
||||
"platforms:$QT_QPA_PLATFORM_PLUGIN_PATH\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user