mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-26 17:54:32 +00:00
ref extract only C libs #14
This commit is contained in:
parent
0a5d3ca596
commit
757853855f
@ -139,15 +139,18 @@ void Deploy::deploy() {
|
||||
}
|
||||
|
||||
extract(target);
|
||||
copyPlugins(neededPlugins);
|
||||
|
||||
if (deployQml && !extractQml()) {
|
||||
if (!onlyCLibs)
|
||||
copyPlugins(neededPlugins);
|
||||
|
||||
if (!onlyCLibs && deployQml && !extractQml()) {
|
||||
qCritical() << "qml not extacted!";
|
||||
}
|
||||
|
||||
copyFiles(QtLibs, targetDir + QDir::separator() + "lib");
|
||||
if (!onlyCLibs)
|
||||
copyFiles(QtLibs, targetDir + QDir::separator() + "lib");
|
||||
|
||||
if (QuasarAppUtils::isEndable("deploy-not-qt")) {
|
||||
if (onlyCLibs || QuasarAppUtils::isEndable("deploy-not-qt")) {
|
||||
copyFiles(noQTLibs, targetDir + QDir::separator() + "lib");
|
||||
}
|
||||
|
||||
@ -174,6 +177,10 @@ void Deploy::setQtDir(const QString &value) {
|
||||
qtDir = value;
|
||||
}
|
||||
|
||||
void Deploy::setOnlyCLibs(bool value) {
|
||||
onlyCLibs = value;
|
||||
}
|
||||
|
||||
bool Deploy::isQtLib(const QString &lib) const {
|
||||
QFileInfo info(lib);
|
||||
return info.absolutePath().contains(qtDir);
|
||||
|
@ -15,6 +15,7 @@ class Deploy
|
||||
{
|
||||
private:
|
||||
bool deployQml = false;
|
||||
bool onlyCLibs = false;
|
||||
QString qmlScaner = "";
|
||||
QString qmake = "";
|
||||
QString qtDir = "";
|
||||
@ -70,6 +71,7 @@ public:
|
||||
void clear();
|
||||
|
||||
bool initDirs();
|
||||
void setOnlyCLibs(bool value);
|
||||
};
|
||||
|
||||
#endif // DEPLOY_H
|
||||
|
@ -42,19 +42,10 @@ void help() {
|
||||
}
|
||||
|
||||
bool parseQt(Deploy& deploy) {
|
||||
auto qmake = QuasarAppUtils::getStrArg("qmake");
|
||||
QString basePath = "";
|
||||
QFileInfo info(qmake);
|
||||
if (!info.isFile() || (info.baseName() != "qmake")) {
|
||||
return false;
|
||||
}
|
||||
basePath = info.absolutePath();
|
||||
deploy.setQmake(qmake);
|
||||
auto scaner = basePath + QDir::separator() + "qmlimportscanner";
|
||||
|
||||
auto bin = QuasarAppUtils::getStrArg("bin");
|
||||
|
||||
info.setFile(bin);
|
||||
QFileInfo info(bin);
|
||||
if (!info.isFile()) {
|
||||
return false;
|
||||
}
|
||||
@ -64,16 +55,29 @@ bool parseQt(Deploy& deploy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (QuasarAppUtils::isEndable("clear")) {
|
||||
qInfo() << "clear old data";
|
||||
deploy.clear();
|
||||
}
|
||||
|
||||
if (!deploy.initDirs()) {
|
||||
qCritical() << "error init targeet dir";
|
||||
return false;
|
||||
}
|
||||
|
||||
auto qmake = QuasarAppUtils::getStrArg("qmake");
|
||||
QString basePath = "";
|
||||
info.setFile(qmake);
|
||||
if (!info.isFile() || (info.baseName() != "qmake")) {
|
||||
qInfo() << "deploy only C libs because qmake is not found";
|
||||
deploy.setOnlyCLibs(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
basePath = info.absolutePath();
|
||||
deploy.setQmake(qmake);
|
||||
auto scaner = basePath + QDir::separator() + "qmlimportscanner";
|
||||
|
||||
if (QuasarAppUtils::isEndable("clear")) {
|
||||
qInfo() << "clear old data";
|
||||
deploy.clear();
|
||||
}
|
||||
|
||||
auto qmlDir = QuasarAppUtils::getStrArg("qmlDir");
|
||||
|
||||
QDir dir(basePath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user