From db4f66cae72963c1da227b9b40b81b66ad821ecd Mon Sep 17 00:00:00 2001 From: fabriceedon Date: Sat, 5 Dec 2015 14:07:40 -0500 Subject: [PATCH] Fix some format, add warning on file hierarchy, fix typo and create list for readability.Signed-off-by: Fabrice Edon (github: Bl4ck4t) --- XCODE.md | 105 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 75 insertions(+), 30 deletions(-) diff --git a/XCODE.md b/XCODE.md index 9c78f70fd..a9121f3ba 100644 --- a/XCODE.md +++ b/XCODE.md @@ -2,35 +2,59 @@ ###Prepare folder -Choose a folder for the future build, for example **/Users/user/TBuild** There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app. +Choose a folder for the future build, for example **/Users/user/TBuild** + +There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app. + +**You will need this hierarchy to be able to follow this README !** ###Clone source code -By git – in Terminal go to **/Users/user/TBuild** and run +By git – in Terminal go to **/Users/user/TBuild** and run: 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 +or: +* download in ZIP and extract to **/Users/user/TBuild** +* rename **tdesktop-master** to **tdesktop**. + +The path to Telegram.xcodeproj should now be: **/Users/user/TBuild/tdesktop/Telegram/Telegram.xcodeproj** ###Prepare libraries -In your build Terminal run +In your build Terminal run: - MACOSX_DEPLOYMENT_TARGET=10.8 + MACOSX_DEPLOYMENT_TARGET=10.8 to set minimal supported OS version to 10.8 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 +#####Get openssl-xcode project file - git clone https://github.com/telegramdesktop/openssl-xcode.git +From https://github.com/telegramdesktop/openssl-xcode with git in Terminal: -or download in ZIP and extract to **/Users/user/TBuild/Libraries**, rename **openssl-xcode-master** to **openssl-xcode** to have **/Users/user/TBuild/Libraries/openssl-xcode/openssl.xcodeproj** project +* go to **/Users/user/TBuild/Libraries +* run: + + git clone https://github.com/telegramdesktop/openssl-xcode.git -http://www.openssl.org/source/ > Download [**openssl-1.0.1h.tar.gz**](http://www.openssl.org/source/openssl-1.0.1h.tar.gz) (4.3 Mb) +or: -Extract openssl-1.0.1h.tar.gz and copy everything from **openssl-1.0.1h** to **/Users/user/TBuild/Libraries/openssl-xcode** to have **/Users/user/TBuild/Libraries/openssl-xcode/include** +* download in ZIP and extract to **/Users/user/TBuild/Libraries**, +* rename **openssl-xcode-master** to **openssl-xcode** + +The path to openssl.xcodeproj should now be: **/Users/user/TBuild/Libraries/openssl-xcode/openssl.xcodeproj** + +#####Get the source code: + +Download [**openssl-1.0.1h.tar.gz**](http://www.openssl.org/source/openssl-1.0.1h.tar.gz) (4.3 Mb) + +* Extract openssl-1.0.1h.tar.gz +* Copy everything from **openssl-1.0.1h** to **/Users/user/TBuild/Libraries/openssl-xcode** + +The folder include of openssl should be: +**/Users/user/TBuild/Libraries/openssl-xcode/include** #####Building library @@ -38,14 +62,15 @@ Extract openssl-1.0.1h.tar.gz and copy everything from **openssl-1.0.1h** to **/ * Product > Build ####liblzma +#####Get the source code -http://tukaani.org/xz/ > Download [**xz-5.0.5.tar.gz**](http://tukaani.org/xz/xz-5.0.5.tar.gz) +Download [**xz-5.0.5.tar.gz**](http://tukaani.org/xz/xz-5.0.5.tar.gz) Extract to **/Users/user/TBuild/Libraries** #####Building library -In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run +In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run: ./configure make @@ -56,12 +81,23 @@ In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run Using se system lib ####libexif 0.6.20 +#####Get the source code -Get sources from https://github.com/telegramdesktop/libexif-0.6.20, by git – in Terminal go to **/Users/user/TBuild/Libraries** and run +From https://github.com/telegramdesktop/libexif-0.6.20 with git in Terminal: - git clone https://github.com/telegramdesktop/libexif-0.6.20.git +* go to **/Users/user/TBuild/Libraries** +* run: -or download in ZIP and extract to **/Users/user/TBuild/Libraries**, rename **libexif-0.6.20-master** to **libexif-0.6.20** to have **/Users/user/TBuild/Libraries/libexif-0.6.20/configure** script + git clone https://github.com/telegramdesktop/libexif-0.6.20.git + +or: + +* download in ZIP +* extract to **/Users/user/TBuild/Libraries** +* rename **libexif-0.6.20-master** to **libexif-0.6.20** + +The folder configure should have this path: +**/Users/user/TBuild/Libraries/libexif-0.6.20/configure** #####Building library @@ -88,40 +124,46 @@ In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there r sudo make install ####Opus codec +#####Get the source code -Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/, extract to **/Users/user/TBuild/Libraries** and rename to have **/Users/user/TBuild/Libraries/opus/configure** +* Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/ +* Extract them to **/Users/user/TBuild/Libraries** +* Rename opus-1.1 to opus to have **/Users/user/TBuild/Libraries/opus/configure** -#####Building libraries +#####Building library -Download [pkg-config 0.28](http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz) from http://pkg-config.freedesktop.org, extract it to **/Users/user/TBuild/Libraries** +* Download [pkg-config 0.28](http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz) from http://pkg-config.freedesktop.org +* Extract it to **/Users/user/TBuild/Libraries** -In Terminal go to **/Users/user/TBuild/Libraries/pkg-config-0.28** and run +In Terminal go to **/Users/user/TBuild/Libraries/pkg-config-0.28** and run: ./configure --with-internal-glib make sudo make install -then go to **/Users/user/TBuild/Libraries/opus** and there run +then go to **/Users/user/TBuild/Libraries/opus** and run: ./configure make sudo make install -####FFmpeg +####FFmpeg and Libiconv +#####Get the source code -Download sources [ffmpeg-2.6.3.tar.bz2](http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2) from https://www.ffmpeg.org/download.html, extract to **/Users/user/TBuild/Libraries** to have **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** +* Download sources [ffmpeg-2.6.3.tar.bz2](http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2) from https://www.ffmpeg.org/download.html +* Extract to **/Users/user/TBuild/Libraries** to have **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** -#####Building libraries +* Download [libiconv-1.14](http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz) from http://www.gnu.org/software/libiconv/#downloading +* Extract to **/Users/user/TBuild/Libraries** to have **/Users/user/TBuild/Libraries/ibiconv-1.14 ** -Download [libiconv-1.14](http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz) from http://www.gnu.org/software/libiconv/#downloading, extract it to **/Users/user/TBuild/Libraries** - -In Termianl go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run +#####Building library +In Terminal go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run: ./configure --enable-static make sudo make install -Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** and run +Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** and run: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" @@ -137,8 +179,9 @@ Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** and run sudo make install ####Qt 5.5.1, slightly patched +#####Get the source code -In Terminal go to **/Users/user/TBuild/Libraries** and run +In Terminal go to **/Users/user/TBuild/Libraries** and run: git clone git://code.qt.io/qt/qt5.git QtStatic cd QtStatic @@ -149,16 +192,18 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run cd qtbase && git checkout v5.5.1 && cd .. #####Apply the patch +From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run: - cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd .. + git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff #####Building library +Go to **/Users/user/TBuild/Libraries/QtStatic** and run: ./configure -debug-and-release -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-clang make -j4 sudo make -j4 install -building (**make** command) will take really long time. +Building (**make** command) will take a really long time. ###Building Telegram Desktop