mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
feat: update server source code
This commit is contained in:
parent
7b653d732a
commit
0d19d7b2f3
1 changed files with 29 additions and 0 deletions
29
server/scripts/build-wrapper.sh
Normal file
29
server/scripts/build-wrapper.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
# Wrapper script to invoke gradle from meson
|
||||
set -e
|
||||
|
||||
# Do not execute gradle when ninja is called as root (it would download the
|
||||
# whole gradle world in /root/.gradle).
|
||||
# This is typically useful for calling "sudo ninja install" after a "ninja
|
||||
# install"
|
||||
if [[ "$EUID" == 0 ]]
|
||||
then
|
||||
echo "(not invoking gradle, since we are root)" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PROJECT_ROOT="$1"
|
||||
OUTPUT="$2"
|
||||
BUILDTYPE="$3"
|
||||
|
||||
# gradlew is in the parent of the server directory
|
||||
GRADLE=${GRADLE:-$PROJECT_ROOT/../gradlew}
|
||||
|
||||
if [[ "$BUILDTYPE" == debug ]]
|
||||
then
|
||||
"$GRADLE" -p "$PROJECT_ROOT" assembleDebug
|
||||
cp "$PROJECT_ROOT/build/outputs/apk/debug/server-debug.apk" "$OUTPUT"
|
||||
else
|
||||
"$GRADLE" -p "$PROJECT_ROOT" assembleRelease
|
||||
cp "$PROJECT_ROOT/build/outputs/apk/release/server-release-unsigned.apk" "$OUTPUT"
|
||||
fi
|
Loading…
Add table
Reference in a new issue