diff --git a/CQtDeployer/deploy.cpp b/CQtDeployer/deploy.cpp index 6449dcc4..5979aa05 100644 --- a/CQtDeployer/deploy.cpp +++ b/CQtDeployer/deploy.cpp @@ -301,10 +301,12 @@ QString Deploy::recursiveInvairement(int depch, QDir &dir) { for (QFileInfo &i : list) { dir.cd(i.fileName()); - res += ":" + recursiveInvairement(depch++, dir); + res += recursiveInvairement(++depch, dir); dir.cdUp(); } + res += ":" + dir.absolutePath(); + return res; } @@ -400,8 +402,8 @@ void Deploy::copyPlugins(const QStringList &list) { info.setFile(extraPlugin); if (info.isDir()) { - QDir from(info.absoluteDir()); - QDir to(targetDir + QDir::separator() + "plugins"); + QDir from(info.absoluteFilePath()); + QDir to(targetDir + QDir::separator() + "plugins" + QDir::separator() + info.baseName()); copyFolder(from, to, ".so.debug"); } else { copyFile(info.absoluteFilePath(), @@ -414,7 +416,11 @@ void Deploy::copyPlugins(const QStringList &list) { bool Deploy::copyFolder(QDir &from, QDir &to, const QString &filter, QStringList *listOfCopiedItems, QStringList *mask) { - if (!(from.isReadable() && to.isReadable())) { + if (!from.isReadable()) { + return false; + } + + if (!to.isReadable() && !to.mkpath(to.path())) { return false; } diff --git a/CQtDeployer/main.cpp b/CQtDeployer/main.cpp index 2ed5af60..f442e7c9 100644 --- a/CQtDeployer/main.cpp +++ b/CQtDeployer/main.cpp @@ -35,7 +35,7 @@ void help() { qInfo() << " -libDir [list,params] : set additional path for extralib of app."; qInfo() << " | for example -libDir ~/myLib,~/newLibs"; qInfo() << " -extraPlugin[list,params]: set additional path for extraPlugin of app"; - qInfo() << " recursiveDepth : set Depth for recursive search of libs (default 0)"; + qInfo() << " -recursiveDepth [params] : set Depth for recursive search of libs (default 0)"; qInfo() << " verbose : show debug log"; @@ -69,14 +69,14 @@ bool parseQt(Deploy &deploy) { return false; } - int limit = 1; + int limit = 0; if (QuasarAppUtils::Params::isEndable("recursiveDepth")) { bool ok; limit = QuasarAppUtils::Params::getArg("recursiveDepth").toInt(&ok); if (!ok) { - limit = 1; - qWarning() << "recursiveDepth is invalid!"; + limit = 0; + qWarning() << "recursiveDepth is invalid! use default value 0"; } } diff --git a/README.md b/README.md index 524c4087..fe20068b 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Key differences of this program: | -libDir [list,params] | set additional path for extralib of app | | | for example -libDir ~/myLib,~/newLibs | | -extraPlugin [list,params] | set additional path for extraPlugin of app | -| recursiveDepth | set Depth for recursive search of libs (default 0) | +| -recursiveDepth [params] | set Depth for recursive search of libs (default 0) | | verbose | show debug log | @@ -92,7 +92,7 @@ Console QtDeployer является консольной реализацией | -libDir [list,params] | установит дополнительные пути к библиотекам | | | пример -libDir ~/myLib,~/newLibs | | -extraPlugin [list,params] | установить дополнительный путь для extraPlugin приложения | -| recursiveDepth | установит глубену поиска библиотек (по умолчанию 0) | +| -recursiveDepth [params] | установит глубену поиска библиотек (по умолчанию 0) | | verbose | show debug log |