2019-09-08 13:37:33 +03:00
|
|
|
/*
|
2019-12-08 13:57:20 +03:00
|
|
|
* Copyright (C) 2018-2020 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;
|
2019-09-08 13:37:33 +03:00
|
|
|
|
|
|
|
class DEPLOYSHARED_EXPORT Extracter {
|
|
|
|
private:
|
2019-12-08 13:57:20 +03:00
|
|
|
// DeployCore::QtModule _qtModules = DeployCore::NONE;
|
2019-09-08 13:37:33 +03:00
|
|
|
|
2019-12-08 13:57:20 +03:00
|
|
|
// QStringList neadedLibs;
|
|
|
|
// QStringList systemLibs;
|
|
|
|
|
|
|
|
QHash<QString, DependencyMap> _targetDependencyes;
|
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;
|
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 = "");
|
2019-09-08 13:37:33 +03:00
|
|
|
bool copyTranslations(QStringList list);
|
|
|
|
|
|
|
|
bool extractQml();
|
|
|
|
|
|
|
|
QFileInfoList findFilesInsideDir(const QString &name, const QString &dirpath);
|
|
|
|
bool extractQmlAll();
|
|
|
|
bool extractQmlFromSource(const QString &sourceDir);
|
2019-11-05 14:33:14 +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-09-15 20:31:31 +03:00
|
|
|
bool extractWebEngine();
|
2019-09-08 13:37:33 +03:00
|
|
|
|
|
|
|
|
|
|
|
bool copyPlugin(const QString &plugin);
|
|
|
|
void copyPlugins(const QStringList &list);
|
|
|
|
|
|
|
|
|
2019-09-14 15:51:23 +03:00
|
|
|
void extractAllTargets();
|
|
|
|
void initQtModules();
|
|
|
|
void extractPlugins();
|
|
|
|
void copyFiles();
|
|
|
|
void copyTr();
|
|
|
|
void copyExtraPlugins();
|
2019-09-08 13:37:33 +03:00
|
|
|
public:
|
2019-11-13 18:18:44 +03:00
|
|
|
explicit Extracter(FileManager *fileManager, ConfigParser * cqt, DependenciesScanner *_scaner);
|
2019-09-08 13:37:33 +03:00
|
|
|
void deploy();
|
2019-09-16 10:56:22 +03:00
|
|
|
void clear();
|
2019-09-08 13:37:33 +03:00
|
|
|
|
|
|
|
friend class deploytest;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EXTRACTER_H_H
|