tdesktop/docs/building-mac.md

32 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

## Build instructions for macOS
### Prepare folder
2017-10-13 21:23:19 +02:00
Choose a folder for the future build, for example **/Users/user/TBuild**. It will be named ***BuildPath*** in the rest of this document. All commands will be launched from Terminal.
### Obtain your API credentials
You will require **api_id** and **api_hash** to access the Telegram API servers. To learn how to obtain them [click here][api_credentials].
2017-10-13 21:23:19 +02:00
### Clone source code and prepare libraries
2017-10-13 21:23:19 +02:00
Go to ***BuildPath*** and run
2015-01-10 14:07:26 +01:00
2018-01-26 01:55:31 +01:00
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git automake cmake wget pkg-config gnu-tar ninja
2018-01-26 01:55:31 +01:00
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
2017-10-13 21:23:19 +02:00
git clone --recursive https://github.com/telegramdesktop/tdesktop.git
./tdesktop/Telegram/build/prepare/mac.sh
2020-08-11 12:26:48 +02:00
2017-10-13 21:23:19 +02:00
### Building the project
Go to ***BuildPath*/tdesktop/Telegram** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
2016-09-12 13:45:41 +02:00
./configure.sh -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
2016-09-12 13:45:41 +02:00
Then launch Xcode, open ***BuildPath*/tdesktop/out/Telegram.xcodeproj** and build for Debug / Release.
[api_credentials]: api_credentials.md