Skip to content

Commit 068a0f8

Browse files
Golbinex23rd
authored andcommitted
Add building instructions for Debian 13 and bump Java version
1 parent 961e6fa commit 068a0f8

3 files changed

Lines changed: 44 additions & 2 deletions

File tree

BUILDING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Building instructions for Debian 13
2+
3+
1. Install necessary software
4+
- `sudo apt install cmake golang gperf meson ninja-build sdkmanager wget yasm`
5+
- `sudo apt install google-android-platform-35-installer google-android-build-tools-35.0.0-installer google-android-ndk-r21e-installer google-android-ndk-r23c-installer openjdk-21-jdk-headless`
6+
7+
2. Don't forget to include the submodules when you clone:
8+
- `git clone --recursive https://github.com/forkgram/TelegramAndroid.git`
9+
10+
3. Build native FFmpeg and BoringSSL dependencies:
11+
- Go to the `TMessagesProj/jni` folder and execute the following (define the paths to your NDK and Ninja):
12+
13+
```
14+
export NDK=/usr/lib/android-sdk/ndk/21.4.7075529
15+
export NINJA_PATH=/usr/bin/ninja
16+
export ANDROID_SDK=/usr/lib/android-sdk
17+
export ANDROID_HOME=/usr/lib/android-sdk
18+
sudo sdkmanager "cmake;3.22.1" --sdk_root /usr/lib/android-sdk
19+
./build_libvpx_clang.sh
20+
./build_ffmpeg_clang.sh
21+
./patch_ffmpeg.sh
22+
./patch_boringssl.sh
23+
./build_boringssl.sh
24+
```
25+
26+
4. If you want to publish a modified version of Telegram:
27+
- You should get **your own API key** here: https://core.telegram.org/api/obtaining_api_id and edit a file called `gradle.properties` in the source root directory.
28+
The contents should look like this:
29+
```
30+
APP_ID = 12345
31+
APP_HASH = aaaaaaaabbbbbbccccccfffffff001122
32+
```
33+
- Do not use the name Telegram and the standard logo (white paper plane in a blue circle) for your app — or make sure your users understand that it is unofficial
34+
- Take good care of your users' data and privacy
35+
- **Please remember to publish your code too in order to comply with the licenses**
36+
37+
The project can be built with Android Studio or from the command line with gradle:
38+
39+
`./gradlew assembleAfatRelease`

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ Fork Client is a fork of the official Telegram for Android application.
5252

5353
## Downloads:
5454
You can download binaries from Releases or from my [Telegram channel Forkgram](https://t.me/forkgram).
55+
56+
## Building instructions for Debian 13:
57+
[BUILDING.md](BUILDING.md)

TMessagesProj/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ android {
9292
}
9393

9494
compileOptions {
95-
sourceCompatibility JavaVersion.VERSION_17
96-
targetCompatibility JavaVersion.VERSION_17
95+
sourceCompatibility JavaVersion.VERSION_21
96+
targetCompatibility JavaVersion.VERSION_21
9797

9898
coreLibraryDesugaringEnabled true
9999
}

0 commit comments

Comments
 (0)