diff --git a/Telegram/PrepareMac.sh b/Telegram/PrepareMac.sh index 4a98b5021..373645ffc 100755 --- a/Telegram/PrepareMac.sh +++ b/Telegram/PrepareMac.sh @@ -20,6 +20,18 @@ if [ ! -d "./../Mac/Release/Telegram.app" ]; then exit 1 fi +if [ ! -d "./../Mac/Release/Telegram.app.dSYM" ]; then + echo "Telegram.app.dSYM not found!" + exit 1 +fi + +AppUUID=`dwarfdump -u "./../Mac/Release/Telegram.app/Contents/MacOS/Telegram" | awk -F " " '{print $2}'` +DsymUUID=`dwarfdump -u "./../Mac/Release/Telegram.app.dSYM" | awk -F " " '{print $2}'` +if [ "$AppUUID" != "$DsymUUID" ]; then + echo "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!" + exit 1 +fi + if [ ! -f "./../Mac/Release/Telegram.app/Contents/Resources/Icon.icns" ]; then echo "Icon.icns not found in Resources!" exit 1 @@ -57,6 +69,7 @@ echo "Copying Telegram.app and tmacupd$AppVersion to deploy/$AppVersionStr.."; mkdir "./../Mac/Release/deploy/$AppVersionStr" mkdir "./../Mac/Release/deploy/$AppVersionStr/Telegram" cp -r ./../Mac/Release/Telegram.app ./../Mac/Release/deploy/$AppVersionStr/Telegram/ +mv ./../Mac/Release/Telegram.app.dSYM ./../Mac/Release/deploy/$AppVersionStr/ rm ./../Mac/Release/Telegram.app/Contents/MacOS/Telegram rm ./../Mac/Release/Telegram.app/Contents/Frameworks/Updater rm -rf ./../Mac/Release/Telegram.app/Contents/_CodeSignature diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 77a559cfa..1ae0af66b 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1670,7 +1670,7 @@ CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 0.7.6; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.7; DYLIB_CURRENT_VERSION = 0.7.6; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1813,7 +1813,7 @@ CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 0.7.6; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.7; DYLIB_CURRENT_VERSION = 0.7.6; ENABLE_STRICT_OBJC_MSGSEND = YES; diff --git a/XCODE.md b/XCODE.md index 794862f08..777340e27 100644 --- a/XCODE.md +++ b/XCODE.md @@ -8,12 +8,18 @@ Choose a folder for the future build, for example **/Users/user/TBuild** There y By git – in Terminal go to **/Users/user/TBuild** and run - git clone https://github.com/telegramdesktop/tdesktop.git + git clone https://github.com/telegramdesktop/tdesktop.git or download in ZIP and extract to **/Users/user/TBuild** rename **tdesktop-master** to **tdesktop** to have **/Users/user/TBuild/tdesktop/Telegram/Telegram.xcodeproj** project ###Prepare libraries +In your build Terminal run + + MACOSX_DEPLOYMENT_TARGET=10.7 + +to set minimal supported OS version to 10.7 for future console builds. + ####OpenSSL 1.0.1g Get sources from https://github.com/telegramdesktop/openssl-xcode, by git – in Terminal go to **/Users/user/TBuild/Libraries** and run @@ -77,7 +83,7 @@ to have **/Users/user/TBuild/Libraries/openal-soft/CMakeLists.txt** In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there run - cmake -D LIBTYPE:STRING=STATIC .. + cmake -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 .. make sudo make install