Refactor build script for custom ISO creation and update hardware configuration
- Replaced OS-specific build method with a custom ISO builder in the build-for-hardware.sh script. - Updated output file naming to reflect the correct Alpine version in the build process. - Adjusted build dates in hardware configuration files for HP ProDesk, merged, and Start9 Pure profiles to the latest timestamp.
This commit is contained in:
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# Build Archipelago backend for Alpine Linux (x86_64-musl)
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
echo "🦀 Building Archipelago Backend for Alpine Linux"
|
||||
echo ""
|
||||
|
||||
# Create build directory
|
||||
BUILD_DIR="$SCRIPT_DIR/build/backend"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
# Use Docker with Rust Alpine image to build
|
||||
echo "🐳 Building in Alpine Docker container..."
|
||||
|
||||
docker run --rm \
|
||||
-v "$PROJECT_ROOT:/workspace" \
|
||||
-v "$BUILD_DIR:/output" \
|
||||
-w /workspace/core \
|
||||
rust:alpine \
|
||||
sh -c '
|
||||
echo "📦 Installing build dependencies..."
|
||||
apk add --no-cache musl-dev openssl-dev openssl-libs-static pkgconfig gcc
|
||||
|
||||
echo "🔨 Building Archipelago backend (native Alpine build)..."
|
||||
cd archipelago && cargo build --release
|
||||
|
||||
echo "📋 Copying binary to output..."
|
||||
cp ../target/release/archipelago /output/
|
||||
|
||||
echo "✅ Build complete!"
|
||||
ls -lh /output/archipelago
|
||||
' || {
|
||||
echo "❌ Build failed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "✅ Backend built successfully!"
|
||||
echo " Binary: $BUILD_DIR/archipelago"
|
||||
echo " Size: $(du -h "$BUILD_DIR/archipelago" | cut -f1)"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user