Skip to content

Commit

Permalink
fix extract plugins function
Browse files Browse the repository at this point in the history
  • Loading branch information
EndrII committed Feb 29, 2020
1 parent c2f29b1 commit fe59ba8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
32 changes: 12 additions & 20 deletions Deploy/extracter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ bool Extracter::copyPlugin(const QString &plugin, const QString& package) {
}

for (const auto &item : listItems) {
if (QuasarAppUtils::Params::isEndable("extractPlugins")) {
extract(item, &_packageDependencyes[package]);
} else {
extract(item, &_packageDependencyes[package], "Qt");
}
extractPluginLib(item, package);
}

return true;
Expand All @@ -124,11 +120,7 @@ void Extracter::copyExtraPlugins(const QString& package) {
_fileManager->copyFile(info.absoluteFilePath(),
targetPath + distro.getPluginsOutDir());

if (QuasarAppUtils::Params::isEndable("extractPlugins")) {
extract(info.absoluteFilePath(), &_packageDependencyes[package]);
} else {
extract(info.absoluteFilePath(), &_packageDependencyes[package], "Qt");
}
extractPluginLib(info.absoluteFilePath(), package);
}
}
}
Expand Down Expand Up @@ -341,6 +333,14 @@ void Extracter::extractLib(const QString &file,
}
}

void Extracter::extractPluginLib(const QString& item, const QString& package) {
if (QuasarAppUtils::Params::isEndable("extractPlugins")) {
extract(item, &_packageDependencyes[package]);
} else {
extract(item, &_packageDependencyes[package], "Qt");
}
}

bool Extracter::extractQmlAll() {

if (!QFileInfo::exists(DeployCore::_config->qtDir.getQmls())) {
Expand All @@ -364,11 +364,7 @@ bool Extracter::extractQmlAll() {
}

for (const auto &item : listItems) {
if (QuasarAppUtils::Params::isEndable("extractPlugins")) {
extract(item, &_packageDependencyes[i.key()]);
} else {
extract(item, &_packageDependencyes[i.key()], "Qt");
}
extractPluginLib(item, i.key());
}

}
Expand Down Expand Up @@ -419,11 +415,7 @@ bool Extracter::extractQmlFromSource() {
}

for (const auto &item : listItems) {
if (QuasarAppUtils::Params::isEndable("extractPlugins")) {
extract(item, &_packageDependencyes[i.key()]);
} else {
extract(item, &_packageDependencyes[i.key()], "Qt");
}
extractPluginLib(item, i.key());
}

}
Expand Down
2 changes: 2 additions & 0 deletions Deploy/extracter.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class DEPLOYSHARED_EXPORT Extracter {
void copyLibs(const QSet<QString> &files, const QString &package);

bool isWebEngine(const QString& package) const;
void extractPluginLib(const QString &item, const QString &package);

public:
explicit Extracter(FileManager *fileManager, ConfigParser * cqt, DependenciesScanner *_scaner);
void deploy();
Expand Down

0 comments on commit fe59ba8

Please sign in to comment.