Fix crash in theme IV opening.
[tdesktop.git] / docs / building-linux.md
blobe8a0b050b87b11220f36c40bc0aa7bfe9c014cc9
1 ## Build instructions for Linux using Docker
3 ### Prepare folder
5 Choose a folder for the future build, for example **/home/user/TBuild**. It will be named ***BuildPath*** in the rest of this document. All commands will be launched from Terminal.
7 ### Obtain your API credentials
9 You will require **api_id** and **api_hash** to access the Telegram API servers. To learn how to obtain them [click here][api_credentials].
11 ### Clone source code and prepare libraries
13 Install [poetry](https://python-poetry.org), go to ***BuildPath*** and run
15     git clone --recursive https://github.com/telegramdesktop/tdesktop.git
16     ./tdesktop/Telegram/build/prepare/linux.sh
18 ### Building the project
20 Go to ***BuildPath*/tdesktop** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
22     docker run --rm -it \
23         -v "$PWD:/usr/src/tdesktop" \
24         tdesktop:centos_env \
25         /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
26         -D TDESKTOP_API_ID=YOUR_API_ID \
27         -D TDESKTOP_API_HASH=YOUR_API_HASH
29 Or, to create a debug build, run (also using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
31     docker run --rm -it \
32         -v "$PWD:/usr/src/tdesktop" \
33         -e CONFIG=Debug \
34         tdesktop:centos_env \
35         /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
36         -D TDESKTOP_API_ID=YOUR_API_ID \
37         -D TDESKTOP_API_HASH=YOUR_API_HASH
39 The built files will be in the `out` directory.
41 [api_credentials]: api_credentials.md