summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/binarycreator/binarycreator.cpp4
-rw-r--r--tools/devtool/binaryreplace.cpp8
-rw-r--r--tools/devtool/main.cpp10
3 files changed, 13 insertions, 9 deletions
diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp
index 96825bf49..a50ff7a45 100644
--- a/tools/binarycreator/binarycreator.cpp
+++ b/tools/binarycreator/binarycreator.cpp
@@ -332,8 +332,8 @@ static int assemble(Input input, const QInstaller::Settings &settings)
//data block size, from end of .exe to end of file
QInstaller::appendInt64(&out, out.pos() + 3 * sizeof(qint64) -dataBlockStart);
- QInstaller::appendInt64(&out, QInstaller::MagicInstallerMarker);
- QInstaller::appendInt64(&out, QInstaller::MagicCookie);
+ QInstaller::appendInt64(&out, BinaryContent::MagicInstallerMarker);
+ QInstaller::appendInt64(&out, BinaryContent::MagicCookie);
} catch (const Error &e) {
qCritical("Error occurred while assembling the installer: %s", qPrintable(e.message()));
diff --git a/tools/devtool/binaryreplace.cpp b/tools/devtool/binaryreplace.cpp
index 1e832dcfc..f170059f7 100644
--- a/tools/devtool/binaryreplace.cpp
+++ b/tools/devtool/binaryreplace.cpp
@@ -113,7 +113,7 @@ int BinaryReplace::replace(const QString &source, const QString &target)
QInstaller::openForAppend(&installerBaseNew);
installerBaseNew.seek(installerBaseNew.size());
- if (m_binaryLayout.magicMarker == QInstaller::MagicInstallerMarker) {
+ if (m_binaryLayout.magicMarker == QInstaller::BinaryContent::MagicInstallerMarker) {
QInstaller::openForRead(&installerBaseOld);
installerBaseOld.seek(m_binaryLayout.metadataResourceSegments.first().start());
QInstaller::appendData(&installerBaseNew, &installerBaseOld, installerBaseOld
@@ -122,8 +122,10 @@ int BinaryReplace::replace(const QString &source, const QString &target)
} else {
QInstaller::appendInt64(&installerBaseNew, 0);
QInstaller::appendInt64(&installerBaseNew, 4 * sizeof(qint64));
- QInstaller::appendInt64(&installerBaseNew, QInstaller::MagicUninstallerMarker);
- QInstaller::appendInt64(&installerBaseNew, QInstaller::MagicCookie);
+ QInstaller::appendInt64(&installerBaseNew,
+ QInstaller::BinaryContent::MagicUninstallerMarker);
+ QInstaller::appendInt64(&installerBaseNew,
+ QInstaller::BinaryContent::MagicCookie);
}
installerBaseNew.close();
#else
diff --git a/tools/devtool/main.cpp b/tools/devtool/main.cpp
index 713b0e02b..b03bc4ff1 100644
--- a/tools/devtool/main.cpp
+++ b/tools/devtool/main.cpp
@@ -106,17 +106,19 @@ int main(int argc, char *argv[])
try {
QFile *file = new QFile(path);
QInstaller::openForRead(file);
- qint64 pos = QInstaller::findMagicCookie(file, QInstaller::MagicCookie);
+ qint64 pos = QInstaller::BinaryContent::findMagicCookie(file,
+ QInstaller::BinaryContent::MagicCookie);
QInstaller::BinaryLayout layout = QInstaller::BinaryContent::readBinaryLayout(file, pos);
- if (layout.magicMarker == QInstaller::MagicUninstallerMarker) {
+ if (layout.magicMarker == QInstaller::BinaryContent::MagicUninstallerMarker) {
QFileInfo fi(path);
if (QInstaller::isInBundle(fi.absoluteFilePath(), &bundlePath))
fi.setFile(bundlePath);
path = fi.absolutePath() + QLatin1Char('/') + fi.baseName() + QLatin1String(".dat");
file->setFileName(path);
- pos = QInstaller::findMagicCookie(file, QInstaller::MagicCookie);
+ pos = QInstaller::BinaryContent::findMagicCookie(file,
+ QInstaller::BinaryContent::MagicCookie);
layout = QInstaller::BinaryContent::readBinaryLayout(file, pos);
}
@@ -181,7 +183,7 @@ int main(int argc, char *argv[])
if (parser.isSet(dump)) {
// To dump the content we do not need the binary format engine.
- if (layout.magicMarker != QInstaller::MagicInstallerMarker)
+ if (layout.magicMarker != QInstaller::BinaryContent::MagicInstallerMarker)
throw QInstaller::Error(QLatin1String("Source file is not an installer."));
BinaryDump bd;
return bd.dump(index, parser.value(dump));