diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binarycreator/binarycreator.cpp | 23 | ||||
-rw-r--r-- | tools/binarycreator/resources/copylibsintobundle.sh | 2 | ||||
-rw-r--r-- | tools/devtool/binaryreplace.cpp | 2 | ||||
-rw-r--r-- | tools/devtool/main.cpp | 2 |
4 files changed, 16 insertions, 13 deletions
diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp index 5de4ff745..f9a8f31d4 100644 --- a/tools/binarycreator/binarycreator.cpp +++ b/tools/binarycreator/binarycreator.cpp @@ -263,7 +263,7 @@ static QVersionNumber readMachOMinimumSystemVersion(QIODevice *device) static int assemble(Input input, const QInstaller::Settings &settings, const QString &signingIdentity) { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS if (QInstaller::isInBundle(input.installerExePath)) { const QString bundle = input.installerExePath; // if the input file was a bundle @@ -330,9 +330,12 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt << endl; plistStream << QLatin1String("\t<key>CFBundlePackageType</key>") << endl; plistStream << QLatin1String("\t<string>APPL</string>") << endl; - plistStream << QLatin1String("\t<key>CFBundleGetInfoString</key>") << endl; #define QUOTE_(x) #x #define QUOTE(x) QUOTE_(x) + plistStream << QLatin1String("\t<key>CFBundleShortVersionString</key>") << endl; + plistStream << QLatin1String("\t<string>") << QLatin1String(QUOTE(IFW_VERSION_STR)) << ("</string>") + << endl; + plistStream << QLatin1String("\t<key>CFBundleVersion</key>") << endl; plistStream << QLatin1String("\t<string>") << QLatin1String(QUOTE(IFW_VERSION_STR)) << ("</string>") << endl; #undef QUOTE @@ -391,7 +394,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt // no error handling as this is not fatal setApplicationIcon(tempFile, settings.installerApplicationIcon()); } -#elif defined(Q_OS_OSX) +#elif defined(Q_OS_MACOS) if (isBundle) { // no error handling as this is not fatal const QString copyscript = QDir::temp().absoluteFilePath(QLatin1String("copylibsintobundle.sh")); @@ -408,7 +411,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt QTemporaryFile out; QString targetName = input.outputPath; -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS QDir resourcePath(QFileInfo(input.outputPath).dir()); resourcePath.cdUp(); resourcePath.cd(QLatin1String("Resources")); @@ -429,7 +432,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt QInstaller::openForWrite(&out); QFile exe(input.installerExePath); -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS if (!exe.copy(input.outputPath)) { throw Error(QString::fromLatin1("Cannot copy %1 to %2: %3").arg(exe.fileName(), input.outputPath, exe.errorString())); @@ -474,7 +477,7 @@ static int assemble(Input input, const QInstaller::Settings &settings, const QSt #endif QFile::remove(tempFile); -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS if (isBundle && !signingIdentity.isEmpty()) { qDebug() << "Signing .app bundle..."; @@ -657,7 +660,7 @@ static void printUsage() std::cout << " -rcc|--compile-resource Compiles the default resource and outputs the result into" << std::endl; std::cout << " 'update.rcc' in the current path." << std::endl; -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS std::cout << " -s|--sign identity Sign generated app bundle using the given code " << std::endl; std::cout << " signing identity" << std::endl; #endif @@ -715,7 +718,7 @@ void copyConfigData(const QString &configFile, const QString &targetDir) QString targetFile; QFileInfo elementFileInfo; if (tagName == QLatin1String("Icon") || tagName == QLatin1String("InstallerApplicationIcon")) { -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) const QString suffix = QLatin1String(".icns"); #elif defined(Q_OS_WIN) const QString suffix = QLatin1String(".ico"); @@ -882,7 +885,7 @@ int main(int argc, char **argv) continue; } else if (*it == QLatin1String("-rcc") || *it == QLatin1String("--compile-resource")) { compileResource = true; -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS } else if (*it == QLatin1String("-s") || *it == QLatin1String("--sign")) { ++it; if (it == args.end() || it->startsWith(QLatin1String("-"))) @@ -983,7 +986,7 @@ int main(int argc, char **argv) confInternal.setValue(QLatin1String("offlineOnly"), offlineOnly); } -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS // on mac, we enforce building a bundle if (!target.endsWith(QLatin1String(".app")) && !target.endsWith(QLatin1String(".dmg"))) target += QLatin1String(".app"); diff --git a/tools/binarycreator/resources/copylibsintobundle.sh b/tools/binarycreator/resources/copylibsintobundle.sh index c6765364e..1ad5da4db 100644 --- a/tools/binarycreator/resources/copylibsintobundle.sh +++ b/tools/binarycreator/resources/copylibsintobundle.sh @@ -71,7 +71,7 @@ function handleFile() if [ `basename $FILE` != $NAME ]; then - # this part handles libraries which are Mac OS X frameworks + # this part handles libraries which are macOS frameworks if echo $lib | grep '\.framework' >/dev/null; then local FRAMEWORKPATH=`echo $lib | sed -ne 's,\(.*\.framework\).*,\1,p'` local FRAMEWORKNAME=`basename $FRAMEWORKPATH` diff --git a/tools/devtool/binaryreplace.cpp b/tools/devtool/binaryreplace.cpp index 7497f2199..97dac37d2 100644 --- a/tools/devtool/binaryreplace.cpp +++ b/tools/devtool/binaryreplace.cpp @@ -99,7 +99,7 @@ int BinaryReplace::replace(const QString &source, const QString &target) result = EXIT_FAILURE; try { QFile installerBaseNew(newInstallerBasePath); -#ifndef Q_OS_OSX +#ifndef Q_OS_MACOS QFile installerBaseOld(target); QInstaller::openForAppend(&installerBaseNew); diff --git a/tools/devtool/main.cpp b/tools/devtool/main.cpp index d75ab4e81..dbe8f2b09 100644 --- a/tools/devtool/main.cpp +++ b/tools/devtool/main.cpp @@ -168,7 +168,7 @@ int main(int argc, char *argv[]) if (QInstaller::isInBundle(path, &bundlePath)) { path = QDir(bundlePath).filePath(QLatin1String("Contents/Resources/installer.dat")); } -#ifndef Q_OS_OSX +#ifndef Q_OS_MACOS QFileInfo fi = QFileInfo(path); bundlePath = path; QString tmp = QDir(fi.path()).filePath(QLatin1String("installer.dat")); |