Files
AyuGramDesktop/docs/building-mac.md
T
2025-11-05 12:39:02 +03:00

36 lines
1.5 KiB
Markdown

## Build instructions for macOS
### Note
The build has only been tested with Xcode 26.1. Although it may work on lower Xcode versions, this is not guaranteed.
Xcode 26 has deprecated AGL, so you need to remove "AGL" from CMake options [here](https://github.com/desktop-app/cmake_helpers/blob/c7e0493dea2b870fb1b8e26604201fdb9e8c1ee5/options_mac.cmake#L64).
### Prepare folder
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.
**Note about disk space:** The full build process will require approximately **55 GB** of free space. This includes:
- **~35 GB** for libraries (when building for both x64 and arm64 architectures)
- **~20 GB** for the compiled Telegram app (in the `out` folder)
### Clone source code and prepare libraries
Go to ***BuildPath*** and run
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git automake cmake wget pkg-config gnu-tar ninja nasm meson
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
git clone --recursive https://github.com/AyuGram/AyuGramDesktop.git tdesktop
./tdesktop/Telegram/build/prepare/mac.sh
### Building the project
Go to ***BuildPath*/tdesktop/Telegram** and run
./configure.sh -D TDESKTOP_API_ID=2040 -D TDESKTOP_API_HASH=b18441a1ff607e10a989891a5462e627
Then launch Xcode, open ***BuildPath*/tdesktop/out/Telegram.xcodeproj** and build for Debug / Release.