diff --git a/Deploy/cqt.cpp b/Deploy/cqt.cpp index f60a345..3840857 100644 --- a/Deploy/cqt.cpp +++ b/Deploy/cqt.cpp @@ -301,7 +301,7 @@ bool CQT::setBinDir(const QString &dir, bool recursive) { auto sufix = file.completeSuffix(); - if (!((!recursive && sufix.isEmpty()) || sufix.contains("dll", Qt::CaseInsensitive) || + if (!((!recursive) || sufix.isEmpty() || sufix.contains("dll", Qt::CaseInsensitive) || sufix.contains("so", Qt::CaseInsensitive) || sufix.contains("exe", Qt::CaseInsensitive))) { continue; } diff --git a/README.md b/README.md index 50479c5..f7a8aef 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Key differences of this program: | Option | Descriptiion | |-----------------------------|-----------------------------------------------------------------| | -bin [list, params] | Deployable file or folder. For example -bin ~/my/project/bin/,~/my/project/bin.exe| -| -binDir [params] | A folder which includes deployable files (recursive search). WARNING: this flag supports 'so', 'dll' and 'exe' files only. Use '-bin' flag if you want to deploy linux binary files | +| -binDir [params] | A folder which includes deployable files (recursive search). | | -confFile [params] | The path to the json file with all deployment configurations. Using this file, you can add the necessary options, thereby simplifying the command invocation in the console. However, the parameters in Kansol have a higher priority than in the file. | | -qmlDir [params] | Qml data dir. For example -qmlDir ~/my/project/qml | | -qmake [params] | Qmake path. For example | @@ -92,7 +92,7 @@ Console QtDeployer является консольной реализацией |-----------------------------|-----------------------------------------------------------| | help / h | Показывает справку | | -bin [list, params] | Развертываемый файл или папка. пример -bin ~/my/project/bin/,~/my/project/bin.exe| -| -binDir [params] | Папка с развертываемыми файлами (с рекурсивным поиском). ВНИМАНИЕ! Этот флаг поддерживает только файлы 'so', 'dll' и 'exe'. Если вы хотите развернуть бинарный файл Linux, используйте флаг '-bin' | +| -binDir [params] | Папка с развертываемыми файлами (с рекурсивным поиском). | | -confFile [params] | Путь к файлу json со всеми конфигурациями развертывания. С помощью этого файла можно добавить нужные опции, тем самым упрастить вызов комманды в консоле. Однако пораметры в кансоле имеют больший приоритет чем в файле. | | -qmlDir [params] | Папка qml. пример -qmlDir ~/my/project/qml | | -qmake [params] | Путь к qmake. пример | diff --git a/UnitTests/tst_deploytest.cpp b/UnitTests/tst_deploytest.cpp index 92a0ef6..e00fc6a 100644 --- a/UnitTests/tst_deploytest.cpp +++ b/UnitTests/tst_deploytest.cpp @@ -75,6 +75,7 @@ private slots: void testHelp(); void testOverwrite(); + void testBinDir(); void testMSVC(); @@ -570,7 +571,7 @@ void deploytest::testOverwrite() { {"./Distro/bin/TestOnlyC", "./Distro/TestOnlyC.sh"}); - runTestParams({"-bin", TestBinDir + "TestOnlyC", "clear", "noOverwrite"}, &comapareTree); + runTestParams({"-bin", TestBinDir + "TestOnlyC", "force-clear", "noOverwrite"}, &comapareTree); QFile f("./Distro/bin/TestOnlyC"); @@ -616,6 +617,22 @@ void deploytest::testOverwrite() { } +void deploytest::testBinDir() { + TestUtils utils; + + auto comapareTree = utils.createTree( + {"./Distro/bin/TestOnlyC", + "./Distro/bin/QtWidgetsProject", + "./Distro/bin/TestQMLWidgets", + "./Distro/TestOnlyC.sh", + "./Distro/QtWidgetsProject.sh", + "./Distro/TestQMLWidgets.sh"}); + + runTestParams({"-binDir", TestBinDir, "clear"}, &comapareTree); + + +} + //bool deploytest::mainTestOnlyC() { //#ifdef WITH_ALL_TESTS // int argc = 5;