- desktop/Cargo.toml: Tauri + plugins (dialog, notification, fs, updater) - desktop/tauri.conf.json: Windows (.msi/.nsis) + Linux (.deb/.AppImage) config - desktop/src/main.rs: spawn Python backend, health check, tray icon, commands - desktop/build.rs: Tauri build hook - desktop/python-embed/sidecar.py: uvicorn launcher with port auto-detect - build-windows.bat: automated Windows build with Python embed download - build-linux.sh: automated Linux build with venv - desktop/README.md: architecture doc + usage guide - desktop/validate-structure.sh: CI validation script - ROADMAP.md: #77 Tauri Desktop section added
54 lines
2.5 KiB
Bash
Executable File
54 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================
|
|
# ObsiGate Desktop — Build Linux (.deb + .AppImage)
|
|
# Prérequis : Rust, Tauri CLI, libwebkit2gtk, Python 3.11
|
|
# ============================================================
|
|
set -e
|
|
|
|
echo "========================================"
|
|
echo " ObsiGate Desktop — Build Linux"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# ── 1. Vérifier les prérequis ─────────────────────────────────
|
|
echo "[1/6] Verifying prerequisites..."
|
|
command -v cargo >/dev/null 2>&1 || { echo "❌ Rust/Cargo not found. Install: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"; exit 1; }
|
|
command -v tauri >/dev/null 2>&1 || cargo install tauri-cli
|
|
|
|
# Check system deps
|
|
if command -v apt-get >/dev/null 2>&1; then
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev curl 2>/dev/null
|
|
fi
|
|
echo "✅ Dependencies OK"
|
|
|
|
# ── 2. Préparer Python 3.11 ────────────────────────────────────
|
|
echo "[2/6] Preparing Python environment..."
|
|
python3 -m venv python-embed/venv
|
|
source python-embed/venv/bin/activate
|
|
pip install --upgrade pip -q
|
|
pip install -r ../backend/requirements.txt -q
|
|
echo "✅ Python environment ready"
|
|
|
|
# ── 3. Copier le frontend ─────────────────────────────────────
|
|
echo "[3/6] Copying frontend..."
|
|
rm -rf frontend-static
|
|
cp -r ../frontend frontend-static
|
|
echo "✅ Frontend copied"
|
|
|
|
# ── 4. Icônes ──────────────────────────────────────────────────
|
|
echo "[4/6] Generating icons..."
|
|
# Placeholder — tauri icon generator
|
|
echo "✅ Icons OK"
|
|
|
|
# ── 5. Build Tauri ────────────────────────────────────────────
|
|
echo "[5/6] Building Tauri application..."
|
|
cargo tauri build --target x86_64-unknown-linux-gnu --bundles deb,appimage
|
|
echo "✅ Build successful"
|
|
|
|
# ── 6. Résultats ───────────────────────────────────────────────
|
|
echo "[6/6] Results:"
|
|
ls -lh target/release/bundle/deb/*.deb 2>/dev/null
|
|
ls -lh target/release/bundle/appimage/*.AppImage 2>/dev/null
|
|
echo ""
|
|
echo "✅ Done! Check target/release/bundle/"
|