CQtDeployer/Deploy/pluginsparser.h

56 lines
1.3 KiB
C
Raw Normal View History

2019-09-23 16:46:57 +03:00
//#
2019-12-08 13:57:20 +03:00
//# Copyright (C) 2018-2020 QuasarApp.
2019-09-23 16:46:57 +03:00
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
2019-08-31 22:22:26 +03:00
#ifndef QTMODULES_H
#define QTMODULES_H
#include <QStringList>
2019-09-09 21:19:44 +03:00
#include "deploy_global.h"
2019-09-14 15:51:23 +03:00
#include "deploycore.h"
2019-08-31 22:22:26 +03:00
class DependenciesScanner;
2019-09-09 21:19:44 +03:00
struct DEPLOYSHARED_EXPORT PluginModuleMapping
2019-08-31 22:22:26 +03:00
{
const char *directoryName;
quint64 module;
};
2020-07-02 16:00:34 +03:00
struct DEPLOYSHARED_EXPORT PlatformMapping
{
const char *_pluginName;
Platform _platform;
};
/**
* @brief The PluginsParser class - scaner of plugins
*/
2019-09-09 21:19:44 +03:00
class DEPLOYSHARED_EXPORT PluginsParser
2019-08-31 22:22:26 +03:00
{
public:
2019-09-14 15:51:23 +03:00
PluginsParser();
bool scan(const QString &pluginPath, QStringList& resDependencies,
DeployCore::QtModule qtModules);
2019-09-08 13:37:33 +03:00
2020-07-02 16:00:34 +03:00
void scanPlatforms(Platform platform, QStringList& resDependencies);
private:
DependenciesScanner *_libScaner = nullptr;
quint64 qtModuleForPlugin(const QString &subDirName);
Platform platformForPlugin(const QString &name);
2019-09-08 13:37:33 +03:00
2020-07-02 16:00:34 +03:00
bool copyPlugin(const QString &plugin, const QString &package);
void copyExtraPlugins(const QString &package);
void copyPlugins(const QStringList &list, const QString &package);
QString getPluginNameFromFile(const QString& baseNaem) const;
2019-08-31 22:22:26 +03:00
};
#endif // QTMODULES_H