mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-27 10:14:32 +00:00
added clear flag
This commit is contained in:
parent
f0e9fd3ba5
commit
bea4f46124
@ -309,6 +309,21 @@ bool Deploy::copyFolder( QDir &from, QDir &to, const QString& filter) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Deploy::clear() {
|
||||
QDir dir(targetDir);
|
||||
|
||||
if (dir.cd("lib")) {
|
||||
dir.removeRecursively();
|
||||
dir.cdUp();
|
||||
}
|
||||
|
||||
if (dir.cd("plugins")) {
|
||||
dir.removeRecursively();
|
||||
dir.cdUp();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Deploy::strip(const QString& dir) {
|
||||
QProcess P;
|
||||
|
||||
|
@ -49,6 +49,9 @@ public:
|
||||
void deploy();
|
||||
QString getQtDir() const;
|
||||
void setQtDir(const QString &value);
|
||||
|
||||
void clear();
|
||||
|
||||
};
|
||||
|
||||
#endif // DEPLOY_H
|
||||
|
@ -22,6 +22,7 @@ void help() {
|
||||
qInfo() << " ignoreCudaLib : it filter ignore cuda lib of nvidea";
|
||||
qInfo() << " -ignore [list,params] : ignore filter for libs";
|
||||
qInfo() << " | for example -ignore libicudata.so.56,libicudata2.so.56";
|
||||
qInfo() << " clear : delete all old deploy data";
|
||||
|
||||
}
|
||||
|
||||
@ -42,6 +43,11 @@ bool parseQt(Deploy& deploy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (QuasarAppUtils::isEndable("clear")) {
|
||||
qInfo() << "clear old data";
|
||||
deploy.clear();
|
||||
}
|
||||
|
||||
if (!deploy.setTarget(bin)) {
|
||||
qCritical() << "error init targeet dir";
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user