forked from Genymobile/scrcpy
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace release.mk by release scripts
Since commit 2687d20, the Makefile named release.mk stopped handling dependencies between recipes, because they have to be executed separately (from different Github Actions jobs). There is no real benefit using a Makefile anymore. Replace them by several individual release scripts for simplicity and readability. Refs Genymobile#5306 <Genymobile#5306>
- Loading branch information
Showing
13 changed files
with
193 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/work | ||
/output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file must be sourced from the release scripts directory | ||
WORK_DIR="$PWD/work" | ||
OUTPUT_DIR="$PWD/output" | ||
|
||
VERSION="${VERSION:-$(git describe --tags --always)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
set -ex | ||
cd "$(dirname ${BASH_SOURCE[0]})" | ||
. build_common | ||
cd .. # root project dir | ||
|
||
GRADLE="${GRADLE:-./gradlew}" | ||
SERVER_BUILD_DIR="$WORK_DIR/build-server" | ||
|
||
rm -rf "$SERVER_BUILD_DIR" | ||
"$GRADLE" -p server assembleRelease | ||
mkdir -p "$SERVER_BUILD_DIR/server" | ||
cp server/build/outputs/apk/release/server-release-unsigned.apk \ | ||
"$SERVER_BUILD_DIR/server/scrcpy-server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
case "$1" in | ||
32) | ||
WINXX=win32 | ||
;; | ||
64) | ||
WINXX=win64 | ||
;; | ||
*) | ||
echo "ERROR: $0 must be called with one argument: 32 or 64" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
cd "$(dirname ${BASH_SOURCE[0]})" | ||
. build_common | ||
cd .. # root project dir | ||
|
||
WINXX_BUILD_DIR="$WORK_DIR/build-$WINXX" | ||
|
||
app/deps/adb.sh $WINXX | ||
app/deps/sdl.sh $WINXX | ||
app/deps/ffmpeg.sh $WINXX | ||
app/deps/libusb.sh $WINXX | ||
|
||
DEPS_INSTALL_DIR="$PWD/app/deps/work/install/$WINXX" | ||
|
||
rm -rf "$WINXX_BUILD_DIR" | ||
meson setup "$WINXX_BUILD_DIR" \ | ||
--pkg-config-path="$DEPS_INSTALL_DIR/lib/pkgconfig" \ | ||
-Dc_args="-I$DEPS_INSTALL_DIR/include" \ | ||
-Dc_link_args="-L$DEPS_INSTALL_DIR/lib" \ | ||
--cross-file=cross_$WINXX.txt \ | ||
--buildtype=release \ | ||
--strip \ | ||
-Db_lto=true \ | ||
-Dcompile_server=false \ | ||
-Dportable=true | ||
ninja -C "$WINXX_BUILD_DIR" | ||
|
||
# Group intermediate outputs into a 'dist' directory | ||
mkdir -p "$WINXX_BUILD_DIR/dist" | ||
cp "$WINXX_BUILD_DIR"/app/scrcpy.exe "$WINXX_BUILD_DIR/dist/" | ||
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/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -ex | ||
cd "$(dirname ${BASH_SOURCE[0]})" | ||
. build_common | ||
|
||
cd "$OUTPUT_DIR" | ||
sha256sum "scrcpy-server-$VERSION" \ | ||
"scrcpy-win32-$VERSION.zip" \ | ||
"scrcpy-win64-$VERSION.zip" | tee SHA256SUMS.txt | ||
echo "Release checksums generated in $PWD/SHA256SUMS.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
set -ex | ||
cd "$(dirname ${BASH_SOURCE[0]})" | ||
. build_common | ||
cd .. # root project dir | ||
|
||
if [[ $# != 1 ]] | ||
then | ||
# <target_name>: for example win64 | ||
echo "Syntax: $0 <target>" >&2 | ||
exit 1 | ||
|
||
fi | ||
|
||
BUILD_DIR="$WORK_DIR/build-$1" | ||
ZIP_DIR="$BUILD_DIR/zip" | ||
TARGET="scrcpy-$1-$VERSION" | ||
|
||
rm -rf "$ZIP_DIR/$TARGET" | ||
mkdir -p "$ZIP_DIR/$TARGET" | ||
|
||
cp -r "$BUILD_DIR/dist/." "$ZIP_DIR/$TARGET/" | ||
cp "$WORK_DIR/build-server/server/scrcpy-server" "$ZIP_DIR/$TARGET/" | ||
|
||
mkdir -p "$OUTPUT_DIR" | ||
rm -f "$OUTPUT_DIR/$TARGET.zip" | ||
|
||
cd "$ZIP_DIR" | ||
rm -f "$OUTPUT_DIR/$TARGET.zip" | ||
zip -r "$OUTPUT_DIR/$TARGET.zip" "$TARGET" | ||
rm -rf "$TARGET" | ||
cd - | ||
echo "Generated '$OUTPUT_DIR/$TARGET.zip'" |
Oops, something went wrong.