mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-09-20 00:08:34 +00:00
Add script to release Linux static binary
Provide a prebuilt binary for Linux. Fixes #5327 <https://github.com/Genymobile/scrcpy/issues/5327> PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
This commit is contained in:
parent
93da693e8c
commit
cb19686d79
8 changed files with 162 additions and 1 deletions
35
release/build_linux.sh
Executable file
35
release/build_linux.sh
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
cd "$(dirname ${BASH_SOURCE[0]})"
|
||||
. build_common
|
||||
cd .. # root project dir
|
||||
|
||||
LINUX_BUILD_DIR="$WORK_DIR/build-linux"
|
||||
|
||||
app/deps/adb_linux.sh
|
||||
app/deps/sdl.sh linux native static
|
||||
app/deps/ffmpeg.sh linux native static
|
||||
app/deps/libusb.sh linux native static
|
||||
|
||||
DEPS_INSTALL_DIR="$PWD/app/deps/work/install/linux-native-static"
|
||||
ADB_INSTALL_DIR="$PWD/app/deps/work/install/adb-linux"
|
||||
|
||||
rm -rf "$LINUX_BUILD_DIR"
|
||||
meson setup "$LINUX_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" \
|
||||
--buildtype=release \
|
||||
--strip \
|
||||
-Db_lto=true \
|
||||
-Dcompile_server=false \
|
||||
-Dportable=true \
|
||||
-Dstatic=true
|
||||
ninja -C "$LINUX_BUILD_DIR"
|
||||
|
||||
# Group intermediate outputs into a 'dist' directory
|
||||
mkdir -p "$LINUX_BUILD_DIR/dist"
|
||||
cp "$LINUX_BUILD_DIR"/app/scrcpy "$LINUX_BUILD_DIR/dist/scrcpy_bin"
|
||||
cp app/data/icon.png "$LINUX_BUILD_DIR/dist/"
|
||||
cp app/data/scrcpy_static_wrapper.sh "$LINUX_BUILD_DIR/dist/scrcpy"
|
||||
cp -r "$ADB_INSTALL_DIR"/. "$LINUX_BUILD_DIR/dist/"
|
|
@ -5,6 +5,7 @@ cd "$(dirname ${BASH_SOURCE[0]})"
|
|||
|
||||
cd "$OUTPUT_DIR"
|
||||
sha256sum "scrcpy-server-$VERSION" \
|
||||
"scrcpy-linux-$VERSION.tar.gz" \
|
||||
"scrcpy-win32-$VERSION.zip" \
|
||||
"scrcpy-win64-$VERSION.zip" \
|
||||
| tee SHA256SUMS.txt
|
||||
|
|
|
@ -12,10 +12,12 @@ rm -rf output
|
|||
./build_server.sh
|
||||
./build_windows.sh 32
|
||||
./build_windows.sh 64
|
||||
./build_linux.sh
|
||||
|
||||
./package_server.sh
|
||||
./package_client.sh win32 zip
|
||||
./package_client.sh win64 zip
|
||||
./package_client.sh linux tar.gz
|
||||
|
||||
./generate_checksums.sh
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue