Display and control your Android device
Extract $BUILD_TOOLS_DIR
Romain Vimont4a5cdcd3908b
diff --git a/server/build_without_gradle.sh b/server/build_without_gradle.shindex 1444e72c..f4fcba10 100755--- a/server/build_without_gradle.sh+++ b/server/build_without_gradle.sh@@ -16,6 +16,7 @@ SCRCPY_VERSION_NAME=1.24PLATFORM=${ANDROID_PLATFORM:-33}BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-33.0.0}+BUILD_TOOLS_DIR="$ANDROID_HOME/build-tools/$BUILD_TOOLS"BUILD_DIR="$(realpath ${BUILD_DIR:-build_manual})"CLASSES_DIR="$BUILD_DIR/classes"@@ -41,9 +42,8 @@ EOFecho "Generating java from aidl..."cd "$SERVER_DIR/src/main/aidl"-"$ANDROID_HOME/build-tools/$BUILD_TOOLS/aidl" -o"$CLASSES_DIR" \- android/view/IRotationWatcher.aidl-"$ANDROID_HOME/build-tools/$BUILD_TOOLS/aidl" -o"$CLASSES_DIR" \+"$BUILD_TOOLS_DIR/aidl" -o"$CLASSES_DIR" android/view/IRotationWatcher.aidl+"$BUILD_TOOLS_DIR/aidl" -o"$CLASSES_DIR" \android/content/IOnPrimaryClipChangedListener.aidlecho "Compiling java sources..."@@ -59,8 +59,7 @@ cd "$CLASSES_DIR"if [[ $PLATFORM -lt 31 ]]then# use dx- "$ANDROID_HOME/build-tools/$BUILD_TOOLS/dx" --dex \- --output "$BUILD_DIR/classes.dex" \+ "$BUILD_TOOLS_DIR/dx" --dex --output "$BUILD_DIR/classes.dex" \android/view/*.class \android/content/*.class \com/genymobile/scrcpy/*.class \@@ -72,7 +71,7 @@ thenrm -rf classes.dex classeselse# use d8- "$ANDROID_HOME/build-tools/$BUILD_TOOLS/d8" --classpath "$ANDROID_JAR" \+ "$BUILD_TOOLS_DIR/d8" --classpath "$ANDROID_JAR" \--output "$BUILD_DIR/classes.zip" \android/view/*.class \android/content/*.class \