Browse Source

Workaround for OBS builds

master
probonopd 8 years ago
parent
commit
6926e89d15
  1. 11
      shared/shared.cpp

11
shared/shared.cpp

@ -120,7 +120,7 @@ bool copyFilePrintStatus(const QString &from, const QString &to)
if (alwaysOwerwriteEnabled) { if (alwaysOwerwriteEnabled) {
QFile(to).remove(); QFile(to).remove();
} else { } else {
LogNormal() << "File exists, skip copy:" << to; LogNormal() << QFileInfo(to).fileName() << "already deployed, skipping.";
return false; return false;
} }
} }
@ -671,12 +671,13 @@ bool patchString(const QString &path, const QString &searchString, const QString
} }
QByteArray searchStringQByteArray = searchString.toLatin1().data(); QByteArray searchStringQByteArray = searchString.toLatin1().data();
int startPos = content.indexOf(searchStringQByteArray); int startPos = content.indexOf(searchStringQByteArray);
LogDebug() << "startPos:" << startPos;
if (startPos != -1) { if (startPos != -1) {
LogNormal() << "startPos:" << startPos;
LogNormal() << QString::fromLatin1( LogNormal() << QString::fromLatin1(
"Patching string %2 in %1 to '%3'").arg(QDir::toNativeSeparators(path), searchString, replacementString); "Patching string %2 in %1 to '%3'").arg(QDir::toNativeSeparators(path), searchString, replacementString);
} else {
return false;
} }
int endPos = content.indexOf(char(0), startPos); int endPos = content.indexOf(char(0), startPos);
if (endPos == -1) { if (endPos == -1) {
@ -748,8 +749,8 @@ void changeIdentification(const QString &id, const QString &binaryPath)
patchString(binaryPath, "lib/qt/qml", "qml"); patchString(binaryPath, "lib/qt/qml", "qml");
patchString(binaryPath, "lib/qt", ""); patchString(binaryPath, "lib/qt", "");
patchString(binaryPath, "share/doc/qt", "doc"); patchString(binaryPath, "share/doc/qt", "doc");
patchString(binaryPath, "include/qt", "include"); // patchString(binaryPath, "include/qt", "include"); // FIXME: Destroys OBS builds; something more intelligent is needed
patchString(binaryPath, "share/qt", ""); // patchString(binaryPath, "share/qt", ""); // FIXME: Destroys OBS builds; something more intelligent is needed
patchString(binaryPath, "share/qt/translations", "translations"); patchString(binaryPath, "share/qt/translations", "translations");
patchString(binaryPath, "share/doc/qt/examples", "examples"); patchString(binaryPath, "share/doc/qt/examples", "examples");
} }

Loading…
Cancel
Save