fix the getDefaultTemplate option

This commit is contained in:
Andrei Yankovich 2021-07-12 11:58:41 +03:00
parent d4bafe3d85
commit bd75685de5
7 changed files with 67 additions and 11 deletions

View File

@ -199,7 +199,7 @@ bool ConfigParser::parseParams() {
QuasarAppUtils::Params::log("Deploy ...",
QuasarAppUtils::Info);
if (!parseDeployMode()) {
if (!parseDeployMode(true)) {
QuasarAppUtils::Params::log("Deploy failed!",
QuasarAppUtils::Error);
return false;
@ -212,7 +212,7 @@ bool ConfigParser::parseParams() {
QuasarAppUtils::Params::log("Extract defaults Templates ...",
QuasarAppUtils::Info);
if (!parseDeployMode()) {
if (!parseDeployMode(false)) {
QuasarAppUtils::Params::log("Extract defaults Templates is failed!",
QuasarAppUtils::Error);
return false;
@ -638,7 +638,7 @@ void ConfigParser::packagesErrorLog(const QString &option) {
QuasarAppUtils::Error);
}
bool ConfigParser::parseDeployMode() {
bool ConfigParser::parseDeployMode(bool checkBin) {
if (QuasarAppUtils::Params::isEndable("deploySystem-with-libc")) {
QuasarAppUtils::Params::log("You are using a deprecated option \"deploySystem-with-libc\"."
@ -666,7 +666,7 @@ bool ConfigParser::parseDeployMode() {
split(DeployCore::getSeparator(0), splitbehavior);
if (!(_config.targets().count() || xData.count())) {
if (checkBin && !(_config.targets().count() || xData.count())) {
QuasarAppUtils::Params::log("Failed to initialize targets or extra data!",
QuasarAppUtils::Error);

View File

@ -52,7 +52,7 @@ private:
bool loadFromFile(const QString& file);
bool initDistroStruct();
bool initPackages();
bool parseDeployMode();
bool parseDeployMode(bool checkBin = true);
bool parseInfoMode();
bool parseInitMode();
/**

View File

@ -1037,8 +1037,7 @@ void deploytest::testOverridingDefaultTemplateDEB()
appScript.remove();
runTestParams(
{"-bin", bin,
"force-clear",
{"force-clear",
"getDefaultTemplate",
"-name", "Test",
"deb",
@ -1054,8 +1053,7 @@ void deploytest::testOverridingDefaultTemplateDEB()
});
runTestParams(
{"-bin", bin,
"force-clear",
{"force-clear",
"-deb", "temaplate/defaultDEBTemplate",
"-targetPackage", "MyApp",
"-name", "Test",

View File

@ -85,3 +85,17 @@ For include your templates into your destribution you need to add path of the De
"deb": "./Debian templates"
}
```
## Initialization of the debian template
For initialize default templates you can use the getDefaultTemplate option.
The getDefaultTemplate option extract default template of the cqtdeployer. This is can be very convinion if you want override default behavior of the installer or anothe distribution package.
### Example
### Getting default debian template.
```bash
cqtdeployer getDefaultTemplate deb
```

View File

@ -115,3 +115,19 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller
4 directories, 4 files
```
## Initialization of the qifw template
For initialize default templates you can use the getDefaultTemplate option.
The getDefaultTemplate option extract default template of the cqtdeployer. This is can be very convinion if you want override default behavior of the installer or anothe distribution package.
### Example
### Getting default qt installer framwork template.
```bash
cqtdeployer getDefaultTemplate qif
```

View File

@ -83,4 +83,18 @@ cqtdeployer создает вуи пакет для каждого пакета.
],
"deb": "./Debian templates"
}
```
```
## Инициализация шаблона debian
Для инициализации шаблонов по умолчанию вы можете использовать параметр getDefaultTemplate.
Параметр getDefaultTemplate извлекает шаблон по умолчанию для cqtdeployer. Это может быть очень удобно, если вы хотите переопределить поведение установщика или другого пакета распространения по умолчанию.
### Пример
### Получение шаблона debian по умолчанию.
```bash
cqtdeployer getDefaultTemplate deb
```

View File

@ -113,4 +113,18 @@ cqtdeployer ... -qif /path/to/my/custom/qif/template -name myCustomInstaller
4 directories, 4 files
```
```
## Инициализация шаблона qifw
Для инициализации шаблонов по умолчанию вы можете использовать параметр getDefaultTemplate.
Параметр getDefaultTemplate извлекает шаблон по умолчанию для cqtdeployer. Это может быть очень удобно, если вы хотите переопределить поведение установщика или другого пакета распространения по умолчанию.
### Пример
### Получение шаблона фреймворка установщика qt по умолчанию.
```bash
cqtdeployer getDefaultTemplate qif
```