mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-26 09:44:33 +00:00
fix #699 added support of the binarycreator option
This commit is contained in:
parent
6b681aa294
commit
a3223008f3
@ -59,18 +59,22 @@ QList<SystemCommandData> QIF::runCmd() {
|
||||
|
||||
SystemCommandData cmd;
|
||||
|
||||
QString binarycreator = QuasarAppUtils::Params::getArg("binarycreator");
|
||||
|
||||
if (binarycreator.isEmpty())
|
||||
binarycreator = DeployCore::findProcess(toolKitEnv().concatEnv(), base);
|
||||
|
||||
if (binarycreator.isEmpty()) {
|
||||
cmd.command = base;
|
||||
} else {
|
||||
cmd.command = binarycreator;
|
||||
auto commandsList = binarycreator.split(' ');
|
||||
cmd.command = commandsList.first();
|
||||
cmd.arguments = QStringList{commandsList.begin() + 1, commandsList.end()};
|
||||
}
|
||||
|
||||
auto location = DeployCore::_config->getTargetDir() + "/" + getLocation();
|
||||
|
||||
cmd.arguments = QStringList{
|
||||
cmd.arguments += QStringList{
|
||||
"-c",
|
||||
QuasarAppUtils::Params::getArg("qifConfig", location + "/config/config.xml"),
|
||||
"-p",
|
||||
|
@ -51,7 +51,6 @@ private:
|
||||
*/
|
||||
bool initDefaultConfiguratuin();
|
||||
|
||||
QString binarycreator;
|
||||
TemplateInfo generalInfo;
|
||||
};
|
||||
|
||||
|
@ -524,6 +524,12 @@ QuasarAppUtils::OptionsDataList DeployCore::avilableOptions() {
|
||||
" If you omit this option, the 7z format will be used as a default. "
|
||||
}});
|
||||
|
||||
help.insert(group, {QuasarAppUtils::OptionData{
|
||||
{"-binarycreator"}, "{binarycreator command}",
|
||||
"Sets new binarycreator command.",
|
||||
"cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'"
|
||||
}});
|
||||
|
||||
group = "Part 7 Deb package options";
|
||||
|
||||
help.insert(group, {QuasarAppUtils::OptionData{
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <zipcompresser.h>
|
||||
#include <QStorageInfo>
|
||||
|
||||
#include <Distributions/qif.h>
|
||||
|
||||
#include <QMap>
|
||||
#include <QByteArray>
|
||||
#include <QDir>
|
||||
@ -194,6 +196,7 @@ private slots:
|
||||
|
||||
void testCustomPlatform();
|
||||
void testQifArchiveFormat();
|
||||
void testQifBinaryCreator();
|
||||
|
||||
void customTest();
|
||||
};
|
||||
@ -1718,6 +1721,35 @@ void deploytest::testQifArchiveFormat() {
|
||||
);
|
||||
}
|
||||
|
||||
void deploytest::testQifBinaryCreator() {
|
||||
TestUtils utils;
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
QString bin = {TestBinDir + "TestOnlyC"};
|
||||
#else
|
||||
QString bin = {TestBinDir + "TestOnlyC.exe"};
|
||||
#endif
|
||||
|
||||
QuasarAppUtils::Params::parseParams({
|
||||
"-bin", bin,
|
||||
"qifFromSystem",
|
||||
"clear",
|
||||
"qif",
|
||||
"-binarycreator", "test testValue"
|
||||
});
|
||||
Deploy deploy;
|
||||
QVERIFY(deploy.prepare());
|
||||
FileManager fm;
|
||||
QIF qif(&fm);
|
||||
|
||||
auto command = qif.runCmd();
|
||||
QVERIFY(command.size() == 1);
|
||||
QVERIFY(command.first().command == "test");
|
||||
QVERIFY(command.first().arguments.contains("testValue"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
void deploytest::customTest() {
|
||||
//runTestParams({"-confFile", "",
|
||||
// "qifFromSystem"});
|
||||
|
@ -157,6 +157,7 @@ cqtdeployer -option1 value1 -option2 list, of, values flag1 flag2 flag3
|
||||
| -qifPackages [path/to/packagesFodoler] | Sets a custom path to the packages directories. By default it is qif/packages. Note This path sets releative target folder (sets by TargetDir option). |
|
||||
| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Sets a custom path to the resources files. By default this option is skipped. Note This path sets releative target folder (sets by TargetDir option). |
|
||||
| -qifArchiveFormat [7z,zip,tar,tar.gz,tar.bz2,tar.xz] | Sets the format used when packaging new component data archives. If you omit this option, the 7z format will be used as a default. |
|
||||
| -binarycreator [binarycreator command] | Sets new binarycreator command. Example : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'|
|
||||
|
||||
### Deb package options
|
||||
|
||||
|
@ -153,6 +153,7 @@ cqtdeployer -option1 value1 -option2 list,of,values flag1 flag2 flag3
|
||||
| -qifPackages [path/to/packagesFodoler] | Устанавливает пользовательский путь к каталогам пакетов. По умолчанию это qif/packages. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). |
|
||||
| -qifResources [path/to/resources1.qrc,path/to/resources2.qrc] | Устанавливает пользовательский путь к файлам ресурсов. По умолчанию эта опция пропущена. Важно путь считаеться относительным целевого католога (установленным опцией targetDir). |
|
||||
| -qifArchiveFormat [7z,zip,tar,tar.gz,tar.bz2,tar.xz] | Задает формат, используемый при упаковке новых архивов данных компонентов. Если вы опустите этот параметр, по умолчанию будет использоваться формат 7z. |
|
||||
| -binarycreator [binarycreator command] | Установит новую команду вызова binarycreator. Пример : cqtdeployer -bin my.exe qifw -binarycreator 'wine path/to/binarycreator.exe'|
|
||||
|
||||
### Deb package options:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user