Skip to content

Commit

Permalink
termux-app: Setup the TERMUX_VERSION env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Jun 15, 2024
1 parent 6cc112f commit 835f45a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion termux-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ android {
}
}

buildFeatures {
buildConfig = true
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -161,7 +165,7 @@ task("downloadPrebuilt") {
downloadFile("src/main/cpp/bootstrap-aarch64.zip", "https://bootstrap.termux.net/bootstrap-aarch64-v$bootstrapVersion.zip", "1829d0a082aaadddd6bb67be56b07a71a3414928982abf0f32898e18323700a7")
downloadFile("src/main/cpp/bootstrap-x86_64.zip", "https://bootstrap.termux.net/bootstrap-x86_64-v$bootstrapVersion.zip", "fd899704f6b8351fefd477d89f8c6ef3163ef2572d7cfdf29b85fb3f0e497fa5")

val prootVersion = "5.1.107-65";
val prootVersion = "5.1.107-65"
downloadFile("src/main/jniLibs/arm64-v8a/libproot-loader.so", "https://bootstrap.termux.net/libproot-loader-aarch64-$prootVersion.so", "23cbee2320ed6f55ec4c47d50573a3ee59163f84c6e1bfaf7fb67049f71a2b59")
downloadFile("src/main/jniLibs/x86_64/libproot-loader.so", "https://bootstrap.termux.net/libproot-loader-x86_64-$prootVersion.so", "bf69995d5c9d35591197ce61f6046e80116858334109bf9b6ea9d787ca2fe256")
downloadFile("src/main/jniLibs/arm64-v8a/libproot-loader32.so", "https://bootstrap.termux.net/libproot-loader32-aarch64-$prootVersion.so", "8e0d7fbdc5937886c272a3ef7c2c1d1b62ab51dcfc542b938675bf05baf4a83a")
Expand Down
2 changes: 2 additions & 0 deletions termux-app/src/main/java/com/termux/app/TermuxShellUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.termux.BuildConfig;
import com.termux.terminal.TerminalSession;
import com.termux.terminal.TerminalSessionClient;

Expand Down Expand Up @@ -106,6 +107,7 @@ public static String[] setupEnvironment(boolean failsafe) {
environment.put("COLORTERM", "truecolor");
environment.put("PREFIX", TermuxConstants.PREFIX_PATH);
environment.put("TERM", "xterm-256color");
environment.put("TERMUX_VERSION", BuildConfig.VERSION_NAME);
putToEnvIfInSystemEnv(environment, "ANDROID_ART_ROOT");
putToEnvIfInSystemEnv(environment, "ANDROID_ASSETS");
putToEnvIfInSystemEnv(environment, "ANDROID_DATA");
Expand Down

0 comments on commit 835f45a

Please sign in to comment.