mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-27 02:04:33 +00:00
commit
e183e98d27
@ -7,6 +7,7 @@
|
||||
# This is a stub for the cmake build system.
|
||||
|
||||
|
||||
|
||||
project(CQtDeployer LANGUAGES CXX)
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
116
CONTRIBUTING.md
116
CONTRIBUTING.md
@ -1,20 +1,24 @@
|
||||
# QuassarApp operation rules
|
||||
## General rules
|
||||
### QuasarApp internal developers
|
||||
* If there is no indication, separate from the master branch.
|
||||
* We realize the task
|
||||
* Upon completion of work, issue a Pull Request to the master.
|
||||
* if there is no instruction to complete the task, separate you new branch from the version branch (for example v1.x).
|
||||
* Realize the task
|
||||
* At the end of the work, create a pull request to the branch from which you created the branch.
|
||||
Example:
|
||||
I made corrections for version 1.5 and created a new branch from branch v1.5, which means that I should create a pull request to branch v1.5,
|
||||
|
||||
### External QuasarApp Developers
|
||||
* Making Fork repository.
|
||||
* If there is no indication, separate from the master branch.
|
||||
* We realize the task
|
||||
* Upon completion of work, issue a Pull Request to the master.
|
||||
* Before starting work on the Task, drag it to [inProgress](https://github.com/orgs/QuasarApp/projects) in projects
|
||||
* Switch to the branch of the version in which you need to perform the correction (example of the names of the branch with the version: v1.x).
|
||||
* Realize the task
|
||||
* Upon completion, create a Pull Request in the branch from which they are separated.
|
||||
Example:
|
||||
I made corrections for version 1.5 and created a new branch from branch v1.5, which means that I should create a pull request to branch v1.5,
|
||||
* ( not necessary ) Before starting work on the Task, drag it to [inProgress](https://github.com/orgs/QuasarApp/projects) in projects
|
||||
|
||||
### Prohibited from working in QuassarApp
|
||||
### Forbidden
|
||||
|
||||
* Use push force. All problems need to be solved by a new committee.
|
||||
* Using 'push force'. All conflicts need to be solved by a new commite.
|
||||
* Push code directly to master.
|
||||
* Break the code design rules. If some aspect is not described, you need to write in the same style as it was written before you.
|
||||
* Move the code for no particular reason.
|
||||
@ -25,7 +29,7 @@
|
||||
The content of the pull request must include:
|
||||
* The number of the task that solves (if performed according to the task)
|
||||
* A complete description of everything that was done in the task.
|
||||
* In the case when a pull creation is created, the Task is still running, marking the Pull Request header with a WIP tag (example [WIP] MyTask)
|
||||
* In the case when a pull creation is created and you still work on the task, change the header of the pool request by adding a WIP tag to the beginning (example [WIP] MyTask)
|
||||
* Pull Request must always be assigned to the branch from which you separated.
|
||||
|
||||
## Making Tasks
|
||||
@ -35,71 +39,75 @@ You must:
|
||||
* Completely describe the problem or task.
|
||||
* If you have a solution to the problem fully describe what and how to do.
|
||||
|
||||
## Code Registration
|
||||
## Code Guideline
|
||||
|
||||
When writing code follows the following rules: (inscribed written in order of importance)
|
||||
1. If in order to achieve high performance gains (over 10%) you need to sacrifice any of the rules, donate them.
|
||||
2. In no case do not use the C-style Cast.
|
||||
3. All connected headers should be stored to the maximum in cpp files.
|
||||
4. If the class uses pointers, then initialize the prototypes of these classes to the place where the header is connected: class a; a * value = nullptr;
|
||||
4. Use fast forward declaration. If pointers are used in the class, then initialize the prototypes of these classes as follows: class a; a* value = nullptr; without connecting the headers of the types of indicators.
|
||||
5. In headings it is necessary to null the signs.
|
||||
6. Template functions are described in cpp files.
|
||||
7. If possible, think through your code so that it does not have a cast.
|
||||
8. Write class access specifiers in the following order: private, private slots, protected, protected slots, public, public slots, signals
|
||||
8. Write class access specifiers in the following order: public, public slots, siganls, protected, protected slots, private, private slots.
|
||||
9. Carefully check and arrange spaces between operators in the code.
|
||||
10. Moving the bracket to the next line is prohibited.
|
||||
11. When transferring the shift should be equal to 4 spaces.
|
||||
12. Before pushing the code, be sure to run the tests.
|
||||
|
||||
# Правила работы QuassarApp
|
||||
## Общие правила
|
||||
### Внутренние разработчики QuasarApp
|
||||
* Если нет никаких указаний отделяемся от ветки master
|
||||
* Реализуем поставленную задачу
|
||||
* По завершению работы оформить Pull Request в master.
|
||||
# QuassarApp правила работы
|
||||
## Основные правила
|
||||
### QuasarApp внутренние разработчики
|
||||
* Если нет инструкции для выполнения задачи, отделите новую ветку от ветви версии (например, v1.5).
|
||||
* Реализовать задачу
|
||||
* В конце работы создайте пул-запрос к ветке, из которой вы создали ветку.
|
||||
Пример:
|
||||
Я внес исправления для версии 1.5 и создал ветвление из ветви v1.5, что означает, что я должен создать запрос на извлечение в ветке v1.5,
|
||||
|
||||
### Внешние разработчики QuasarApp
|
||||
* Делаем Fork репозитория.
|
||||
* Если нет никаких указаний отделяемся от ветки master
|
||||
* Реализуем поставленную задачу
|
||||
* По завершению работы оформить Pull Request в master.
|
||||
* Перед началом работы над Задачей, перетащить ее в [inProgress](https://github.com/orgs/QuasarApp/projects) в проектах
|
||||
* Создание Fork репозитория.
|
||||
* Переключитесь на ветку версии, в которой нужно выполнить исправление (пример названий ветки с версией: v1.x).
|
||||
* Реализовать задачу
|
||||
* По завершении создайте Запрос на извлечение в ветке, от которой они отделены.
|
||||
Пример:
|
||||
Я внес исправления для версии 1.5 и создал ветвление из ветви v1.5, что означает, что я должен создать запрос на извлечение в ветке v1.5,
|
||||
* (не обязательно) Перед началом работы над задачей перетащите ее на [inProgress] (https://github.com/orgs/QuasarApp/projects) в проектах
|
||||
|
||||
### При работе в QuassarApp запрещается
|
||||
### Запрещено работать в QuassarApp
|
||||
|
||||
* Использовать push force. Все проблемы нужно решать новым комитом.
|
||||
* Пушить код напрямую в master.
|
||||
* Нарушать правила оформления кода. Если какой то аспект не описан, писать нужно в том-же стиле как было написано до вас.
|
||||
* Перемещать код без особой на это причины.
|
||||
* Использовать push force. Все проблемы должны быть решены новым комитом.
|
||||
* Пушить код на прямую в мастер или другую ветку релиза.
|
||||
* Нарушать правила оформления кода. Если какой-то аспект не описан, вам нужно писать в том же стиле, в котором он был написан до вас.
|
||||
* Переместить код без особой причины.
|
||||
|
||||
|
||||
## Оформление Pull Request
|
||||
## Выполнение запроса на слияние
|
||||
|
||||
Содержимое Pull Request должно обязательно включать:
|
||||
* Номер задания которую решает (если выполнялось по поставленной задаче)
|
||||
* Полное описание всего что было сделано в задаче.
|
||||
* В случае когда создается пулреквест а Задача еще выполняется помечать заголовок Pull Request тегом WIP (пример [WIP] MyTask)
|
||||
* Pull Request всегда должен быть назначен именно в ту ветку от которой вы отделялись.
|
||||
Содержание pool request должно включать:
|
||||
* Номер задачи, которая решается (если выполняется согласно задаче)
|
||||
* Полное описание всего, что было сделано в задании.
|
||||
* В случае создания Poll request и задача все еще выполняется, изменить заголовок запроса на извлечение, добавив в начало тег WIP (пример [WIP] MyTask)
|
||||
* Запрос на извлечение всегда должен быть назначен ветви, от которой вы отделены.
|
||||
|
||||
## Оформление Задачи
|
||||
В случае необходимости назначить на кого-то задачу
|
||||
## Выполнение задач
|
||||
При необходимости назначьте кому-нибудь задачу
|
||||
Вы должны:
|
||||
* Создать соответствующее обсуждение на github, выбранного репазитория.
|
||||
* Полностью описать проблему или задачу.
|
||||
* Если у вас есть решение задачи полностью описать что и как делать.
|
||||
* Создайте соответствующую дискуссию на GitHub, выбранном хранилище.
|
||||
* Полностью опишите проблему или задачу.
|
||||
* Если у вас есть решение проблемы, полностью опишите, что и как делать.
|
||||
|
||||
## Оформление кода
|
||||
## Регистрация кода
|
||||
|
||||
При написании кода придерживается следующих правил: (привила записаны в порядке важности)
|
||||
1. Если ради достижения высокого прироста производительности (более 10%) вам нужно пожертвовать каким либо из правил, жертвуйте ими.
|
||||
2. Не в коем случае не использовать C-style Cast.
|
||||
3. Все подключаемые заголовки по максимуму должны хранится в cpp файлах.
|
||||
4. Если в классе используются указатели то инициализировать прототипы этих классов в место подключения заголовка: сlass a; a *value = nullptr;
|
||||
5. В заголовках обязательно занулять указатели.
|
||||
6. Шаблонные функции описывать в cpp файлах.
|
||||
7. По возможности продумывать ваш код так что бы в нем не было cast.
|
||||
8. Спецификаторы доступа класса писать в следующем порядке private, private slots, protected, protected slots, public, public slots, signals
|
||||
9. Внимательно проверять и расставлять пробелы между операторами в коде.
|
||||
10. Перенос скобки на следующую строку запрещается.
|
||||
11. При переносе сдвиг должен быть равен 4 пробела.
|
||||
12. Перед пушем кода обязательно прогнать тесты.
|
||||
При написании кода соблюдайте следующие правила: (надписи пишутся в порядке важности)
|
||||
1. Если для достижения более высокой производительности (более 10%) вам необходимо пожертвовать каким-либо из правил, пожертвуйте ими.
|
||||
2. Ни в коем случае не используйте C-стиль Cast.
|
||||
3. Все подключенные заголовки должны быть максимально сохранены в файлах cpp.
|
||||
4. Используйте fast forward declaration. Если в классе используются указатели, то инициализируйте прототипы этих классов следующим образом: class a; a* значение = nullptr; без подключения заголовков типа созданного обьекта.
|
||||
5. В заголовках необходимо обнулить знаки.
|
||||
6. Функции шаблона описаны в файлах cpp.
|
||||
7. Если возможно, продумайте свой код так, чтобы в нем не было приведений.
|
||||
8. Напишите спецификаторы доступа к классам в следующем порядке: общедоступные, общедоступные, защищенные, защищенные, частные, частные.
|
||||
9. Тщательно проверьте и расставьте пробелы между операторами в коде.
|
||||
10. Перемещение скобки на следующую строку запрещено.
|
||||
11. При переносе смена должна быть равна 4 пробелам.
|
||||
12. Прежде чем пушить код, обязательно запустите тесты.
|
||||
|
@ -19,7 +19,7 @@ TEMPLATE = lib
|
||||
|
||||
DEFINES += DEPLOY_LIBRARY
|
||||
|
||||
VERSION = 1.4.4.1
|
||||
VERSION = 1.4.5.0
|
||||
|
||||
DEFINES += APP_VERSION='\\"$$VERSION\\"'
|
||||
|
||||
|
@ -32,7 +32,7 @@ function generateShortCutCmd(cmd) {
|
||||
"Version=@Version@\n
|
||||
Type=Application\n
|
||||
Terminal=false\n
|
||||
Exec=@TargetDir@/" + cmd + ".sh\n
|
||||
Exec=\"@TargetDir@/" + cmd + ".sh\"\n
|
||||
Name=" + name + "\n
|
||||
Icon=@TargetDir@/$LOCAL_ICON\n
|
||||
Name[en_US]=" + name);
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "filemanager.h"
|
||||
#include "packing.h"
|
||||
#include "pathutils.h"
|
||||
#include "pluginsparser.h"
|
||||
#include "quasarapp.h"
|
||||
|
||||
#include <cassert>
|
||||
@ -32,27 +33,27 @@
|
||||
|
||||
static QString defaultPackage = "";
|
||||
|
||||
template<typename Container, typename Setter>
|
||||
template<typename Container, typename Adder>
|
||||
bool parsePackagesPrivate(Container& mainContainer,
|
||||
const QStringList &inputParamsList,
|
||||
Setter setter) {
|
||||
Adder adder) {
|
||||
|
||||
for (const auto& str: inputParamsList) {
|
||||
auto pair = str.split(DeployCore::getSeparator(1));
|
||||
auto first = pair.value(0, "");
|
||||
auto second = pair.value(1, "");
|
||||
if (pair.size() == 1)
|
||||
(mainContainer[defaultPackage].*setter)(first);
|
||||
auto paramsList = str.split(DeployCore::getSeparator(1));
|
||||
auto first = paramsList.value(0, "");
|
||||
auto second = paramsList.value(1, "");
|
||||
if (paramsList.size() == 1)
|
||||
(mainContainer[defaultPackage].*adder)(first);
|
||||
else {
|
||||
first = PathUtils::fullStripPath(first);
|
||||
if (!mainContainer.contains(first)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
(mainContainer[first].*setter)(second);
|
||||
|
||||
for (int i = 1; i < paramsList.size(); ++i) {
|
||||
(mainContainer[first].*adder)(paramsList[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -535,12 +536,11 @@ bool ConfigParser::parseDeployMode() {
|
||||
auto listNamesMasks = QuasarAppUtils::Params::getStrArg("extraLibs").
|
||||
split(DeployCore::getSeparator(0));
|
||||
|
||||
auto listExtraPlugin = QuasarAppUtils::Params::getStrArg("extraPlugin").
|
||||
split(DeployCore::getSeparator(0));
|
||||
|
||||
|
||||
setExtraPath(listLibDir);
|
||||
setExtraNames(listNamesMasks);
|
||||
setExtraPlugins(listExtraPlugin);
|
||||
initPlugins();
|
||||
|
||||
if (!initQmake()) {
|
||||
return false;
|
||||
@ -1110,11 +1110,46 @@ void ConfigParser::setExtraNames(const QStringList &value) {
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigParser::setExtraPlugins(const QStringList &value) {
|
||||
for (const auto &i : value) {
|
||||
if (!i.isEmpty())
|
||||
_config.extraPlugins.append(i);
|
||||
bool ConfigParser::initPlugins() {
|
||||
|
||||
auto listExtraPlugin = QuasarAppUtils::Params::getStrArg("extraPlugin").
|
||||
split(DeployCore::getSeparator(0), QString::SkipEmptyParts);
|
||||
|
||||
auto listEnablePlugins = QuasarAppUtils::Params::getStrArg("enablePlugins").
|
||||
split(DeployCore::getSeparator(0), QString::SkipEmptyParts);
|
||||
|
||||
auto listDisablePlugins = QuasarAppUtils::Params::getStrArg("disablePlugins").
|
||||
split(DeployCore::getSeparator(0), QString::SkipEmptyParts);
|
||||
|
||||
auto erroLog = [](const QString &flag){
|
||||
QuasarAppUtils::Params::log(QString("Set %0 fail, because you try set %0 for not inited package."
|
||||
" Use 'targetPackage' flag for init the packages").arg(flag),
|
||||
QuasarAppUtils::Error);
|
||||
};
|
||||
|
||||
|
||||
if (listExtraPlugin.size() && !parsePackagesPrivate(_config.packagesEdit(),
|
||||
listExtraPlugin,
|
||||
&DistroModule::addExtraPlugins)) {
|
||||
erroLog("extra plugins");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (listEnablePlugins.size() && !parsePackagesPrivate(_config.packagesEdit(),
|
||||
listEnablePlugins,
|
||||
&DistroModule::addEnabledPlugins)) {
|
||||
erroLog("enable plugins");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (listDisablePlugins.size() && !parsePackagesPrivate(_config.packagesEdit(),
|
||||
listDisablePlugins,
|
||||
&DistroModule::addDisabledPlugins)) {
|
||||
erroLog("disable plugins");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QString ConfigParser::findWindowsPath(const QString& path) const {
|
||||
@ -1222,12 +1257,14 @@ bool ConfigParser::smartMoveTargets() {
|
||||
return result;
|
||||
}
|
||||
|
||||
ConfigParser::ConfigParser(FileManager *filemanager, DependenciesScanner* scaner, Packing *pac):
|
||||
ConfigParser::ConfigParser(FileManager *filemanager, PluginsParser *pluginsParser, DependenciesScanner* scaner, Packing *pac):
|
||||
_fileManager(filemanager),
|
||||
_pluginsParser(pluginsParser),
|
||||
_scaner(scaner),
|
||||
_packing(pac) {
|
||||
|
||||
assert(_fileManager);
|
||||
assert(_pluginsParser);
|
||||
assert(_scaner);
|
||||
assert(_packing);
|
||||
|
||||
|
@ -25,13 +25,23 @@ class FileManager;
|
||||
class DependenciesScanner;
|
||||
class Packing;
|
||||
class iDistribution;
|
||||
class PluginsParser;
|
||||
|
||||
class DEPLOYSHARED_EXPORT ConfigParser
|
||||
{
|
||||
public:
|
||||
ConfigParser(FileManager *filemanager, PluginsParser* pluginsParser, DependenciesScanner *scaner, Packing* pac);
|
||||
bool parseParams();
|
||||
bool smartMoveTargets();
|
||||
|
||||
const DeployConfig* config() const;
|
||||
friend class deploytest;
|
||||
|
||||
private:
|
||||
|
||||
DeployConfig _config;
|
||||
FileManager *_fileManager;
|
||||
PluginsParser *_pluginsParser;
|
||||
DependenciesScanner *_scaner;
|
||||
Packing * _packing;
|
||||
|
||||
@ -68,7 +78,7 @@ private:
|
||||
void setExtraPath(const QStringList &value);
|
||||
void setExtraNames(const QStringList &value);
|
||||
|
||||
void setExtraPlugins(const QStringList &value);
|
||||
bool initPlugins();
|
||||
|
||||
void initEnvirement();
|
||||
|
||||
@ -91,14 +101,6 @@ private:
|
||||
iDistribution* getDistribution();
|
||||
|
||||
bool isNeededQt() const;
|
||||
public:
|
||||
ConfigParser(FileManager *filemanager, DependenciesScanner *scaner, Packing* pac);
|
||||
bool parseParams();
|
||||
bool smartMoveTargets();
|
||||
|
||||
const DeployConfig* config() const;
|
||||
friend class deploytest;
|
||||
|
||||
};
|
||||
|
||||
#endif // CQT_H
|
||||
|
@ -47,21 +47,31 @@ QMultiMap<LibPriority, LibInfo> DependenciesScanner::getLibsFromEnvirement(
|
||||
for (const auto & lib : values) {
|
||||
LibInfo info;
|
||||
|
||||
auto priority = (DeployCore::getLibPriority(lib));
|
||||
if (_scanedLibs.contains(lib)) {
|
||||
info = _scanedLibs.value(lib);
|
||||
|
||||
if ((priority >= SystemLib) && !QuasarAppUtils::Params::isEndable("deploySystem")) {
|
||||
continue;
|
||||
if ((info.priority >= SystemLib) && !QuasarAppUtils::Params::isEndable("deploySystem")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
auto priority = (DeployCore::getLibPriority(lib));
|
||||
|
||||
if ((priority >= SystemLib) && !QuasarAppUtils::Params::isEndable("deploySystem")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
info.setPriority(priority);
|
||||
|
||||
if (!fillLibInfo(info, lib)) {
|
||||
QuasarAppUtils::Params::log(
|
||||
"error extract lib info from " + lib + "(" + libName + ")",
|
||||
QuasarAppUtils::VerboseLvl::Warning);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!fillLibInfo(info, lib)) {
|
||||
QuasarAppUtils::Params::log(
|
||||
"error extract lib info from " + lib + "(" + libName + ")",
|
||||
QuasarAppUtils::VerboseLvl::Warning);
|
||||
continue;
|
||||
}
|
||||
|
||||
info.setPriority(priority);
|
||||
|
||||
if (!DeployCore::_config->ignoreList.isIgnore(info)) {
|
||||
res.insertMulti(info.getPriority(), info);
|
||||
}
|
||||
|
@ -10,13 +10,16 @@
|
||||
#include "extracter.h"
|
||||
#include "filemanager.h"
|
||||
#include "packing.h"
|
||||
#include "pluginsparser.h"
|
||||
#include <quasarapp.h>
|
||||
|
||||
Deploy::Deploy() {
|
||||
_fileManager = new FileManager();
|
||||
_scaner = new DependenciesScanner();
|
||||
_packing = new Packing();
|
||||
_paramsParser = new ConfigParser(_fileManager, _scaner, _packing);
|
||||
_pluginParser = new PluginsParser();
|
||||
|
||||
_paramsParser = new ConfigParser(_fileManager, _pluginParser, _scaner, _packing);
|
||||
|
||||
}
|
||||
|
||||
@ -63,6 +66,10 @@ Deploy::~Deploy() {
|
||||
delete _packing;
|
||||
}
|
||||
|
||||
if (_pluginParser) {
|
||||
delete _pluginParser;
|
||||
}
|
||||
|
||||
DeployCore::_config = nullptr;
|
||||
}
|
||||
|
||||
@ -73,7 +80,7 @@ bool Deploy::prepare() {
|
||||
return false;
|
||||
}
|
||||
|
||||
_extracter = new Extracter(_fileManager, _paramsParser, _scaner);
|
||||
_extracter = new Extracter(_fileManager, _pluginParser, _paramsParser, _scaner);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ class ConfigParser;
|
||||
class Extracter;
|
||||
class FileManager;
|
||||
class DependenciesScanner;
|
||||
class PluginsParser;
|
||||
class Packing;
|
||||
|
||||
enum exitCodes {
|
||||
@ -34,6 +35,8 @@ private:
|
||||
Extracter *_extracter = nullptr;
|
||||
FileManager *_fileManager = nullptr;
|
||||
DependenciesScanner *_scaner = nullptr;
|
||||
PluginsParser *_pluginParser = nullptr;
|
||||
|
||||
Packing *_packing = nullptr;
|
||||
|
||||
bool prepare();
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "deployconfig.h"
|
||||
#include "quasarapp.h"
|
||||
|
||||
void DeployConfig::reset() {
|
||||
*this = DeployConfig{};
|
||||
@ -55,6 +56,29 @@ QHash<QString, DistroModule> &DeployConfig::packagesEdit() {
|
||||
return _packages;
|
||||
}
|
||||
|
||||
Platform DeployConfig::getPlatform(const QString& package) const {
|
||||
Platform result = Platform::UnknownPlatform;
|
||||
|
||||
if (_packages.contains(package)) {
|
||||
auto disto = getDistroFromPackage(package);
|
||||
|
||||
for( auto it = disto.targets().cbegin(); it != disto.targets().cend(); ++it) {
|
||||
result = result | _targets.value(*it).getPlatform();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
for( auto it = _targets.cbegin(); it != _targets.cend(); ++it) {
|
||||
result = result | it.value().getPlatform();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
const QHash<QString, TargetInfo> &DeployConfig::targets() const {
|
||||
return _targets;
|
||||
}
|
||||
|
@ -26,11 +26,6 @@ public:
|
||||
*/
|
||||
IgnoreRule ignoreList;
|
||||
|
||||
/**
|
||||
* @brief extraPlugins - list with pathes of extra plugins or plugins names
|
||||
*/
|
||||
QStringList extraPlugins;
|
||||
|
||||
/**
|
||||
* @brief appDir - it is cqtdeployer library location for ignre cqtdeployr libraries
|
||||
*/
|
||||
@ -91,6 +86,8 @@ public:
|
||||
QHash<QString, TargetInfo>& targetsEdit();
|
||||
QHash<QString, DistroModule>& packagesEdit();
|
||||
|
||||
Platform getPlatform(const QString& package) const;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "deploycore.h"
|
||||
#include "quasarapp.h"
|
||||
#include "pathutils.h"
|
||||
#include "pluginsparser.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
@ -190,7 +191,7 @@ 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 )"},
|
||||
|
||||
}
|
||||
},
|
||||
@ -211,7 +212,6 @@ void DeployCore::help() {
|
||||
" Example: '-extraLibs mySql' - forces to copy all libraries whose names contain mySql to the project folder."
|
||||
" This option is case sensitive."},
|
||||
{"-customScript [scriptCode]", "Insert extra code inTo All run script."},
|
||||
{"-extraPlugin [list,params]", "Sets an additional path to extraPlugin of an app"},
|
||||
{"-recursiveDepth [params]", "Sets the Depth of recursive search of libs and depth for ignoreEnv option (default 0)"},
|
||||
{"-targetDir [params]", "Sets target directory(by default it is the path to the first deployable file)"},
|
||||
{"-verbose [0-3]", "Shows debug log"},
|
||||
@ -238,8 +238,20 @@ void DeployCore::help() {
|
||||
},
|
||||
|
||||
{
|
||||
"Part 4 QtInstallFramework options", {
|
||||
{"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style. Available styles: quasar, quasarDark "},
|
||||
"Part 4 Plugins Control Options", {
|
||||
{"-extraPlugin [package;val1;val2,SingeleVal]", "Sets an additional path to third-party application plug-in"},
|
||||
{"-enablePlugins [package;val1;val2,SingeleVal", "Enables additional plugins for distribution."
|
||||
" By default disabled next plugins: " + PluginsParser::defaultForbidenPlugins().join(',') + " if you want enable"
|
||||
" it then use '-enablePlugins " + PluginsParser::defaultForbidenPlugins().join(',') + "' option"},
|
||||
{"-disablePlugins [package;val1;val2,SingeleVal]", "Disables plugins for distribution. "
|
||||
"You can disable any plugin of your Qt build, just see the yourQtFolder/plugins forlder for available plugins."
|
||||
" Example if you want disable qxcb plugin: -disablePlugins qxcb. Note that the name of the plugin is indicated without its extension"},
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"Part 5 QtInstallFramework options", {
|
||||
{"-qifStyle [path/to/style.css]", "Sets the path to the CSS style file or sets the default style. Available styles: quasar "},
|
||||
{"-qifBanner [path/to/banner.png]", "Sets path to the banner png file."},
|
||||
{"-qifLogo [path/to/logo.png]", "Sets path to the logo png file."},
|
||||
}
|
||||
|
@ -32,14 +32,28 @@ struct DEPLOYSHARED_EXPORT QtModuleEntry {
|
||||
|
||||
|
||||
enum Platform {
|
||||
UnknownPlatform = 0x00,
|
||||
Win32 = 0x01,
|
||||
Win64 = 0x02,
|
||||
UnknownPlatform = 0x0000,
|
||||
// Windows
|
||||
Win32 = 0x0001,
|
||||
Win64 = 0x0002,
|
||||
Win = Win32 | Win64,
|
||||
Unix32 = 0x04,
|
||||
Unix64 = 0x08,
|
||||
Unix = Unix32 | Unix64,
|
||||
GeneralFile = 0x10
|
||||
|
||||
// Unix
|
||||
Unix_x86_32 = 0x0004,
|
||||
Unix_x86_64 = 0x0008,
|
||||
Unix_x86 = Unix_x86_32 | Unix_x86_64,
|
||||
Unix_ARM_32 = 0x0010,
|
||||
Unix_ARM_64 = 0x0020,
|
||||
Unix_ARM = Unix_x86_32 | Unix_x86_64,
|
||||
Unix = Unix_x86 | Unix_ARM,
|
||||
|
||||
// Other
|
||||
|
||||
// Web
|
||||
WebGl = 0x0040,
|
||||
WebRemote = 0x0080,
|
||||
|
||||
GeneralFile = 0x0100
|
||||
};
|
||||
|
||||
enum LibPriority : int {
|
||||
|
@ -87,3 +87,46 @@ void DistroModule::setPublisher(const QString &publisher)
|
||||
{
|
||||
_publisher = publisher;
|
||||
}
|
||||
|
||||
QSet<QString> DistroModule::enabledPlugins() const
|
||||
{
|
||||
return _enabled;
|
||||
}
|
||||
|
||||
void DistroModule::setEnabledPlugins(const QSet<QString> &enabled)
|
||||
{
|
||||
_enabled = enabled;
|
||||
}
|
||||
|
||||
void DistroModule::addEnabledPlugins(const QString &enabled) {
|
||||
_enabled += enabled;
|
||||
}
|
||||
|
||||
QSet<QString> DistroModule::disabledPlugins() const
|
||||
{
|
||||
return _disabled;
|
||||
}
|
||||
|
||||
void DistroModule::setDisabledPlugins(const QSet<QString> &disabled)
|
||||
{
|
||||
_disabled = disabled;
|
||||
}
|
||||
|
||||
void DistroModule::addDisabledPlugins(const QString &disabled) {
|
||||
_disabled += disabled;
|
||||
}
|
||||
|
||||
QSet<QString> DistroModule::extraPlugins() const
|
||||
{
|
||||
return _extraPlugins;
|
||||
}
|
||||
|
||||
void DistroModule::setExtraPlugins(const QSet<QString> &extraPlugins)
|
||||
{
|
||||
_extraPlugins = extraPlugins;
|
||||
}
|
||||
|
||||
void DistroModule::addExtraPlugins(const QString &extraPlugin) {
|
||||
_extraPlugins += extraPlugin;
|
||||
|
||||
}
|
||||
|
@ -36,6 +36,18 @@ public:
|
||||
QString publisher() const;
|
||||
void setPublisher(const QString &publisher);
|
||||
|
||||
QSet<QString> enabledPlugins() const;
|
||||
void setEnabledPlugins(const QSet<QString> &enabled);
|
||||
void addEnabledPlugins(const QString &enabled);
|
||||
|
||||
QSet<QString> disabledPlugins() const;
|
||||
void setDisabledPlugins(const QSet<QString> &disabled);
|
||||
void addDisabledPlugins(const QString &disabled);
|
||||
|
||||
QSet<QString> extraPlugins() const;
|
||||
void setExtraPlugins(const QSet<QString> &extraPlugins);
|
||||
void addExtraPlugins(const QString &extraPlugin);
|
||||
|
||||
private:
|
||||
QString _name;
|
||||
QString _description;
|
||||
@ -46,6 +58,11 @@ private:
|
||||
|
||||
QSet<QString> _targets;
|
||||
QSet<QString> _qmlInput;
|
||||
|
||||
// plugins
|
||||
QSet<QString> _enabled;
|
||||
QSet<QString> _disabled;
|
||||
QSet<QString> _extraPlugins;
|
||||
};
|
||||
|
||||
#endif // DISTROMODULE_H
|
||||
|
@ -55,10 +55,12 @@ bool ELF::getLibInfo(const QString &lib, LibInfo &info) const {
|
||||
|
||||
auto headers = reader.readHeaders();
|
||||
|
||||
if (headers.elfclass == ElfClass::Elf_ELFCLASS32) {
|
||||
info.setPlatform(Unix32);
|
||||
} else if (headers.elfclass == ElfClass::Elf_ELFCLASS64) {
|
||||
info.setPlatform(Unix64);
|
||||
if (headers.elfmachine == ElfMachine::Elf_EM_386) {
|
||||
info.setPlatform(Unix_x86_32);
|
||||
} else if (headers.elfmachine == ElfMachine::Elf_EM_X86_64) {
|
||||
info.setPlatform(Unix_x86_64);
|
||||
} else if (headers.elfmachine == ElfMachine::Elf_EM_ARM) {
|
||||
info.setPlatform(Unix_ARM_32);
|
||||
} else {
|
||||
info.setPlatform(UnknownPlatform);
|
||||
return false;
|
||||
|
@ -76,66 +76,6 @@ bool Extracter::extractWebEngine() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Extracter::copyPlugin(const QString &plugin, const QString& package) {
|
||||
|
||||
QStringList listItems;
|
||||
|
||||
auto cnf = DeployCore::_config;
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
|
||||
|
||||
auto pluginPath = targetPath + distro.getPluginsOutDir() +
|
||||
QFileInfo(plugin).fileName();
|
||||
|
||||
if (!_fileManager->copyFolder(plugin, pluginPath,
|
||||
QStringList() << ".so.debug" << "d.dll" << ".pdb", &listItems)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto &item : listItems) {
|
||||
extractPluginLib(item, package);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Extracter::copyExtraPlugins(const QString& package) {
|
||||
QFileInfo info;
|
||||
|
||||
auto cnf = DeployCore::_config;
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
|
||||
for (auto extraPlugin : cnf->extraPlugins) {
|
||||
|
||||
if (!PathUtils::isPath(extraPlugin)) {
|
||||
extraPlugin = cnf->qtDir.getPlugins() + "/" + extraPlugin;
|
||||
}
|
||||
|
||||
info.setFile(extraPlugin);
|
||||
if (info.isDir() && cnf->qtDir.isQt(info.absoluteFilePath())) {
|
||||
copyPlugin(info.absoluteFilePath(), package);
|
||||
|
||||
} else if (info.exists()) {
|
||||
_fileManager->copyFile(info.absoluteFilePath(),
|
||||
targetPath + distro.getPluginsOutDir());
|
||||
|
||||
extractPluginLib(info.absoluteFilePath(), package);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Extracter::copyPlugins(const QStringList &list, const QString& package) {
|
||||
for (const auto &plugin : list) {
|
||||
if (!copyPlugin(plugin, package)) {
|
||||
QuasarAppUtils::Params::log("not copied!",
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
}
|
||||
copyExtraPlugins(package);
|
||||
}
|
||||
|
||||
void Extracter::extractAllTargets() {
|
||||
auto cfg = DeployCore::_config;
|
||||
for (auto i = cfg->packages().cbegin(); i != cfg->packages().cend(); ++i) {
|
||||
@ -157,17 +97,74 @@ void Extracter::clear() {
|
||||
}
|
||||
}
|
||||
|
||||
void Extracter::copyExtraPlugins(const QString& package) {
|
||||
|
||||
|
||||
QFileInfo info;
|
||||
|
||||
auto cnf = DeployCore::_config;
|
||||
auto targetPath = cnf->getTargetDir() + "/" + package;
|
||||
auto distro = cnf->getDistroFromPackage(package);
|
||||
|
||||
for (auto extraPlugin : distro.extraPlugins()) {
|
||||
|
||||
info.setFile(extraPlugin);
|
||||
|
||||
if (info.isFile()) {
|
||||
if (!_fileManager->copyFile(info.absoluteFilePath(),
|
||||
targetPath + distro.getPluginsOutDir())) {
|
||||
|
||||
QuasarAppUtils::Params::log("fail to copy extra plugin from:" + info.absoluteFilePath() +
|
||||
" to: " + targetPath + distro.getPluginsOutDir(),
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
extractPluginLib(info.absoluteFilePath(), package);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (info.isDir()) {
|
||||
QStringList plugins;
|
||||
if (!_fileManager->copyFolder(info.absoluteFilePath(),
|
||||
targetPath + distro.getPluginsOutDir() + info.fileName()
|
||||
, {}, &plugins)) {
|
||||
|
||||
QuasarAppUtils::Params::log("fail to copy extra plugin from:" + info.absoluteFilePath() +
|
||||
" to: " + targetPath + distro.getPluginsOutDir(),
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
for (const auto& plugin : plugins) {
|
||||
extractPluginLib(plugin, package);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Extracter::extractPlugins() {
|
||||
auto cnf = DeployCore::_config;
|
||||
PluginsParser pluginsParser;
|
||||
|
||||
_pluginsParser->initDeployPluginsList();
|
||||
|
||||
for (auto i = cnf->packages().cbegin(); i != cnf->packages().cend(); ++i) {
|
||||
auto targetPath = cnf->getTargetDir() + "/" + i.key();
|
||||
auto distro = cnf->getDistroFromPackage(i.key());
|
||||
|
||||
QStringList plugins;
|
||||
pluginsParser.scan(cnf->qtDir.getPlugins(), plugins, _packageDependencyes[i.key()].qtModules());
|
||||
copyPlugins(plugins, i.key());
|
||||
QStringList listItems;
|
||||
|
||||
_pluginsParser->scan(cnf->qtDir.getPlugins(), plugins, _packageDependencyes[i.key()].qtModules(), i.key());
|
||||
|
||||
_fileManager->copyFiles(plugins, targetPath + distro.getPluginsOutDir(), 1,
|
||||
QStringList() << ".so.debug" << "d.dll" << ".pdb", &listItems);
|
||||
|
||||
for (const auto &item : listItems) {
|
||||
extractPluginLib(item, i.key());
|
||||
}
|
||||
|
||||
copyExtraPlugins(i.key());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Extracter::copyLibs(const QSet<QString> &files, const QString& package) {
|
||||
@ -240,7 +237,7 @@ void Extracter::deploy() {
|
||||
}
|
||||
|
||||
if (!deployMSVC()) {
|
||||
QuasarAppUtils::Params::log("deploy msvc failed");
|
||||
QuasarAppUtils::Params::log("deploy msvc failed", QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
_metaFileManager->createRunMetaFiles();
|
||||
@ -460,15 +457,17 @@ void Extracter::extract(const QString &file,
|
||||
|
||||
}
|
||||
|
||||
Extracter::Extracter(FileManager *fileManager, ConfigParser *cqt,
|
||||
Extracter::Extracter(FileManager *fileManager, PluginsParser *pluginsParser, ConfigParser *cqt,
|
||||
DependenciesScanner *scaner):
|
||||
_scaner(scaner),
|
||||
_fileManager(fileManager),
|
||||
_pluginsParser(pluginsParser),
|
||||
_cqt(cqt)
|
||||
{
|
||||
|
||||
assert(_cqt);
|
||||
assert(_fileManager);
|
||||
assert(_pluginsParser);
|
||||
assert(DeployCore::_config);
|
||||
|
||||
_metaFileManager = new MetaFileManager(_fileManager);
|
||||
|
@ -18,14 +18,22 @@
|
||||
|
||||
class ConfigParser;
|
||||
class MetaFileManager;
|
||||
class PluginsParser;
|
||||
|
||||
class DEPLOYSHARED_EXPORT Extracter {
|
||||
private:
|
||||
|
||||
public:
|
||||
explicit Extracter(FileManager *fileManager, PluginsParser* pluginsParser, ConfigParser * cqt, DependenciesScanner *_scaner);
|
||||
void deploy();
|
||||
void clear();
|
||||
|
||||
private:
|
||||
|
||||
QHash<QString, DependencyMap> _packageDependencyes;
|
||||
|
||||
DependenciesScanner *_scaner;
|
||||
FileManager *_fileManager;
|
||||
PluginsParser* _pluginsParser;
|
||||
ConfigParser *_cqt;
|
||||
MetaFileManager *_metaFileManager;
|
||||
|
||||
@ -38,39 +46,30 @@ class DEPLOYSHARED_EXPORT Extracter {
|
||||
bool extractQmlAll();
|
||||
bool extractQmlFromSource();
|
||||
/**
|
||||
* @brief extractLib
|
||||
* @param file file of lib
|
||||
* @param mask extraction mask. Used to filter extracts objects
|
||||
*/
|
||||
* @brief extractLib
|
||||
* @param file file of lib
|
||||
* @param mask extraction mask. Used to filter extracts objects
|
||||
*/
|
||||
void extractLib(const QString & file, DependencyMap *depMap, const QString& mask = "");
|
||||
|
||||
bool deployMSVC();
|
||||
bool extractWebEngine();
|
||||
|
||||
|
||||
bool copyPlugin(const QString &plugin, const QString &package);
|
||||
void copyPlugins(const QStringList &list, const QString &package);
|
||||
|
||||
/**
|
||||
* @brief compress - this function join all target dependecies in to one struct
|
||||
*/
|
||||
* @brief compress - this function join all target dependecies in to one struct
|
||||
*/
|
||||
void compress();
|
||||
void extractAllTargets();
|
||||
void extractPlugins();
|
||||
|
||||
void copyFiles();
|
||||
void copyTr();
|
||||
void copyExtraPlugins(const QString &package);
|
||||
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();
|
||||
void clear();
|
||||
|
||||
friend class deploytest;
|
||||
void copyExtraPlugins(const QString &package);
|
||||
};
|
||||
|
||||
#endif // EXTRACTER_H_H
|
||||
|
@ -67,7 +67,7 @@ bool FileManager::addToDeployed(const QString& path) {
|
||||
|
||||
auto completeSufix = info.completeSuffix();
|
||||
if (info.isFile() && (completeSufix.isEmpty() || completeSufix.toLower() == "run"
|
||||
|| completeSufix.toLower() == "sh")) {
|
||||
|| completeSufix.toLower() == "sh")) {
|
||||
|
||||
if (!QFile::setPermissions(path, static_cast<QFile::Permission>(0x7777))) {
|
||||
QuasarAppUtils::Params::log("permishens set fail", QuasarAppUtils::Warning);
|
||||
@ -147,7 +147,7 @@ bool FileManager::strip(const QString &dir) const {
|
||||
|
||||
|
||||
bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
QStringList *masks, bool isMove, bool targetIsFile) {
|
||||
QStringList *masks, bool isMove, bool targetIsFile) {
|
||||
|
||||
auto info = QFileInfo(file);
|
||||
|
||||
@ -189,7 +189,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
}
|
||||
|
||||
QuasarAppUtils::Params::log(((isMove)? "move :": "copy :") + file,
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Info);
|
||||
QFile sourceFile(file);
|
||||
auto sourceFileAbsalutePath = QFileInfo(file).absoluteFilePath();
|
||||
|
||||
@ -198,13 +198,13 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
sourceFile.copy(tergetFile))) {
|
||||
|
||||
QuasarAppUtils::Params::log("Qt Operation fail " + file + " >> " + tergetFile +
|
||||
" Qt error: " + sourceFile.errorString(),
|
||||
QuasarAppUtils::Warning);
|
||||
" Qt error: " + sourceFile.errorString(),
|
||||
QuasarAppUtils::Warning);
|
||||
|
||||
bool tarExits = QFileInfo(tergetFile).exists();
|
||||
|
||||
if ((!tarExits) ||
|
||||
(tarExits && !QuasarAppUtils::Params::isEndable("noOverwrite"))) {
|
||||
(tarExits && !QuasarAppUtils::Params::isEndable("noOverwrite"))) {
|
||||
|
||||
std::ifstream src(file.toStdString(),
|
||||
std::ios::binary);
|
||||
@ -216,8 +216,8 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
|
||||
if (!QFileInfo::exists(tergetFile)) {
|
||||
QuasarAppUtils::Params::log("std Operation fail file not copied. "
|
||||
"Сheck if you have access to the target dir",
|
||||
QuasarAppUtils::Error);
|
||||
"Сheck if you have access to the target dir",
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
|
||||
}
|
||||
@ -230,7 +230,7 @@ bool FileManager::fileActionPrivate(const QString &file, const QString &target,
|
||||
|
||||
if (QFileInfo(tergetFile).exists()) {
|
||||
QuasarAppUtils::Params::log(tergetFile + " already exists!",
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Info);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -262,14 +262,14 @@ bool FileManager::smartCopyFile(const QString &file,
|
||||
|
||||
if (!copyFile(file, target, mask, ifFileTarget)) {
|
||||
QuasarAppUtils::Params::log("not copy target to bin dir " + file,
|
||||
QuasarAppUtils::Error);
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!copyFile(file, target, mask, ifFileTarget)) {
|
||||
QuasarAppUtils::Params::log("not copy target to bin dir " + file,
|
||||
QuasarAppUtils::Error);
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -282,7 +282,7 @@ bool FileManager::moveFile(const QString &file, const QString &target, QStringLi
|
||||
}
|
||||
|
||||
bool FileManager::copyFolder(const QString &from, const QString &to, const QStringList &filter,
|
||||
QStringList *listOfCopiedItems, QStringList *mask) {
|
||||
QStringList *listOfCopiedItems, QStringList *mask) {
|
||||
|
||||
QDir fromDir(from);
|
||||
|
||||
@ -372,16 +372,16 @@ bool FileManager::moveFolder(const QString &from, const QString &to, const QStri
|
||||
|
||||
void FileManager::clear(const QString& targetDir, bool force) {
|
||||
QuasarAppUtils::Params::log( "clear start!",
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Info);
|
||||
if (force) {
|
||||
QuasarAppUtils::Params::log("clear force! " + targetDir,
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Info);
|
||||
if (QDir(targetDir).removeRecursively()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QuasarAppUtils::Params::log("Remove target Dir fail, try remove old deployemend files",
|
||||
QuasarAppUtils::Warning);
|
||||
QuasarAppUtils::Warning);
|
||||
}
|
||||
|
||||
QMap<int, QFileInfo> sortedOldData;
|
||||
@ -400,7 +400,7 @@ void FileManager::clear(const QString& targetDir, bool force) {
|
||||
if (index.value().isFile()) {
|
||||
if (removeFile(index.value())) {
|
||||
QuasarAppUtils::Params::log("Remove " + index.value().absoluteFilePath() + " because it is deployed file",
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -408,7 +408,7 @@ void FileManager::clear(const QString& targetDir, bool force) {
|
||||
if (!qdir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries).count()) {
|
||||
qdir.removeRecursively();
|
||||
QuasarAppUtils::Params::log("Remove " + index.value().absoluteFilePath() + " because it is empty",
|
||||
QuasarAppUtils::Info);
|
||||
QuasarAppUtils::Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -417,20 +417,95 @@ void FileManager::clear(const QString& targetDir, bool force) {
|
||||
}
|
||||
|
||||
bool FileManager::copyFile(const QString &file, const QString &target,
|
||||
QStringList *masks, bool targetIsFile) {
|
||||
QStringList *masks, bool targetIsFile) {
|
||||
|
||||
return fileActionPrivate(file, target, masks, false, targetIsFile);
|
||||
}
|
||||
|
||||
QString FileManager::changeDistanation(const QString& absalutePath,
|
||||
QString basePath,
|
||||
int depch) {
|
||||
|
||||
auto prefixes = absalutePath.split(QRegExp("[\\/]"), QString::SkipEmptyParts);
|
||||
depch = std::min(depch, prefixes.size());
|
||||
while (depch) {
|
||||
auto index = prefixes.size() - depch;
|
||||
if (index >= 0) {
|
||||
basePath += "/" + prefixes[index];
|
||||
}
|
||||
|
||||
depch--;
|
||||
}
|
||||
|
||||
return basePath;
|
||||
}
|
||||
|
||||
bool FileManager::copyFiles(const QStringList &source,
|
||||
const QString &to, int saveStructSize,
|
||||
const QStringList &filter,
|
||||
QStringList *listOfCopiedItems,
|
||||
QStringList *mask) {
|
||||
|
||||
for (const auto &item : source) {
|
||||
|
||||
QFileInfo info(item);
|
||||
|
||||
QString skipFilter = "";
|
||||
for (const auto &i: filter) {
|
||||
if (info.fileName().contains(i, ONLY_WIN_CASE_INSENSIATIVE)) {
|
||||
skipFilter = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!skipFilter.isEmpty()) {
|
||||
QuasarAppUtils::Params::log(
|
||||
info.absoluteFilePath() + " ignored by filter " + skipFilter,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
continue;
|
||||
}
|
||||
auto config = DeployCore::_config;
|
||||
|
||||
LibInfo libInfo;
|
||||
libInfo.setName(info.fileName());
|
||||
libInfo.setPath(info.absolutePath());
|
||||
libInfo.setPlatform(GeneralFile);
|
||||
|
||||
if (config)
|
||||
if (auto rule = config->ignoreList.isIgnore(libInfo)) {
|
||||
QuasarAppUtils::Params::log(
|
||||
info.absoluteFilePath() + " ignored by rule " + rule->label,
|
||||
QuasarAppUtils::VerboseLvl::Info);
|
||||
continue;
|
||||
}
|
||||
|
||||
auto distanation = changeDistanation(info.absolutePath(), to, saveStructSize);
|
||||
|
||||
if (!copyFile(info.absoluteFilePath(), distanation , mask)) {
|
||||
QuasarAppUtils::Params::log(
|
||||
"not copied file " + distanation + "/" + info.fileName(),
|
||||
QuasarAppUtils::VerboseLvl::Warning);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (listOfCopiedItems) {
|
||||
*listOfCopiedItems << distanation + "/" + info.fileName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileManager::removeFile(const QFileInfo &file) {
|
||||
|
||||
if (!QFile::remove(file.absoluteFilePath())) {
|
||||
QuasarAppUtils::Params::log("Qt Operation fail (remove file) " + file.absoluteFilePath(),
|
||||
QuasarAppUtils::Warning);
|
||||
QuasarAppUtils::Warning);
|
||||
|
||||
if (remove(file.absoluteFilePath().toLatin1())) {
|
||||
QuasarAppUtils::Params::log("std Operation fail file not removed." + file.absoluteFilePath(),
|
||||
QuasarAppUtils::Error);
|
||||
QuasarAppUtils::Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -23,13 +23,39 @@ private:
|
||||
bool initDir(const QString &path);
|
||||
QSet<QString> _deployedFiles;
|
||||
|
||||
|
||||
/**
|
||||
* @brief changeDistanation - this function create new distanation path.
|
||||
* (merge base path and pathFrom with depth)
|
||||
* @param absalutePath
|
||||
* @param basePath
|
||||
* @param depch
|
||||
* @return the new path
|
||||
*/
|
||||
QString changeDistanation(const QString &absalutePath, QString basePath, int depch);
|
||||
public:
|
||||
FileManager();
|
||||
|
||||
bool copyFile(const QString &file, const QString &target,
|
||||
QStringList *mask = nullptr, bool targetIsFile = false);
|
||||
|
||||
/**
|
||||
* @brief copyFiles - copy files (source) to (to)
|
||||
* @param source - copy source files
|
||||
* @param to - distanation folder
|
||||
* @param saveStructSize - size of name of source file to save after copy. example:
|
||||
* copy /Foo/A.txt /Bar/ (size 0) - result file copyed to /Bar/A.txt
|
||||
* copy /Foo/A.txt /Bar/ (size 1) - to /Bar/Foo/A.txt
|
||||
* @param filter - list of forbiden names for ignore files
|
||||
* @param listOfCopiedItems - list of copyed files
|
||||
* @param mask - mask of copyed files
|
||||
* @return true if files copyed
|
||||
*/
|
||||
bool copyFiles(const QStringList &source, const QString &to, int saveStructSize = 0,
|
||||
const QStringList &filter = QStringList(),
|
||||
QStringList *listOfCopiedItems = nullptr,
|
||||
QStringList *mask = nullptr);
|
||||
|
||||
|
||||
bool removeFile(const QString &file);
|
||||
bool removeFile(const QFileInfo &file);
|
||||
|
||||
|
@ -130,6 +130,10 @@ bool LibInfo::isValid() const {
|
||||
name.size() && path.size();
|
||||
}
|
||||
|
||||
bool LibInfo::isScaned() const {
|
||||
return allDep.size();
|
||||
}
|
||||
|
||||
uint qHash(const LibInfo &info) {
|
||||
return qHash(info.fullPath());
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
void clear();
|
||||
|
||||
bool isValid() const;
|
||||
bool isScaned() const;
|
||||
|
||||
friend class DependenciesScanner;
|
||||
const QSet<LibInfo>& getAllDep() const;
|
||||
|
@ -5,6 +5,7 @@
|
||||
* of this license document, but changing it is not allowed.
|
||||
*/
|
||||
|
||||
#include "deployconfig.h"
|
||||
#include "pluginsparser.h"
|
||||
#include <QDir>
|
||||
#include <dependenciesscanner.h>
|
||||
@ -42,23 +43,54 @@ static const PluginModuleMapping pluginModuleMappings[] =
|
||||
{"styles", DeployCore::QtModule::QtWidgetsModule},
|
||||
{"sceneparsers", DeployCore::QtModule::Qt3DRendererModule},
|
||||
{"renderplugins", DeployCore::QtModule::Qt3DRendererModule},
|
||||
{"renderers", DeployCore::QtModule::Qt3DRendererModule},
|
||||
{"geometryloaders", DeployCore::QtModule::Qt3DRendererModule},
|
||||
{"webview", DeployCore::QtModule::QtWebViewModule},
|
||||
{"xcbglintegrations", DeployCore::QtModule::QtGuiModule},
|
||||
{"wayland-decoration-client", DeployCore::QtModule::QtGuiModule},
|
||||
{"wayland-graphics-integration-client", DeployCore::QtModule::QtGuiModule},
|
||||
{"wayland-graphics-integration-server", DeployCore::QtModule::QtGuiModule},
|
||||
{"wayland-decoration-client", DeployCore::QtModule::QtQuickModule},
|
||||
{"wayland-graphics-integration-client", DeployCore::QtModule::QtQuickModule},
|
||||
{"wayland-graphics-integration-server", DeployCore::QtModule::QtQuickModule},
|
||||
{"wayland-shell-integration", DeployCore::QtModule::QtGuiModule},
|
||||
|
||||
|
||||
};
|
||||
|
||||
quint64 PluginsParser::qtModuleForPlugin(const QString &subDirName) {
|
||||
static const PlatformMapping platformMappings[] =
|
||||
{
|
||||
{"qminimal", Unix | Win },
|
||||
{"qminimalegl", Unix | Win },
|
||||
{"qoffscreen", Unix | Win},
|
||||
{"qandroid", UnknownPlatform },
|
||||
{"qbsdfb", UnknownPlatform },
|
||||
{"qcocoa", UnknownPlatform },
|
||||
{"qdirect2d", Win },
|
||||
{"qdirectfb", UnknownPlatform },
|
||||
{"qeglfs", Unix_ARM },
|
||||
{"qhaiku", UnknownPlatform },
|
||||
{"qios", UnknownPlatform },
|
||||
{"qlinuxfb", Unix_ARM },
|
||||
{"qmirclient", Unix },
|
||||
{"qopenwf", Unix },
|
||||
{"qqnx", UnknownPlatform },
|
||||
{"qvnc", WebRemote },
|
||||
{"qwasm", UnknownPlatform },
|
||||
{"qwindows", Win },
|
||||
{"qwinrt", Win },
|
||||
{"qxcb", Unix },
|
||||
{"webgl", WebGl },
|
||||
{"qwayland-xcomposite-glx", Unix_x86_64},
|
||||
{"qwayland-xcomposite-egl", Unix_x86_64},
|
||||
{"qwayland-generic", Unix_x86_64},
|
||||
{"qwayland-egl", Unix_x86_64}
|
||||
|
||||
};
|
||||
|
||||
quint64 PluginsParser::qtModuleForPlugin(const QString &subDirName) const {
|
||||
const auto end = std::end(pluginModuleMappings);
|
||||
|
||||
const auto result =
|
||||
std::find_if(std::begin(pluginModuleMappings), end,
|
||||
[&subDirName] (const PluginModuleMapping &m) {
|
||||
std::find_if(std::begin(pluginModuleMappings), end,
|
||||
[&subDirName] (const PluginModuleMapping &m) {
|
||||
|
||||
return subDirName == QLatin1String(m.directoryName);
|
||||
});
|
||||
@ -66,23 +98,133 @@ quint64 PluginsParser::qtModuleForPlugin(const QString &subDirName) {
|
||||
return result != end ? result->module : 0; // "designer"
|
||||
}
|
||||
|
||||
Platform PluginsParser::platformForPlugin(const QString &name) const {
|
||||
const auto end = std::end(platformMappings);
|
||||
const auto result =
|
||||
std::find_if(std::begin(platformMappings), end,
|
||||
[&name] (const PlatformMapping &m) {
|
||||
|
||||
return name == QLatin1String(m._pluginName);
|
||||
});
|
||||
|
||||
return (result != end) ? result->_platform : Platform::UnknownPlatform; // "designer"
|
||||
}
|
||||
|
||||
QString PluginsParser::getPluginNameFromFile(const QString &baseNaem) const {
|
||||
|
||||
if (baseNaem.left(3) == "lib") {
|
||||
return baseNaem.right(baseNaem.size() - 3);
|
||||
}
|
||||
|
||||
return baseNaem;
|
||||
}
|
||||
|
||||
bool PluginsParser::scan(const QString& pluginPath,
|
||||
QStringList &resDependencies,
|
||||
DeployCore::QtModule qtModules) {
|
||||
DeployCore::QtModule qtModules,
|
||||
const QString& package) {
|
||||
|
||||
auto plugins = QDir(pluginPath).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
|
||||
QuasarAppUtils::Params::log("Modules Number :" + QString::number(qtModules), QuasarAppUtils::Info);
|
||||
|
||||
for (const auto &plugin: plugins) {
|
||||
auto module = qtModuleForPlugin(plugin.fileName());
|
||||
if (qtModules & module) {
|
||||
|
||||
QuasarAppUtils::Params::log("deploye plugin : " + plugin.absoluteFilePath(), QuasarAppUtils::Info);
|
||||
|
||||
resDependencies.append(plugin.absoluteFilePath());
|
||||
}
|
||||
scanPluginGroup(plugin, resDependencies, package, qtModules);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void PluginsParser::addPlugins(const QStringList& list, const QString& package, QHash<QString, QSet<QString>>& container) {
|
||||
const DeployConfig* cnf = DeployCore::_config;
|
||||
|
||||
for (const auto plugin: list) {
|
||||
if (QFileInfo(cnf->qtDir.getPlugins() + "/" + plugin).isDir()) {
|
||||
auto listPlugins = QDir(cnf->qtDir.getPlugins() + "/" + plugin).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
|
||||
for (const auto &plugin: listPlugins) {
|
||||
QuasarAppUtils::Params::log("Disable plugin: " + plugin.baseName(), QuasarAppUtils::Debug);
|
||||
container[package].insert(getPluginNameFromFile( plugin.baseName()));
|
||||
}
|
||||
|
||||
} else {
|
||||
QuasarAppUtils::Params::log("Disable plugin: " + plugin, QuasarAppUtils::Debug);
|
||||
container[package].insert(getPluginNameFromFile(plugin));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginsParser::initDeployPluginsList() {
|
||||
const DeployConfig* cnf = DeployCore::_config;
|
||||
for (auto package = cnf->packages().cbegin(); package != cnf->packages().cend(); ++package) {
|
||||
|
||||
auto distro = cnf->getDistroFromPackage(package.key());
|
||||
|
||||
QList<QString> desabledFromPlatform;
|
||||
scanPlatforms(package.key(), desabledFromPlatform);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
auto enablePlugins = distro.enabledPlugins().toList();
|
||||
auto disablePlugins = distro.disabledPlugins().toList();
|
||||
#else
|
||||
auto enablePlugins = QStringList(distro.enabledPlugins().cbegin(), distro.enabledPlugins().cend());
|
||||
auto disablePlugins = QStringList(distro.disabledPlugins().cbegin(), distro.disabledPlugins().cend());
|
||||
#endif
|
||||
|
||||
auto forbidenPlugins = defaultForbidenPlugins() + disablePlugins + desabledFromPlatform;
|
||||
|
||||
addPlugins(forbidenPlugins, package.key(), _disabledPlugins);
|
||||
addPlugins(enablePlugins, package.key(), _enabledPlugins);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void PluginsParser::scanPlatforms(const QString& package, QList<QString>& disabledPlugins) {
|
||||
const DeployConfig* cnf = DeployCore::_config;
|
||||
auto platform = cnf->getPlatform(package);
|
||||
|
||||
QString platformPluginPath = cnf->qtDir.getPlugins() + "/platforms";
|
||||
auto plugins = QDir(platformPluginPath).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
|
||||
for (const auto &plugin: plugins) {
|
||||
|
||||
auto pluginPlatform = platformForPlugin(getPluginNameFromFile(plugin.baseName()));
|
||||
if (!(platform & pluginPlatform)) {
|
||||
|
||||
QuasarAppUtils::Params::log("platform : " + plugin.baseName() + " is disabled", QuasarAppUtils::Info);
|
||||
disabledPlugins += getPluginNameFromFile(plugin.baseName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PluginsParser::scanPluginGroup(const QFileInfo& plugin,
|
||||
QStringList &result,
|
||||
const QString &package,
|
||||
DeployCore::QtModule qtModules) const {
|
||||
|
||||
auto plugins = QDir(plugin.absoluteFilePath()).entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
|
||||
auto module = qtModuleForPlugin(plugin.fileName());
|
||||
|
||||
for (const auto& info: plugins) {
|
||||
if (isEnabledPlugin(getPluginNameFromFile(info.baseName()), package) ||
|
||||
(!isDisabledPlugin(getPluginNameFromFile(info.baseName()), package) && (qtModules & module))) {
|
||||
result += info.absoluteFilePath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginsParser::isDisabledPlugin(const QString &plugin, const QString &package) const {
|
||||
return _disabledPlugins[package].contains(plugin);
|
||||
}
|
||||
|
||||
bool PluginsParser::isEnabledPlugin(const QString &plugin, const QString &package) const {
|
||||
return _enabledPlugins[package].contains(plugin);
|
||||
}
|
||||
|
||||
QStringList PluginsParser::defaultForbidenPlugins() {
|
||||
return {
|
||||
"qtvirtualkeyboardplugin",
|
||||
"virtualkeyboard",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,18 +20,56 @@ struct DEPLOYSHARED_EXPORT PluginModuleMapping
|
||||
quint64 module;
|
||||
};
|
||||
|
||||
struct DEPLOYSHARED_EXPORT PlatformMapping
|
||||
{
|
||||
const char *_pluginName;
|
||||
Platform _platform;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The PluginsParser class - scaner of plugins
|
||||
*/
|
||||
class DEPLOYSHARED_EXPORT PluginsParser
|
||||
{
|
||||
private:
|
||||
DependenciesScanner *_libScaner = nullptr;
|
||||
|
||||
quint64 qtModuleForPlugin(const QString &subDirName);
|
||||
public:
|
||||
PluginsParser();
|
||||
bool scan(const QString &pluginPath, QStringList& resDependencies,
|
||||
DeployCore::QtModule qtModules);
|
||||
DeployCore::QtModule qtModules, const QString &package);
|
||||
|
||||
|
||||
bool initDeployPluginsList();
|
||||
|
||||
/**
|
||||
* @brief defaultForbidenPlugins - this method return list of forbiden plugins
|
||||
* forbidenPlugin - it is a plugin that depends on several Qt modules and significantly increases the size of the distribution.
|
||||
* @return
|
||||
*/
|
||||
static QStringList defaultForbidenPlugins();
|
||||
private:
|
||||
DependenciesScanner *_libScaner = nullptr;
|
||||
QHash<QString, QSet<QString>> _disabledPlugins;
|
||||
QHash<QString, QSet<QString>> _enabledPlugins;
|
||||
|
||||
quint64 qtModuleForPlugin(const QString &subDirName) const;
|
||||
Platform platformForPlugin(const QString &name) const;
|
||||
|
||||
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;
|
||||
|
||||
void scanPlatforms(const QString &package, QList<QString> &disabledPlugins);
|
||||
void scanPluginGroup(const QFileInfo &pluginFolder,
|
||||
QStringList &result,
|
||||
const QString &package,
|
||||
DeployCore::QtModule qtModules) const;
|
||||
bool isDisabledPlugin(const QString &plugin, const QString &package) const;
|
||||
bool isEnabledPlugin(const QString &plugin, const QString &package) const;
|
||||
|
||||
void addPlugins(const QStringList &list,
|
||||
const QString &package,
|
||||
QHash<QString, QSet<QString>> &container);
|
||||
};
|
||||
|
||||
#endif // QTMODULES_H
|
||||
|
@ -3,7 +3,7 @@
|
||||
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
||||
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
||||
<Name>CQtDeployer</Name>
|
||||
<Version>1.4.4.1</Version>
|
||||
<Version>1.4.5.0</Version>
|
||||
<Title>CQtDeployer</Title>
|
||||
<Publisher>QuasarApp</Publisher>
|
||||
<StartMenuDir>CQtDeployer</StartMenuDir>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<WizardDefaultWidth>640px</WizardDefaultWidth>
|
||||
<WizardDefaultHeight>400px</WizardDefaultHeight>
|
||||
<Name>CQtDeployer</Name>
|
||||
<Version>1.4.4.1</Version>
|
||||
<Version>1.4.5.0</Version>
|
||||
<Title>CQtDeployer</Title>
|
||||
<Publisher>QuasarApp</Publisher>
|
||||
<StartMenuDir>CQtDeployer</StartMenuDir>
|
||||
|
BIN
QIFData/packages/cqtdeployer.1_4/data/1.4/icon.png
vendored
BIN
QIFData/packages/cqtdeployer.1_4/data/1.4/icon.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 140 KiB |
@ -2,11 +2,11 @@
|
||||
<Package>
|
||||
<DisplayName>CQtDeployer 1.4</DisplayName>
|
||||
<Description>CQtDeployer 1.4</Description>
|
||||
<Version>1.4.4.1</Version>
|
||||
<Version>1.4.5.0</Version>
|
||||
<Default>true</Default>
|
||||
<ForcedInstallation>false</ForcedInstallation>
|
||||
<Script>installscript.js</Script>
|
||||
<ReleaseDate>2020-06-30</ReleaseDate>
|
||||
<ReleaseDate>2020-07-09</ReleaseDate>
|
||||
<SortingPriority>201</SortingPriority>
|
||||
<Translations>
|
||||
<Translation>ru.qm</Translation>
|
||||
|
@ -50,7 +50,7 @@ void LibCreator::initLinux64() {
|
||||
"libgcc_s.so.1",
|
||||
"libc.so.6",
|
||||
},
|
||||
Platform::Unix64);
|
||||
Platform::Unix_x86_64);
|
||||
createLib(":/linux64.so", {
|
||||
"libQt5Core.so.5",
|
||||
"libpthread.so.0",
|
||||
@ -60,7 +60,7 @@ void LibCreator::initLinux64() {
|
||||
"libc.so.6",
|
||||
|
||||
},
|
||||
Platform::Unix64);
|
||||
Platform::Unix_x86_64);
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,5 +13,11 @@ Modules::Modules()
|
||||
|
||||
}
|
||||
|
||||
Modules &Modules::instance() {
|
||||
static Modules* val = new Modules();
|
||||
|
||||
return *val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -29,6 +29,10 @@
|
||||
{
|
||||
public:
|
||||
Modules();
|
||||
|
||||
static Modules& instance();
|
||||
};
|
||||
|
||||
#define TestModule Modules::instance()
|
||||
|
||||
#endif // MODULES_H
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,18 +17,19 @@ class ModulesQt513
|
||||
public:
|
||||
ModulesQt513();
|
||||
|
||||
static QSet<QString> ignoreFilter(const QSet<QString>& input, const QString& filter);
|
||||
static QSet<QString> onlyC(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qmlLibs(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qmlLibsExtractPlugins(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> separetedPackageslibs(const QString &distDir = DISTRO_DIR);
|
||||
virtual QSet<QString> ignoreFilter(const QSet<QString>& input, const QString& filter) const;
|
||||
virtual QSet<QString> replace(const QSet<QString> &data, const QMap<QString, QString>& replaceMap) const;
|
||||
|
||||
static QSet<QString> outTestLibs(const QString &distDir = DISTRO_DIR);
|
||||
|
||||
static QSet<QString> qtWithoutTr(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> testEmptyParamsTree(const QString &distDir = DISTRO_DIR);
|
||||
virtual QSet<QString> onlyC(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> qmlLibs(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> testDistroLibs(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> testOutLibs(const QString &distDir = DISTRO_DIR) const;
|
||||
|
||||
virtual QSet<QString> qtWithoutTr(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const;
|
||||
virtual QSet<QString> testEmptyParamsTree(const QString &distDir = DISTRO_DIR) const;
|
||||
|
||||
|
||||
};
|
||||
|
@ -13,34 +13,30 @@ ModulesQt514::ModulesQt514()
|
||||
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::qtLibs(const QString &distDir)
|
||||
QSet<QString> ModulesQt514::qtLibs(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
auto res = ModulesQt513::qtLibs(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
res += utils.createTree({
|
||||
{"./" + distDir + "/Qt5QmlModels.dll"},
|
||||
res -= utils.createTree({
|
||||
});
|
||||
#else
|
||||
res += utils.createTree({
|
||||
{"./" + distDir + "/lib/libQt5QmlModels.so"},
|
||||
{"./" + distDir + "/plugins/wayland-graphics-integration-client/libvulkan-server.so"},
|
||||
{"./" + distDir + "/plugins/wayland-graphics-integration-server/libvulkan-server.so"},
|
||||
});
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::onlyC(const QString &distDir)
|
||||
QSet<QString> ModulesQt514::onlyC(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
auto res = ModulesQt513::onlyC(distDir);
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::qmlLibs(const QString &distDir)
|
||||
QSet<QString> ModulesQt514::qmlLibs(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
|
||||
@ -63,84 +59,22 @@ QSet<QString> ModulesQt514::qmlLibs(const QString &distDir)
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::qmlLibsExtractPlugins(const QString &distDir)
|
||||
{
|
||||
auto res = ModulesQt513::qmlLibsExtractPlugins(distDir);
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::separetedPackageslibs(const QString &distDir)
|
||||
{
|
||||
TestUtils utils;
|
||||
auto res = ModulesQt513::separetedPackageslibs(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
res += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/lolLib/Qt5QmlModels.dll",
|
||||
"./" + distDir + "/package2/ZzZ/Qt5QmlModels.dll",
|
||||
"./" + distDir + "/package2/ZzZ/Qt5QmlWorkerScript.dll",
|
||||
}
|
||||
);
|
||||
#else
|
||||
res += utils.createTree(
|
||||
{
|
||||
"./" + distDir + "/lolLib/libQt5QmlModels.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-client/libvulkan-server.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libvulkan-server.so",
|
||||
"./" + distDir + "/package2/ZzZ/lib/libQt5QmlModels.so",
|
||||
"./" + distDir + "/package2/ZzZ/lib/libQt5QmlWorkerScript.so",
|
||||
"./" + distDir + "/package2/ZzZ/plugins/wayland-graphics-integration-client/libvulkan-server.so",
|
||||
"./" + distDir + "/package2/ZzZ/plugins/wayland-graphics-integration-server/libvulkan-server.so",
|
||||
}
|
||||
);
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::outTestLibs(const QString &distDir)
|
||||
{
|
||||
TestUtils utils;
|
||||
auto res = ModulesQt513::outTestLibs(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
res += utils.createTree({
|
||||
"./" + distDir + "/lolLib/Qt5QmlModels.dll",
|
||||
"./" + distDir + "/lolLib/Qt5QmlWorkerScript.dll",
|
||||
});
|
||||
#else
|
||||
res += utils.createTree({
|
||||
"./" + distDir + "/lolLib/libQt5QmlModels.so",
|
||||
"./" + distDir + "/lolLib/libQt5QmlWorkerScript.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-client/libvulkan-server.so",
|
||||
"./" + distDir + "/p/wayland-graphics-integration-server/libvulkan-server.so"
|
||||
});
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::qtWithoutTr(const QString &distDir)
|
||||
QSet<QString> ModulesQt514::qtWithoutTr(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
auto res = ModulesQt513::qtWithoutTr(distDir);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
res += utils.createTree({
|
||||
{"./" + distDir + "/Qt5QmlModels.dll"},
|
||||
});
|
||||
#else
|
||||
res += utils.createTree({
|
||||
{"./" + distDir + "/lib/libQt5QmlModels.so"},
|
||||
{"./" + distDir + "/plugins/wayland-graphics-integration-client/libvulkan-server.so"},
|
||||
{"./" + distDir + "/plugins/wayland-graphics-integration-server/libvulkan-server.so"},
|
||||
});
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
QSet<QString> ModulesQt514::qtWebEngine(const QString &distDir)
|
||||
QSet<QString> ModulesQt514::qtWebEngine(const QString &distDir) const
|
||||
{
|
||||
TestUtils utils;
|
||||
|
||||
@ -151,8 +85,6 @@ QSet<QString> ModulesQt514::qtWebEngine(const QString &distDir)
|
||||
res += utils.createTree({
|
||||
"./" + distDir + "/lib/libQt5QmlModels.so",
|
||||
"./" + distDir + "/lib/libQt5QmlWorkerScript.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-client/libvulkan-server.so",
|
||||
"./" + distDir + "/plugins/wayland-graphics-integration-server/libvulkan-server.so",
|
||||
"./" + distDir + "/qml/QtQml/WorkerScript.2/libworkerscriptplugin.so",
|
||||
"./" + distDir + "/qml/QtQml/WorkerScript.2/plugins.qmltypes",
|
||||
"./" + distDir + "/qml/QtQml/WorkerScript.2/qmldir",
|
||||
|
@ -14,16 +14,12 @@ class ModulesQt514 : public ModulesQt513
|
||||
public:
|
||||
ModulesQt514();
|
||||
|
||||
static QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> onlyC(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qmlLibs(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qmlLibsExtractPlugins(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> separetedPackageslibs(const QString &distDir = DISTRO_DIR);
|
||||
QSet<QString> qtLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> onlyC(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qmlLibs(const QString &distDir = DISTRO_DIR) const override;
|
||||
|
||||
static QSet<QString> outTestLibs(const QString &distDir = DISTRO_DIR);
|
||||
|
||||
static QSet<QString> qtWithoutTr(const QString &distDir = DISTRO_DIR);
|
||||
static QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR);
|
||||
QSet<QString> qtWithoutTr(const QString &distDir = DISTRO_DIR) const override;
|
||||
QSet<QString> qtWebEngine(const QString &distDir = DISTRO_DIR) const override;
|
||||
};
|
||||
|
||||
#endif // MODULESQT514_H
|
||||
|
File diff suppressed because it is too large
Load Diff
BIN
res/CQtDeployer defaultIcon.png
Normal file
BIN
res/CQtDeployer defaultIcon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 994 KiB |
BIN
res/CQtDeployer defaultIcon_web.png
Normal file
BIN
res/CQtDeployer defaultIcon_web.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
@ -1,5 +1,5 @@
|
||||
[Desktop Entry]
|
||||
Version=1.4.4.1
|
||||
Version=1.4.5.0
|
||||
Name=CQtDeployer
|
||||
Comment=CQtDeployer Help.
|
||||
Exec=cqtdeployer
|
||||
@ -10,6 +10,6 @@ Categories=Application;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
X-GNOME-Bugzilla-Product=CQtDeployer
|
||||
X-GNOME-Bugzilla-Component=General
|
||||
X-GNOME-Bugzilla-Version=1.4.4.1
|
||||
X-GNOME-Bugzilla-Version=1.4.5.0
|
||||
StartupNotify=true
|
||||
Name[ru_RU]=CQtDeployer
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 140 KiB |
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
name: cqtdeployer # you probably want to 'snapcraft register <name>'
|
||||
version: '1.4.4.1' # just for humans, typically '1.2+git' or '1.3.2'
|
||||
version: '1.4.5.0' # just for humans, typically '1.2+git' or '1.3.2'
|
||||
summary: deploy your qt projects # 79 char long summary
|
||||
description: |
|
||||
Console app for deploy qt libs.
|
||||
|
Loading…
x
Reference in New Issue
Block a user