Merge branch 'v1.3' into outputs

This commit is contained in:
Andrei Yankovich 2019-08-27 11:17:07 +03:00 committed by GitHub
commit c562e4b0e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 159 additions and 24 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
# These are supported funding model platforms
patreon: QuasarApp

105
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,105 @@
# 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.
### 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
### Prohibited from working in QuassarApp
* Use push force. All problems need to be solved by a new committee.
* 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.
## Making Pull Request
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)
* Pull Request must always be assigned to the branch from which you separated.
## Making Tasks
If necessary, assign a task to someone
You must:
* Create relevant discussion on github, selected repository.
* Completely describe the problem or task.
* If you have a solution to the problem fully describe what and how to do.
## Code Registration
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;
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
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.
### Внешние разработчики QuasarApp
* Делаем Fork репозитория.
* Если нет никаких указаний отделяемся от ветки master
* Реализуем поставленную задачу
* По завершению работы оформить Pull Request в master.
* Перед началом работы над Задачей, перетащить ее в [inProgress](https://github.com/orgs/QuasarApp/projects) в проектах
### При работе в QuassarApp запрещается
* Использовать push force. Все проблемы нужно решать новым комитом.
* Пушить код напрямую в master.
* Нарушать правила оформления кода. Если какой то аспект не описан, писать нужно в том-же стиле как было написано до вас.
* Перемещать код без особой на это причины.
## Оформление Pull Request
Содержимое Pull Request должно обязательно включать:
* Номер задания которую решает (если выполнялось по поставленной задаче)
* Полное описание всего что было сделано в задаче.
* В случае когда создается пулреквест а Задача еще выполняется помечать заголовок Pull Request тегом WIP (пример [WIP] MyTask)
* Pull Request всегда должен быть назначен именно в ту ветку от которой вы отделялись.
## Оформление Задачи
В случае необходимости назначить на кого-то задачу
Вы должны:
* Создать соответствующее обсуждение на 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. Перед пушем кода обязательно прогнать тесты.

View File

@ -19,7 +19,7 @@ TEMPLATE = lib
DEFINES += DEPLOY_LIBRARY
VERSION = 1.2.3.2
VERSION = 1.3.0.0
DEFINES += APP_VERSION='\\"$$VERSION\\"'

View File

@ -78,12 +78,15 @@ bool Deploy::initDir(const QString &path) {
void Deploy::setTargetDir(const QString &target) {
if (target.size() && QFileInfo(target).isDir()) {
if (QuasarAppUtils::Params::isEndable("targetDir")) {
targetDir = QFileInfo(QuasarAppUtils::Params::getStrArg("targetDir")).absoluteFilePath();
} else if (target.size()) {
targetDir = QFileInfo(target).absoluteFilePath();
} else if (QuasarAppUtils::Params::isEndable("targetDir")) {
targetDir = QuasarAppUtils::Params::getStrArg("targetDir");
} else {
targetDir = QFileInfo(targets.begin().key()).absolutePath() + "/Distro";
if (targets.size())
targetDir = QFileInfo(targets.begin().key()).absolutePath() + "/Distro";
targetDir = QFileInfo("./Distro").absoluteFilePath();
qInfo () << "flag targetDir not used." << "use default target dir :" << targetDir;
}
}

View File

@ -1,9 +1,11 @@
# Welcome to the Console Qt Deployer!
# ![Logo](/res/icon.png)
# CQtDeployer [![CQtDeployer](https://snapcraft.io/cqtdeployer/badge.svg)](https://snapcraft.io/cqtdeployer)
# ![Logo](https://i.ibb.co/phDBvfr/qt.png)
****************************
## What is CQtDeployer
The CQtDeployer is application for extract all depends library of executable and create launch script for your application.
***************************
## What is Console Qt Deployer
The Console QtDeployer is console veriosn of the [QtDeployer](https://quasarapp.github.io/QtDeployer/).
Key differences of this program:
* Performance: this program deploys the application several times faster (up to 10 seconds)
@ -11,11 +13,12 @@ Key differences of this program:
* Crossdeploy: this application's support windows and linux distrebutives, This means that you can use it not only to deploy a project for your platform, but also to deploy a project on Linux for Windows and vice versa.
### How to use
#### Example: cqtdeployer <-bin [params]> [options]
#### cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear
#### Options:
| Option | Descriptiion |
|-----------------------------|-----------------------------------------------------------------|
@ -56,21 +59,21 @@ Key differences of this program:
#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.11.1/gcc_64/bin/qmake clear
#### Example: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear
## Build for Linux
- install qt and qt QtInstallFrameWork from [qtInstaller](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
- qmake -r
- make -j$(nproc)
- make deploy
- ./Distro/CQtDeployerInstaller
- make deploy # this command requires the installed [cqtdeployer](https://github.com/QuasarApp/Console-QtDeployer/releases)
- ./Distro/CQtDeployerInstaller.run
## Build for Windows
- install qt and qt QtInstallFrameWork from [qtInstaller](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
- qmake -r
- make -j$(nproc)
- make deploy
- make deploy # this command requires the installed [cqtdeployer](https://github.com/QuasarApp/Console-QtDeployer/releases)
- ./Distro/CQtDeployerInstaller.exe
## Install
@ -88,7 +91,7 @@ If you want to support the project,you can donate into our bitcoin wallet.
***************************
***************************
Console QtDeployer является консольной реализацией [QtDeployer](https://quasarapp.github.io/QtDeployer/).
Qt CQtDeployer - это приложением для извлечения всех зависимых библиотек исполняемого файла и создает сценарий запуска для вашего приложения.
Основные отличия этой программы:
* Производительность - эта программа развертывает приложение в несколько раз быстрее (до 10 секунд)
@ -109,7 +112,7 @@ Console QtDeployer является консольной реализацией
| deploySystem | Копирует все библиотеки кроме libc |
| deployLibc | Копирует libc и все остальные библиотеки |
| -qmake [params] | Путь к qmake. пример |
| | -qmake ~/Qt/5.11.1/gcc_64/bin/qmake |
| | -qmake ~/Qt/5.12.4/gcc_64/bin/qmake |
| -ignore [list,params] | Список библиотек для игнорирования |
| | Пример -ignore libicudata.so.56,libicudata2.so.56 |
| -ignoreEnv [list,params] | Список путей для игнорирования. |
@ -137,20 +140,20 @@ Console QtDeployer является консольной реализацией
| v / version | Показывает версию приложения |
#### Пример: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.11.1/gcc_64/bin/qmake clear
#### Пример: cqtdeployer -bin myApp -qmlDir ~/MyAppProject/qml -qmake ~/Qt/5.12.4/gcc_64/bin/qmake clear
## Build для Linux
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
- qmake -r
- make -j$(nproc)
- make deploy
- ./Distro/CQtDeployerInstaller
- make deploy # эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/Console-QtDeployer/releases)
- ./Distro/CQtDeployerInstaller.run
## Build для Windows
- установите qt и qt QtInstallFrameWork из [Установщик qt](https://www.qt.io/download-qt-installer?hsCtaTracking=9f6a2170-a938-42df-a8e2-a9f0b1d6cdce%7C6cb0de4f-9bb5-4778-ab02-bfb62735f3e5)
- qmake -r
- make -j$(nproc)
- make deploy
- make deploy # эта команда требует установленный [cqtdeployer](https://github.com/QuasarApp/Console-QtDeployer/releases)
- ./Distro/CQtDeployerInstaller.exe
### Snap

View File

@ -63,6 +63,7 @@ private slots:
void testQmlExtrct();
void testDistroStruct();
void testSetTargetDir();
void mainTests();
void testMSVC();
@ -643,7 +644,27 @@ void deploytest::testDistroStruct() {
for (auto &i: cases) {
QVERIFY(distro.getRelativePath(i.first) == i.second);
}
}
void deploytest::testSetTargetDir() {
Deploy dep;
dep.setTargetDir();
QVERIFY(dep.targetDir == QFileInfo("./Distro").absoluteFilePath());
dep.setTargetDir("./ff");
QVERIFY(dep.targetDir == QFileInfo("./ff").absoluteFilePath());
int argc = 3;
const char * argv[] = {"", "-targetDir", "./Distro2"};
QuasarAppUtils::Params::parseParams(argc, argv);
dep.setTargetDir();
QVERIFY(dep.targetDir == QFileInfo("./Distro2").absoluteFilePath());
dep.setTargetDir("./ff");
QVERIFY(dep.targetDir == QFileInfo("./Distro2").absoluteFilePath());
}

@ -1 +1 @@
Subproject commit f76f64183052777f141a5b14bc302024ee9cb71b
Subproject commit 6d993959dbd57cf551fbce537c96325ffddb6bf6

BIN
res/cqtdeployerbanner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -6,7 +6,7 @@
#
name: cqtdeployer # you probably want to 'snapcraft register <name>'
version: '1.2.3.2' # just for humans, typically '1.2+git' or '1.3.2'
version: '1.3.0.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.