2019-09-08 13:37:33 +03:00
|
|
|
/*
|
2021-01-05 13:17:11 +03:00
|
|
|
* Copyright (C) 2018-2021 QuasarApp.
|
2019-09-08 13:37:33 +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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EXTRACTER_H
|
|
|
|
#define EXTRACTER_H
|
|
|
|
#include <QDir>
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <dependenciesscanner.h>
|
2019-12-08 13:57:20 +03:00
|
|
|
#include "dependencymap.h"
|
2019-09-08 13:37:33 +03:00
|
|
|
#include "deploy_global.h"
|
|
|
|
#include "filemanager.h"
|
|
|
|
#include "qml.h"
|
|
|
|
|
2019-09-14 13:59:11 +03:00
|
|
|
class ConfigParser;
|
2019-09-15 17:38:47 +03:00
|
|
|
class MetaFileManager;
|
2020-07-02 16:10:11 +03:00
|
|
|
class PluginsParser;
|
2019-09-08 13:37:33 +03:00
|
|
|
|
|
|
|
class DEPLOYSHARED_EXPORT Extracter {
|
2020-07-04 18:13:32 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit Extracter(FileManager *fileManager, PluginsParser* pluginsParser, ConfigParser * cqt, DependenciesScanner *_scaner);
|
|
|
|
void deploy();
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
private:
|
2019-12-08 13:57:20 +03:00
|
|
|
|
2020-01-27 20:02:25 +03:00
|
|
|
QHash<QString, DependencyMap> _packageDependencyes;
|
2019-09-08 13:37:33 +03:00
|
|
|
|
2019-11-13 18:18:44 +03:00
|
|
|
DependenciesScanner *_scaner;
|
2019-09-08 13:37:33 +03:00
|
|
|
FileManager *_fileManager;
|
2020-07-04 18:13:32 +03:00
|
|
|
PluginsParser* _pluginsParser;
|
2019-09-14 13:59:11 +03:00
|
|
|
ConfigParser *_cqt;
|
2019-09-15 17:38:47 +03:00
|
|
|
MetaFileManager *_metaFileManager;
|
2019-09-08 13:37:33 +03:00
|
|
|
|
2019-12-08 13:57:20 +03:00
|
|
|
void extract(const QString &file, DependencyMap* depMap, const QString& mask = "");
|
2020-12-04 17:13:12 +03:00
|
|
|
void extractExtraData(DependencyMap* depMap, const QString& mask = "");
|
|
|
|
|
2020-01-27 20:02:25 +03:00
|
|
|
bool copyTranslations(const QStringList &list, const QString &package);
|
2019-09-08 13:37:33 +03:00
|
|
|
|
|
|
|
bool extractQml();
|
|
|
|
|
|
|
|
QFileInfoList findFilesInsideDir(const QString &name, const QString &dirpath);
|
2019-11-05 14:33:14 +03:00
|
|
|
/**
|
2020-07-04 18:13:32 +03:00
|
|
|
* @brief extractLib
|
|
|
|
* @param file file of lib
|
|
|
|
* @param mask extraction mask. Used to filter extracts objects
|
|
|
|
*/
|
2019-12-08 13:57:20 +03:00
|
|
|
void extractLib(const QString & file, DependencyMap *depMap, const QString& mask = "");
|
2019-09-08 13:37:33 +03:00
|
|
|
|
|
|
|
bool deployMSVC();
|
2019-12-15 18:30:24 +03:00
|
|
|
bool extractWebEngine();
|
2020-07-22 15:25:23 +03:00
|
|
|
|
|
|
|
/**
|
2020-10-12 22:23:36 +03:00
|
|
|
* @brief angleGLLibs This method return the list of not dependent libs but needed wor working of web Engine (Windows only).
|
2020-07-22 15:25:23 +03:00
|
|
|
* @note see task 398 (https://github.com/QuasarApp/CQtDeployer/issues/398)
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
QList<QString> angleGLLibs();
|
|
|
|
|
2019-12-13 20:25:20 +03:00
|
|
|
/**
|
2020-07-04 18:13:32 +03:00
|
|
|
* @brief compress - this function join all target dependecies in to one struct
|
|
|
|
*/
|
2019-12-13 20:25:20 +03:00
|
|
|
void compress();
|
2019-09-14 15:51:23 +03:00
|
|
|
void extractAllTargets();
|
2020-12-04 17:13:12 +03:00
|
|
|
void extractExtraDataTargets();
|
|
|
|
|
2019-09-14 15:51:23 +03:00
|
|
|
void extractPlugins();
|
2020-07-02 16:00:34 +03:00
|
|
|
|
2019-09-14 15:51:23 +03:00
|
|
|
void copyFiles();
|
|
|
|
void copyTr();
|
2021-01-11 19:20:03 +03:00
|
|
|
void copyLibs(const QSet<QString> &files, const QString &package);
|
2020-12-04 17:13:12 +03:00
|
|
|
void copyExtraData(const QSet<QString> &files, const QString &package);
|
2019-12-15 18:30:24 +03:00
|
|
|
|
2020-01-27 20:02:25 +03:00
|
|
|
bool isWebEngine(const QString& package) const;
|
2020-02-29 16:42:18 +03:00
|
|
|
void extractPluginLib(const QString &item, const QString &package);
|
|
|
|
|
2019-09-08 13:37:33 +03:00
|
|
|
friend class deploytest;
|
2020-07-04 18:13:32 +03:00
|
|
|
void copyExtraPlugins(const QString &package);
|
2019-09-08 13:37:33 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EXTRACTER_H_H
|