diff --git a/README.md b/README.md index 1cbd51f..857e49c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ The full step-by-step (Russian) covers each platform in detail: see [docs/SETUP. ./copy-hooks.sh # Copy JS hooks to android assets ./build-app.sh # Android APK ./build-headless.sh # Headless binaries only (current platform) -./build-cli.sh # Per-arch zips of headless creators + joiners + vk-bot (linux x64/ia32/arm64) +./build-cli.sh # Per-arch zips of headless creators + joiners + vk-bot ./build-creator.sh # Creator Electron app (all platforms) ./build-ios.sh # Go .xcframework for iOS ``` diff --git a/build-cli.sh b/build-cli.sh index 9017c7b..06eed13 100755 --- a/build-cli.sh +++ b/build-cli.sh @@ -36,7 +36,7 @@ build_target() { dir=${entry%%:*} bin=${entry##*:} echo " $bin" - GOOS="$goos" GOARCH="$goarch" go -C "$HEADLESS/$dir" build -trimpath -ldflags="-s -w" -o "$stage/$bin" . + env GOOS="$goos" GOARCH="$goarch" go -C "$HEADLESS/$dir" build -trimpath -ldflags="-s -w" -o "$stage/$bin" . done ( cd "$stage" && zip -q -j "$zip_path" ./* ) @@ -44,9 +44,36 @@ build_target() { echo " -> $(basename "$zip_path")" } +build_bundle() { + family="$1" + shift + stage="$PREBUILTS/stage-linux-$family" + zip_path="$PREBUILTS/whitelist-bypass-cli-linux-$family.zip" + rm -rf "$stage" "$zip_path" + + for variant in "$@"; do + goarch=${variant%%:*} + float_env=${variant#*:} + archdir="$stage/$goarch" + mkdir -p "$archdir" + echo "=== linux/$goarch ===" + for entry in $COMPONENTS; do + dir=${entry%%:*} + bin=${entry##*:} + echo " $goarch/$bin" + env GOOS=linux GOARCH="$goarch" $float_env go -C "$HEADLESS/$dir" build -trimpath -ldflags="-s -w" -o "$archdir/$bin" . + done + done + + ( cd "$stage" && zip -q -r "$zip_path" . ) + rm -rf "$stage" + echo " -> $(basename "$zip_path")" +} + build_target linux x64 amd64 build_target linux ia32 386 -build_target linux arm64 arm64 +build_bundle arm arm64: arm:GOARM=5 +build_bundle mips mips:GOMIPS=softfloat mipsle:GOMIPS=softfloat mips64:GOMIPS64=softfloat mips64le:GOMIPS64=softfloat build_target freebsd x64 amd64 build_target freebsd arm64 arm64