- Lab app: proxy panel, node editor, configuration and detail pages, responsive layout, and related tests - Add meshport-socks crate and sing-box bridge scripts/docs - Add singbox_flutter binding and meshport_client_core package - FFI, VPN helper (unified mac path), and Android/macOS runner updates - Docs for architecture, client runtime, UI design, and validation - UI design output artifacts under outputs/ui Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
32 lines
1.6 KiB
Bash
Executable File
32 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
cd "$(dirname "$0")/.."
|
|
sh scripts/prepare-lab-default.sh
|
|
mode="${1:---release}"
|
|
case "$mode" in --debug|--release) ;; *) printf '%s\n' 'usage: build-lab-android.sh [--debug|--release]' >&2; exit 2;; esac
|
|
sdk="${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}"
|
|
ndk="$sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin"
|
|
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="$ndk/aarch64-linux-android26-clang"
|
|
export CC_aarch64_linux_android="$CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER"
|
|
export AR_aarch64_linux_android="$ndk/llvm-ar"
|
|
export CARGO_TARGET_AARCH64_LINUX_ANDROID_RUSTFLAGS='-C link-arg=-Wl,-z,max-page-size=16384'
|
|
if [ "$mode" = --release ]; then
|
|
scripts/cargo-local.sh build -p meshport-ffi --target aarch64-linux-android --features system-vpn --release --locked
|
|
profile=release
|
|
else
|
|
scripts/cargo-local.sh build -p meshport-ffi --target aarch64-linux-android --features system-vpn --locked
|
|
profile=debug
|
|
fi
|
|
sh scripts/build-singbox-library.sh android
|
|
mkdir -p apps/meshport_lab/android/app/src/main/jniLibs/arm64-v8a
|
|
cp "target/aarch64-linux-android/$profile/libmeshport_ffi.so" apps/meshport_lab/android/app/src/main/jniLibs/arm64-v8a/
|
|
cp target/singbox/android-arm64/libmeshport_proxy.so apps/meshport_lab/android/app/src/main/jniLibs/arm64-v8a/
|
|
build_number=$(date +%s)
|
|
cd apps/meshport_lab
|
|
flutter build apk "$mode" --target-platform android-arm64 --build-number="$build_number"
|
|
cd ../..
|
|
mkdir -p outputs/android
|
|
output="$PWD/outputs/android/MeshPort-0.1.0-$build_number-$profile.apk"
|
|
cp "apps/meshport_lab/build/app/outputs/flutter-apk/app-$profile.apk" "$output"
|
|
printf '%s\n' "$output"
|