From d8444cb5d0b9a98a1e40c7fc4712836987e04a9f Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 3 Sep 2016 12:44:45 -0400 Subject: [PATCH] Build scripts made ready for OS X old version. --- Telegram/SourceFiles/_other/packer.cpp | 9 ++++++--- Telegram/build/build.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/_other/packer.cpp b/Telegram/SourceFiles/_other/packer.cpp index 78e51bd26a..8203e20190 100644 --- a/Telegram/SourceFiles/_other/packer.cpp +++ b/Telegram/SourceFiles/_other/packer.cpp @@ -141,6 +141,7 @@ int main(int argc, char *argv[]) QString remove; int version = 0; + bool target32 = false; QFileInfoList files; for (int i = 0; i < argc; ++i) { if (string("-path") == argv[i] && i + 1 < argc) { @@ -148,6 +149,8 @@ int main(int argc, char *argv[]) QFileInfo info(path); files.push_back(info); if (remove.isEmpty()) remove = info.canonicalPath() + "/"; + } else if (string("-target") == argv[i] && i + 1 < argc) { + target32 = (string("mac32") == argv[i + 1]); } else if (string("-version") == argv[i] && i + 1 < argc) { version = QString(argv[i + 1]).toInt(); } else if (string("-alpha") == argv[i]) { @@ -451,11 +454,11 @@ int main(int argc, char *argv[]) #ifdef Q_OS_WIN QString outName(QString("tupdate%1").arg(BetaVersion ? BetaVersion : version)); #elif defined Q_OS_MAC - QString outName(QString("tmacupd%1").arg(BetaVersion ? BetaVersion : version)); + QString outName((target32 ? QString("tmac32upd%1") : QString("tmacupd%1")).arg(BetaVersion ? BetaVersion : version)); #elif defined Q_OS_LINUX32 - QString outName(QString("tlinux32upd%1").arg(BetaVersion ? BetaVersion : version)); + QString outName(QString("tlinux32upd%1").arg(BetaVersion ? BetaVersion : version)); #elif defined Q_OS_LINUX64 - QString outName(QString("tlinuxupd%1").arg(BetaVersion ? BetaVersion : version)); + QString outName(QString("tlinuxupd%1").arg(BetaVersion ? BetaVersion : version)); #else #error Unknown platform! #endif diff --git a/Telegram/build/build.sh b/Telegram/build/build.sh index f1ae6b432d..904fd5a8e0 100755 --- a/Telegram/build/build.sh +++ b/Telegram/build/build.sh @@ -301,7 +301,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile" fi cd "$ReleasePath" - "./Packer" -path "$BinaryName.app" -version $VersionForPacker $AlphaBetaParam + "./Packer" -path "$BinaryName.app" -target "$BuildTarget" -version $VersionForPacker $AlphaBetaParam echo "Packer done!" if [ "$BetaVersion" != "0" ]; then