+ cross-compile build

This commit is contained in:
Pari Malam
2026-06-16 20:25:19 +08:00
parent 5bc4394cf0
commit a5e70bae91
2 changed files with 40 additions and 2 deletions
+5 -1
View File
@@ -1,4 +1,8 @@
/target
__pycache__/
.vscode
venv/
venv/
wvenv/
dist/
firmware/
device/
+35 -1
View File
@@ -1 +1,35 @@
cargo clean && cargo build --release
#!/usr/bin/env bash
set -euo pipefail
echo "Building unixtract (Linux + Windows)..."
# Clean first
cargo clean
# Build Linux
cargo build --target x86_64-unknown-linux-gnu --release
# Build Windows (GNU)
cargo build --target x86_64-pc-windows-gnu --release
# Prepare dist folder
mkdir -p dist
echo "Collecting binaries..."
# Linux binary
LINUX_BIN="target/x86_64-unknown-linux-gnu/release/unixtract"
if [ -f "$LINUX_BIN" ]; then
cp "$LINUX_BIN" "dist/unixtract-linux"
fi
# Windows binary
WINDOWS_BIN="target/x86_64-pc-windows-gnu/release/unixtract.exe"
if [ -f "$WINDOWS_BIN" ]; then
cp "$WINDOWS_BIN" "dist/unixtract-windows.exe"
fi
echo "Cleaning target directory..."
rm -rf target
echo "Done. Binaries are in ./dist"