Skip to content

Commit

Permalink
Merge pull request #35 from QuasarApp/v1.1
Browse files Browse the repository at this point in the history
fix depch and extra plugins
  • Loading branch information
EndrII authored Nov 14, 2018
2 parents 6fc9391 + 4ab5083 commit 72fb49c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
14 changes: 10 additions & 4 deletions CQtDeployer/deploy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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(),
Expand All @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions CQtDeployer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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";
}
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


Expand Down Expand Up @@ -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 |


Expand Down

0 comments on commit 72fb49c

Please sign in to comment.