2021-07-20 02:41:11 +00:00
|
|
|
## Build instructions for Linux using Docker
|
2016-09-12 11:45:41 +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].
|
|
|
|
|
2020-12-13 06:16:37 +00:00
|
|
|
### Clone source code
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2017-09-28 09:40:26 +00:00
|
|
|
git clone --recursive https://github.com/telegramdesktop/tdesktop.git
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2020-12-13 06:16:37 +00:00
|
|
|
### Prepare libraries
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2022-06-28 11:32:29 +00:00
|
|
|
Install [poetry](https://python-poetry.org), go to the `tdesktop/Telegram/build/docker/centos_env` directory and run
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2022-06-28 11:32:29 +00:00
|
|
|
poetry install
|
2022-08-12 16:46:59 +00:00
|
|
|
poetry run gen_dockerfile | docker buildx build -t tdesktop:centos_env -
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2017-09-28 09:40:26 +00:00
|
|
|
### Building the project
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2022-06-28 11:32:29 +00:00
|
|
|
Go up to the `tdesktop` directory and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
2020-12-13 06:16:37 +00:00
|
|
|
|
2021-02-22 22:23:29 +00:00
|
|
|
docker run --rm -it \
|
2020-12-13 06:16:37 +00:00
|
|
|
-v $PWD:/usr/src/tdesktop \
|
|
|
|
tdesktop:centos_env \
|
|
|
|
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
|
|
|
-D TDESKTOP_API_ID=YOUR_API_ID \
|
2022-08-10 23:30:32 +00:00
|
|
|
-D TDESKTOP_API_HASH=YOUR_API_HASH
|
2020-12-13 06:16:37 +00:00
|
|
|
|
|
|
|
Or, to create a debug build, run (also using [your **api_id** and **api_hash**](#obtain-your-api-credentials))
|
|
|
|
|
2021-02-22 22:23:29 +00:00
|
|
|
docker run --rm -it \
|
2020-12-13 06:16:37 +00:00
|
|
|
-v $PWD:/usr/src/tdesktop \
|
|
|
|
-e DEBUG=1 \
|
|
|
|
tdesktop:centos_env \
|
|
|
|
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
|
|
|
|
-D TDESKTOP_API_ID=YOUR_API_ID \
|
2022-08-10 23:30:32 +00:00
|
|
|
-D TDESKTOP_API_HASH=YOUR_API_HASH
|
2020-12-13 06:16:37 +00:00
|
|
|
|
|
|
|
The built files will be in the `out` directory.
|
2016-09-12 11:45:41 +00:00
|
|
|
|
2018-11-04 10:29:30 +00:00
|
|
|
[api_credentials]: api_credentials.md
|