39 lines
899 B
Bash
39 lines
899 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "========================================="
|
|
echo " RFCP Desktop Build (Linux)"
|
|
echo "========================================="
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
# 1. Build frontend
|
|
echo "[1/4] Building frontend..."
|
|
cd frontend
|
|
npm ci
|
|
npm run build
|
|
cd ..
|
|
|
|
# 2. Build backend with PyInstaller
|
|
echo "[2/4] Building backend..."
|
|
cd backend
|
|
python3 -m pip install -r requirements.txt
|
|
python3 -m pip install pyinstaller
|
|
cd ../installer
|
|
python3 -m PyInstaller rfcp-server.spec --clean --noconfirm
|
|
mkdir -p ../desktop/backend-dist/linux
|
|
cp dist/rfcp-server ../desktop/backend-dist/linux/
|
|
cd ..
|
|
|
|
# 3. Build Electron app
|
|
echo "[3/4] Building Electron app..."
|
|
cd desktop
|
|
npm ci
|
|
npm run build:linux
|
|
cd ..
|
|
|
|
# 4. Done
|
|
echo "[4/4] Build complete!"
|
|
ls -la desktop/dist/*.AppImage 2>/dev/null || echo "AppImage in desktop/dist/"
|
|
ls -la desktop/dist/*.deb 2>/dev/null || echo "Deb in desktop/dist/"
|