mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-02 04:29:35 +00:00
added option 'allPlatforms'
This commit is contained in:
parent
b1a79eef9c
commit
15ff3c2d82
@ -190,7 +190,8 @@ void DeployCore::help() {
|
||||
{"qif", "Create the QIF installer for deployement programm"},
|
||||
{"qifFromSystem", "force use system binarycreator tool of qif from path or qt"},
|
||||
{"deploySystem", "Deploys all libraries (do not work in snap )"},
|
||||
{"deploySystem-with-libc", "deploy all libs libs (only linux) (do not work in snap )"},
|
||||
{"deploySystem-with-libc", "deploy all libs (only linux) (do not work in snap )"},
|
||||
{"allPlatforms", "deploy all platforms plugins (big size)."},
|
||||
|
||||
}
|
||||
},
|
||||
@ -300,6 +301,7 @@ QStringList DeployCore::helpKeys() {
|
||||
"qifStyle",
|
||||
"qifBanner",
|
||||
"qifLogo",
|
||||
"allPlatforms"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -158,6 +158,24 @@ void Extracter::clear() {
|
||||
}
|
||||
}
|
||||
|
||||
void Extracter::extractPlatforms(const PluginsParser& pluginsParser,
|
||||
const QString& package) {
|
||||
|
||||
auto cnf = DeployCore::_config;
|
||||
QStringList plugins;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
|
||||
pluginsParser.scanPlatforms(cnf->getPlatform(), plugins);
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package +
|
||||
"/" + distro.getPluginsOutDir() + "/platforms";
|
||||
|
||||
for (const auto& plugin :plugins) {
|
||||
_fileManager->copyFile(plugin, targetPath);
|
||||
|
||||
extractPluginLib(plugin, package);
|
||||
}
|
||||
}
|
||||
|
||||
void Extracter::extractPlugins() {
|
||||
auto cnf = DeployCore::_config;
|
||||
PluginsParser pluginsParser;
|
||||
@ -169,16 +187,11 @@ void Extracter::extractPlugins() {
|
||||
pluginsParser.scan(cnf->qtDir.getPlugins(), plugins, _packageDependencyes[i.key()].qtModules());
|
||||
copyPlugins(plugins, i.key());
|
||||
|
||||
pluginsParser.scanPlatforms(cnf->getPlatform(), plugins);
|
||||
auto targetPath = cnf->getTargetDir() + "/" + i.key() +
|
||||
"/" + distro.getPluginsOutDir() + "/platforms";
|
||||
|
||||
for (const auto& plugin :plugins) {
|
||||
_fileManager->copyFile(plugin, targetPath);
|
||||
|
||||
extractPluginLib(plugin, i.key());
|
||||
if (QuasarAppUtils::Params::isEndable("allPlatforms")) {
|
||||
copyPlugin("platforms", i.key());
|
||||
} else {
|
||||
extractPlatforms(pluginsParser, i.key());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
class ConfigParser;
|
||||
class MetaFileManager;
|
||||
class PluginsParser;
|
||||
|
||||
class DEPLOYSHARED_EXPORT Extracter {
|
||||
private:
|
||||
@ -66,6 +67,9 @@ class DEPLOYSHARED_EXPORT Extracter {
|
||||
bool isWebEngine(const QString& package) const;
|
||||
void extractPluginLib(const QString &item, const QString &package);
|
||||
|
||||
void extractPlatforms(const PluginsParser& pluginsParser,
|
||||
const QString& package);
|
||||
|
||||
public:
|
||||
explicit Extracter(FileManager *fileManager, ConfigParser * cqt, DependenciesScanner *_scaner);
|
||||
void deploy();
|
||||
|
@ -21,7 +21,6 @@ static const PluginModuleMapping pluginModuleMappings[] =
|
||||
{"accessible", DeployCore::QtModule::QtGuiModule},
|
||||
{"iconengines", DeployCore::QtModule::QtGuiModule},
|
||||
{"imageformats", DeployCore::QtModule::QtGuiModule},
|
||||
{"platforms", DeployCore::QtModule::QtGuiModule},
|
||||
{"platformthemes", DeployCore::QtModule::QtGuiModule},
|
||||
{"platforminputcontexts", DeployCore::QtModule::QtGuiModule},
|
||||
{"virtualkeyboard", DeployCore::QtModule::QtGuiModule},
|
||||
@ -96,7 +95,7 @@ quint64 PluginsParser::qtModuleForPlugin(const QString &subDirName) {
|
||||
return result != end ? result->module : 0; // "designer"
|
||||
}
|
||||
|
||||
Platform PluginsParser::platformForPlugin(const QString &name) {
|
||||
Platform PluginsParser::platformForPlugin(const QString &name) const {
|
||||
const auto end = std::end(platformMappings);
|
||||
const auto result =
|
||||
std::find_if(std::begin(platformMappings), end,
|
||||
@ -138,7 +137,7 @@ bool PluginsParser::scan(const QString& pluginPath,
|
||||
return true;
|
||||
}
|
||||
|
||||
void PluginsParser::scanPlatforms(Platform platform, QStringList &resDependencies) {
|
||||
void PluginsParser::scanPlatforms(Platform platform, QStringList &resDependencies) const {
|
||||
const DeployConfig* cnf = DeployCore::_config;
|
||||
|
||||
QString platformPluginPath = cnf->qtDir.getPlugins() + "/platforms/";
|
||||
|
@ -37,14 +37,14 @@ public:
|
||||
bool scan(const QString &pluginPath, QStringList& resDependencies,
|
||||
DeployCore::QtModule qtModules);
|
||||
|
||||
void scanPlatforms(Platform platform, QStringList& resDependencies);
|
||||
void scanPlatforms(Platform platform, QStringList& resDependencies) const;
|
||||
|
||||
|
||||
private:
|
||||
DependenciesScanner *_libScaner = nullptr;
|
||||
|
||||
quint64 qtModuleForPlugin(const QString &subDirName);
|
||||
Platform platformForPlugin(const QString &name);
|
||||
Platform platformForPlugin(const QString &name) const;
|
||||
|
||||
bool copyPlugin(const QString &plugin, const QString &package);
|
||||
void copyExtraPlugins(const QString &package);
|
||||
|
Loading…
x
Reference in New Issue
Block a user