mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-03 13:09:34 +00:00
added support system-backup
This commit is contained in:
parent
e1605262ba
commit
8b09f9cfbe
@ -1182,9 +1182,9 @@ iDistribution *ConfigParser::getDistribution() {
|
||||
|
||||
void ConfigParser::initEnvirement() {
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
auto path = env.value("PATH");
|
||||
|
||||
if (!DeployCore::isSnap()) {
|
||||
auto path = env.value("PATH");
|
||||
|
||||
_config.envirement.addEnv(env.value("LD_LIBRARY_PATH"));
|
||||
_config.envirement.addEnv(path);
|
||||
@ -1216,15 +1216,27 @@ bool ConfigParser::checkSnapPermisions() {
|
||||
if (!DeployCore::isSnap())
|
||||
return true;
|
||||
|
||||
if (QuasarAppUtils::Params::isEndable("deploySystem") &&
|
||||
!QFile::exists(DeployCore::snapRootFS() + "/usr/lib")) {
|
||||
QuasarAppUtils::Params::log("You use option deploySystem, but not added permision system-backup for cqtdeployer."
|
||||
|
||||
bool system = QuasarAppUtils::Params::isEndable("deploySystem") ||
|
||||
QuasarAppUtils::Params::isEndable("extraLibs");
|
||||
bool checkPath = QDir(DeployCore::snapRootFS()).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).size();
|
||||
|
||||
if (system && !checkPath) {
|
||||
|
||||
QuasarAppUtils::Params::log("You use a deploySystem or extraLibs options,"
|
||||
" but not added permision system-backup for cqtdeployer."
|
||||
" Please add permision system-backup befor usong cqtdeployer."
|
||||
" Add system-backup permision from console: "
|
||||
"'snap connect cqtdeployer:system-backup :system-backup'"
|
||||
""
|
||||
" Add system-backup permision from console: ",
|
||||
QuasarAppUtils::Error);
|
||||
|
||||
QuasarAppUtils::Params::log(
|
||||
"'snap connect cqtdeployer:system-backup :system-backup'",
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
QuasarAppUtils::Params::log(
|
||||
"GUI: Open the gnome system setting >> Applications >> CQtDeployer. "
|
||||
"in menu rights and permisions enable system-backup.");
|
||||
"in menu rights and permisions enable system-backup.",
|
||||
QuasarAppUtils::Info);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ bool DependenciesScanner::fillLibInfo(LibInfo &info, const QString &file) const
|
||||
|
||||
void DependenciesScanner::recursiveDep(LibInfo &lib, QSet<LibInfo> &res, QSet<QString>& libStack) {
|
||||
QuasarAppUtils::Params::log("get recursive dependencies of " + lib.fullPath(),
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Debug);
|
||||
|
||||
if (_scanedLibs.contains(lib.fullPath())) {
|
||||
auto scanedLib = _scanedLibs.value(lib.fullPath());
|
||||
|
@ -103,12 +103,12 @@ DeployCore::QtModule DeployCore::getQtModule(const QString& path) {
|
||||
void DeployCore::addQtModule(DeployCore::QtModule &module, const QString &path) {
|
||||
|
||||
QuasarAppUtils::Params::log("current module " + QString::number(module),
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Debug);
|
||||
|
||||
auto mod = getQtModule(path);
|
||||
QuasarAppUtils::Params::log("add new module from path " + path +
|
||||
" module value " + QString::number(mod),
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Debug);
|
||||
|
||||
|
||||
module = static_cast<DeployCore::QtModule>(
|
||||
|
@ -307,7 +307,7 @@ void Extracter::extractLib(const QString &file,
|
||||
|
||||
assert(depMap);
|
||||
QuasarAppUtils::Params::log("extract lib :" + file,
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Debug);
|
||||
|
||||
auto data = _scaner->scan(file);
|
||||
|
||||
|
@ -305,7 +305,7 @@ bool FileManager::copyFolder(const QString &from, const QString &to, const QStri
|
||||
if (!skipFilter.isEmpty()) {
|
||||
QuasarAppUtils::Params::log(
|
||||
item.absoluteFilePath() + " ignored by filter " + skipFilter,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
QuasarAppUtils::VerboseLvl::Debug);
|
||||
continue;
|
||||
}
|
||||
auto config = DeployCore::_config;
|
||||
@ -319,7 +319,7 @@ bool FileManager::copyFolder(const QString &from, const QString &to, const QStri
|
||||
if (auto rule = config->ignoreList.isIgnore(info)) {
|
||||
QuasarAppUtils::Params::log(
|
||||
item.absoluteFilePath() + " ignored by rule " + rule->label,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
QuasarAppUtils::VerboseLvl::Debug);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -461,7 +461,7 @@ bool FileManager::copyFiles(const QStringList &source,
|
||||
if (!skipFilter.isEmpty()) {
|
||||
QuasarAppUtils::Params::log(
|
||||
info.absoluteFilePath() + " ignored by filter " + skipFilter,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
QuasarAppUtils::VerboseLvl::Debug);
|
||||
continue;
|
||||
}
|
||||
auto config = DeployCore::_config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user