2021-07-20 02:41:11 +00:00
## Build instructions for macOS
2014-06-25 20:15:34 +00:00
2017-04-04 09:17:54 +00:00
### Prepare folder
2014-06-25 20:15:34 +00:00
2017-10-13 19:23:19 +00: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.
2016-02-08 12:32:17 +00:00
2018-11-04 10:29:30 +00:00
### 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 19:23:19 +00:00
### Clone source code and prepare libraries
2014-06-25 20:15:34 +00:00
2017-10-13 19:23:19 +00:00
Go to ** *BuildPath*** and run
2015-01-10 13:07:26 +00:00
2018-01-26 00:55:31 +00:00
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2023-06-19 02:04:34 +00:00
brew install git automake cmake wget pkg-config gnu-tar ninja
2018-01-26 00:55:31 +00:00
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
2017-10-13 19:23:19 +00:00
git clone --recursive https://github.com/telegramdesktop/tdesktop.git
2021-08-25 09:46:32 +00:00
./tdesktop/Telegram/build/prepare/mac.sh
2020-08-11 10:26:48 +00:00
2017-10-13 19:23:19 +00:00
### Building the project
2014-06-25 20:15:34 +00:00
2019-12-31 12:08:56 +00:00
Go to ** *BuildPath*/tdesktop/Telegram** and run (using [your **api_id** and **api_hash** ](#obtain-your-api-credentials ))
2016-09-12 11:45:41 +00:00
2022-08-10 23:30:32 +00:00
./configure.sh -D TDESKTOP_API_ID=YOUR_API_ID -D TDESKTOP_API_HASH=YOUR_API_HASH
2016-09-12 11:45:41 +00:00
2019-12-31 12:08:56 +00:00
Then launch Xcode, open ** *BuildPath*/tdesktop/out/Telegram.xcodeproj** and build for Debug / Release.
2018-11-04 10:29:30 +00:00
[api_credentials]: api_credentials.md