a89c7894cf
Backend: - FastAPI avec PostgreSQL et Redis - Authentification JWT complète - API REST pour musique, playlists, recherche - Streaming audio via yt-dlp - SQLAlchemy 2.0 async Frontend: - Flutter avec thème néon cyberpunk - State management Riverpod - Layout adaptatif desktop/mobile - Lecteur audio avec mini-player Infrastructure: - Docker Compose (PostgreSQL + Redis) - Scripts d'installation automatisés - Scripts de build pour exécutables Fichiers ajoutés: - BUILD_CLIENT_*.bat/sh: Scripts de compilation - BUILD_CLIENT_README.md: Documentation compilation - CHECK_FLUTTER.sh: Vérificateur d'environnement - requirements.txt mis à jour pour Python 3.13 - Modèles SQLAlchemy corrigés (metadata -> extra_metadata) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
96 lines
2.3 KiB
Bash
96 lines
2.3 KiB
Bash
#!/bin/bash
|
|
# ============================================================================
|
|
# Spotify Le 2 - Build Linux Client
|
|
# ============================================================================
|
|
# This script compiles the Flutter app into a Linux executable
|
|
#
|
|
# Prerequisites:
|
|
# 1. Flutter SDK installed
|
|
# 2. clang, cmake, ninja-build, gtk3-devel
|
|
# ============================================================================
|
|
|
|
echo "========================================"
|
|
echo " SPOTIFY LE 2 - BUILD LINUX CLIENT"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# Check if Flutter is installed
|
|
if ! command -v flutter &> /dev/null; then
|
|
echo "[ERROR] Flutter is not installed!"
|
|
echo "Please install Flutter from: https://docs.flutter.dev/get-started/install/linux"
|
|
exit 1
|
|
fi
|
|
|
|
echo "[1/6] Checking Flutter installation..."
|
|
flutter --version
|
|
if [ $? -ne 0 ]; then
|
|
echo "[ERROR] Flutter check failed!"
|
|
exit 1
|
|
fi
|
|
echo "[OK] Flutter is ready!"
|
|
echo ""
|
|
|
|
echo "[2/6] Checking Flutter doctor..."
|
|
flutter doctor -v
|
|
echo ""
|
|
|
|
echo "[3/6] Navigate to frontend directory..."
|
|
cd frontend || exit 1
|
|
echo ""
|
|
|
|
echo "[4/6] Installing dependencies..."
|
|
flutter pub get
|
|
if [ $? -ne 0 ]; then
|
|
echo "[ERROR] Failed to install dependencies!"
|
|
exit 1
|
|
fi
|
|
echo "[OK] Dependencies installed!"
|
|
echo ""
|
|
|
|
echo "[5/6] Building Linux executable..."
|
|
echo "This may take several minutes..."
|
|
flutter build linux --release
|
|
if [ $? -ne 0 ]; then
|
|
echo "[ERROR] Build failed!"
|
|
exit 1
|
|
fi
|
|
echo ""
|
|
|
|
echo "[6/6] Creating distribution package..."
|
|
BUILD_DIR="build/linux/x64/release/bundle"
|
|
DIST_DIR="dist/linux"
|
|
VERSION="0.1.0"
|
|
|
|
# Create distribution directory
|
|
rm -rf "$DIST_DIR"
|
|
mkdir -p "$DIST_DIR"
|
|
|
|
# Copy executable and assets
|
|
cp -r "$BUILD_DIR"/* "$DIST_DIR/"
|
|
|
|
# Create README
|
|
cat > "$DIST_DIR/README.txt" << EOF
|
|
Spotify Le 2 - Linux Client
|
|
Version: $VERSION
|
|
|
|
To run the application:
|
|
./spotify_le_2
|
|
|
|
Make sure the backend server is running on http://localhost:8000
|
|
EOF
|
|
|
|
chmod +x "$DIST_DIR/spotify_le_2"
|
|
echo "[OK] Distribution package created!"
|
|
echo ""
|
|
|
|
echo "========================================"
|
|
echo " BUILD COMPLETED SUCCESSFULLY!"
|
|
echo "========================================"
|
|
echo ""
|
|
echo "Executable location: $DIST_DIR/spotify_le_2"
|
|
echo ""
|
|
echo "To run the application:"
|
|
echo " 1. Make sure the backend is running"
|
|
echo " 2. Execute: $DIST_DIR/spotify_le_2"
|
|
echo ""
|