From e5f480f707bc3caf33f1ad6aaa00db63b628fcc6 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 22 Nov 2024 22:17:41 +0100 Subject: [PATCH] Make adb dependency script Windows-specific This will allow adding similar scripts for other platforms. --- app/deps/{adb.sh => adb_windows.sh} | 9 ++++----- release/build_windows.sh | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) rename app/deps/{adb.sh => adb_windows.sh} (79%) diff --git a/app/deps/adb.sh b/app/deps/adb_windows.sh similarity index 79% rename from app/deps/adb.sh rename to app/deps/adb_windows.sh index 25727535..d36706b0 100755 --- a/app/deps/adb.sh +++ b/app/deps/adb_windows.sh @@ -3,11 +3,10 @@ set -ex DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) cd "$DEPS_DIR" . common -process_args "$@" VERSION=35.0.2 FILENAME=platform-tools_r$VERSION-win.zip -PROJECT_DIR=platform-tools-$VERSION +PROJECT_DIR=platform-tools-$VERSION-windows SHA256SUM=2975a3eac0b19182748d64195375ad056986561d994fffbdc64332a516300bb9 cd "$SOURCES_DIR" @@ -28,6 +27,6 @@ else rmdir "$ZIP_PREFIX" fi -mkdir -p "$INSTALL_DIR/$HOST/bin" -cd "$INSTALL_DIR/$HOST/bin" -cp -r "$SOURCES_DIR/$PROJECT_DIR"/. "$INSTALL_DIR/$HOST/bin/" +mkdir -p "$INSTALL_DIR/adb-windows" +cd "$INSTALL_DIR/adb-windows" +cp -r "$SOURCES_DIR/$PROJECT_DIR"/. "$INSTALL_DIR/adb-windows/" diff --git a/release/build_windows.sh b/release/build_windows.sh index 74bd32fc..6200c7be 100755 --- a/release/build_windows.sh +++ b/release/build_windows.sh @@ -20,12 +20,13 @@ cd .. # root project dir WINXX_BUILD_DIR="$WORK_DIR/build-$WINXX" -app/deps/adb.sh $WINXX +app/deps/adb_windows.sh app/deps/sdl.sh $WINXX app/deps/ffmpeg.sh $WINXX app/deps/libusb.sh $WINXX DEPS_INSTALL_DIR="$PWD/app/deps/work/install/$WINXX" +ADB_INSTALL_DIR="$PWD/app/deps/work/install/adb-windows" rm -rf "$WINXX_BUILD_DIR" meson setup "$WINXX_BUILD_DIR" \ @@ -47,5 +48,4 @@ cp app/data/scrcpy-console.bat "$WINXX_BUILD_DIR/dist/" cp app/data/scrcpy-noconsole.vbs "$WINXX_BUILD_DIR/dist/" cp app/data/icon.png "$WINXX_BUILD_DIR/dist/" cp app/data/open_a_terminal_here.bat "$WINXX_BUILD_DIR/dist/" -cp "$DEPS_INSTALL_DIR"/bin/*.dll "$WINXX_BUILD_DIR/dist/" -cp "$DEPS_INSTALL_DIR"/bin/adb.exe "$WINXX_BUILD_DIR/dist/" +cp -r "$ADB_INSTALL_DIR"/. "$WINXX_BUILD_DIR/dist/"