Better error handling for strip
This commit is contained in:
@@ -38,7 +38,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (argc > 1)
|
||||
appBinaryPath = QString::fromLocal8Bit(argv[1]);
|
||||
appBinaryPath = QDir::cleanPath(appBinaryPath);
|
||||
appBinaryPath = QDir::cleanPath(appBinaryPath).trimmed();
|
||||
|
||||
if (argc < 2 || appBinaryPath.startsWith("-")) {
|
||||
qDebug() << "Usage: linuxdeployqt app-binary [options]";
|
||||
|
||||
+10
-3
@@ -625,10 +625,17 @@ void runStrip(const QString &binaryPath)
|
||||
QProcess strip;
|
||||
strip.start("strip", QStringList() << "-x" << binaryPath);
|
||||
strip.waitForFinished();
|
||||
if (strip.exitCode() != 0) {
|
||||
LogError() << strip.readAllStandardError();
|
||||
LogError() << strip.readAllStandardOutput();
|
||||
|
||||
if (strip.exitCode() == 0)
|
||||
return;
|
||||
|
||||
if (strip.readAllStandardError().contains("Not enough room for program headers")) {
|
||||
LogError() << QFileInfo(binaryPath).completeBaseName() << "already stripped.";
|
||||
} else {
|
||||
LogError() << "Error stripping" << QFileInfo(binaryPath).completeBaseName() << ":" << strip.readAllStandardError();
|
||||
LogError() << "Error stripping" << QFileInfo(binaryPath).completeBaseName() << ":" << strip.readAllStandardOutput();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void stripAppBinary(const QString &bundlePath)
|
||||
|
||||
Reference in New Issue
Block a user