🍎 Add macOS packaging + cross-platform build system
🔄 Unified build pipeline for Linux/macOS from Linux hosts
This commit is contained in:
parent
f402ff04ab
commit
0c43dc5a76
6 changed files with 951 additions and 18 deletions
47
build.sh
Executable file
47
build.sh
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/zsh
|
||||
set -e # Exit on any error
|
||||
|
||||
log() {
|
||||
echo "🔨 $1"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo "❌ $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Build Relay component
|
||||
log "Building Relay..."
|
||||
(cd ../Relay && ./build.sh) || error "Relay build failed"
|
||||
|
||||
# Setup extras directory
|
||||
log "Setting up extras directory..."
|
||||
mkdir -p extras/linux extras/macos
|
||||
cp ../Relay/dist/relay-x86_64-unknown-linux-gnu ./extras/linux/relay || error "Failed to copy Linux relay"
|
||||
cp ../Relay/dist/relay-x86_64-apple-darwin ./extras/macos/relay || error "Failed to copy macOS relay"
|
||||
|
||||
# Clean previous builds
|
||||
log "Cleaning previous builds..."
|
||||
rm -rf dist
|
||||
|
||||
# Build Linux version
|
||||
log "Building Linux version..."
|
||||
bun run build:linux || error "Linux build failed"
|
||||
npm install || error "npm install failed"
|
||||
|
||||
# Build macOS version using Docker
|
||||
log "Building macOS version..."
|
||||
docker run --rm -it \
|
||||
-v "${PWD}:/project" \
|
||||
-v "${HOME}/.ssh:/root/.ssh" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
electronuserland/builder \
|
||||
/bin/bash -c "npm install && npm run build:mac" || error "macOS build failed"
|
||||
|
||||
# Output paths
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
log "Build complete! 🎉"
|
||||
echo "📦 Build artifacts:"
|
||||
echo "🐧 Linux AppImage: ./dist/Eve-${VERSION}.AppImage"
|
||||
echo "🐧 Linux Flatpak: ./dist/Eve-${VERSION}.flatpak"
|
||||
echo "🍎 macOS ZIP: ./dist/Eve-${VERSION}-mac.zip"
|
Loading…
Add table
Add a link
Reference in a new issue