Release binaries / Build macOS ARM64 (push) Has been cancelled
Release binaries / Build macOS x64 (push) Has been cancelled
Release binaries / Build Linux ARM64 (push) Has been cancelled
Release binaries / Build Linux musl ARM64 (push) Has been cancelled
Release binaries / Build Linux musl x64 (push) Has been cancelled
Release binaries / Build Linux x64 (push) Has been cancelled
Release binaries / Build Windows x64 (push) Has been cancelled
Release binaries / Attach binaries to GitHub Release (push) Has been cancelled
Standalone product rename across the whole repo (issue: project identity): - Binary/package/repo/skill/docs: agent-browser[-stealth] → chrome-use (single binary name `chrome-use`; old aliases agent-browser/abs dropped). - Version: 0.27.0-fork.51 → 1.0.0 (drop the upstream-fork counter). - Native-messaging host: com.agent_browser.connect → com.leeguoo.chrome_use (CLI + ab-connect extension in lockstep — this is a breaking handshake change, extension bumped 0.4.2 → 0.5.0, needs a Web Store republish). - Config dir: ~/.agent-browser → ~/.chrome-use. - README/zh: reframed from "stealth fork of agent-browser" to a standalone product with a small `originally based on vercel-labs/agent-browser` credit. - Kept AGENT_BROWSER_* env vars working (63 vars across the codebase; renaming them would break every existing script/skill for no user-facing gain). Build green, 802 unit tests pass, fmt + clippy clean. Upstream attribution to vercel-labs/agent-browser preserved.
75 lines
2.1 KiB
Bash
Executable File
75 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Build chrome-use for all platforms using Docker
|
|
# Usage: ./scripts/build-all-platforms.sh
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
OUTPUT_DIR="$PROJECT_ROOT/bin"
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${YELLOW}Building chrome-use for all platforms...${NC}"
|
|
echo ""
|
|
|
|
# Ensure output directory exists
|
|
mkdir -p "$OUTPUT_DIR"
|
|
|
|
# Build the Docker image if needed
|
|
echo -e "${YELLOW}Building Docker cross-compilation image...${NC}"
|
|
docker build -t chrome-use-builder -f "$PROJECT_ROOT/docker/Dockerfile.build" "$PROJECT_ROOT"
|
|
|
|
# Function to build for a target
|
|
build_target() {
|
|
local target=$1
|
|
local output_name=$2
|
|
|
|
echo -e "${YELLOW}Building for ${target}...${NC}"
|
|
|
|
docker run --rm \
|
|
-v "$PROJECT_ROOT/cli:/build" \
|
|
-v "$OUTPUT_DIR:/output" \
|
|
chrome-use-builder \
|
|
-c "cargo zigbuild --release --target ${target} && cp /build/target/${target}/release/chrome-use* /output/${output_name} && chmod +x /output/${output_name} 2>/dev/null || true"
|
|
|
|
if [ -f "$OUTPUT_DIR/$output_name" ]; then
|
|
echo -e "${GREEN}✓ Built ${output_name}${NC}"
|
|
else
|
|
echo -e "${RED}✗ Failed to build ${output_name}${NC}"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
# Build for each platform
|
|
# Linux x64
|
|
build_target "x86_64-unknown-linux-gnu" "chrome-use-linux-x64"
|
|
|
|
# Linux ARM64
|
|
build_target "aarch64-unknown-linux-gnu" "chrome-use-linux-arm64"
|
|
|
|
# Windows x64
|
|
build_target "x86_64-pc-windows-gnu" "chrome-use-win32-x64.exe"
|
|
|
|
# macOS x64 (via zig for cross-compilation)
|
|
build_target "x86_64-apple-darwin" "chrome-use-darwin-x64"
|
|
|
|
# macOS ARM64 (via zig for cross-compilation)
|
|
build_target "aarch64-apple-darwin" "chrome-use-darwin-arm64"
|
|
|
|
# Linux musl x64 (Alpine)
|
|
build_target "x86_64-unknown-linux-musl" "chrome-use-linux-musl-x64"
|
|
|
|
# Linux musl ARM64 (Alpine)
|
|
build_target "aarch64-unknown-linux-musl" "chrome-use-linux-musl-arm64"
|
|
|
|
echo ""
|
|
echo -e "${GREEN}Build complete!${NC}"
|
|
echo ""
|
|
echo "Binaries are in: $OUTPUT_DIR"
|
|
ls -la "$OUTPUT_DIR"/chrome-use-*
|