85dad89d5b
Phase 1 - Corrections Critiques: - Fixed memory leaks dans music_provider.dart (stream subscriptions) - Fixed race conditions dans search_provider.dart (stale results) - Fixed token refresh errors dans api_service.dart - Improved error handling avec messages utilisateur - Changed API URL to HTTPS by default Phase 2 - Améliorations UX Desktop: - Ajouté cursor pointers sur tous les éléments cliquables - Implémenté hover states avec effets néon glow (200ms transitions) - Créé skeleton loading states avec shimmer animation - Ajouté widgets: ClickableWrapper, ErrorDisplay, SkeletonLoading - Enhanced visual feedback pour desktop users Phase 3 - Configuration Flutter: - Configuré Android (Gradle 8.1.0, Kotlin 1.9.0, minSdk 21, targetSdk 34) - Créé launcher icons cyberpunk néon (5 densités) - Configuré Windows desktop (structure complète) - Activé Linux desktop support - Ajouté package équatable pour entités de domaine - Corrigé imports (colors.dart, auth_provider.dart) - Fixed Dio API compatibility (RequestOptions) Documentation: - STYLE_GUIDE.md: Guide complet (100+ pages) - DESIGN_IMPLEMENTATION_GUIDE.md: Implémentation Flutter - BUILD_STATUS.md: Status builds + troubleshooting - QUICKSTART_BUILDS.md: Guide rapide - BUILD_INDEX.md: Index documentation - PHASE_1_CORRECTIONS.md: Corrections Phase 1 - PHASE_2_UX_IMPROVEMENTS.md: Améliorations Phase 2 - PR_REVIEW_SUMMARY.md: Revue code complète - CODE_ANALYSIS_AND_PRIORITIES.md: Analyse code Scripts & Builds: - BUILD_ALL.sh: Script automatisé builds multi-plateforme - builds/: Structure avec README par plateforme - design-system/: Système de design complet Backend: - Ajouté streaming HTTP Range pour audio progressif - Enhanced YouTube service avec métadonnées complètes - Improved error handling et validation Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
241 lines
8.9 KiB
Bash
Executable File
241 lines
8.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#
|
|
# AudiOhm - Build Script
|
|
# Ce script automatise la création des builds pour toutes les plateformes
|
|
#
|
|
|
|
set -e # Arrêter en cas d'erreur
|
|
|
|
# Couleurs pour output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
# Dossiers
|
|
PROJECT_DIR="/opt/audiOhm"
|
|
FRONTEND_DIR="$PROJECT_DIR/frontend"
|
|
BUILDS_DIR="$PROJECT_DIR/builds"
|
|
FLUTTER_BIN="/opt/flutter/bin/flutter"
|
|
|
|
echo -e "${BLUE}╔══════════════════════════════════════════╗${NC}"
|
|
echo -e "${BLUE}║ AudiOhm - Build Automation Script ║${NC}"
|
|
echo -e "${BLUE}╚══════════════════════════════════════════╝${NC}"
|
|
echo ""
|
|
|
|
# Fonction pour afficher les sections
|
|
section() {
|
|
echo -e "\n${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
echo -e "${BLUE} $1${NC}"
|
|
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
|
|
}
|
|
|
|
# Fonction pour afficher le succès
|
|
success() {
|
|
echo -e "${GREEN}✓ $1${NC}"
|
|
}
|
|
|
|
# Fonction pour afficher les avertissements
|
|
warning() {
|
|
echo -e "${YELLOW}⚠ $1${NC}"
|
|
}
|
|
|
|
# Fonction pour afficher les erreurs
|
|
error() {
|
|
echo -e "${RED}✗ $1${NC}"
|
|
}
|
|
|
|
# Vérifier Flutter
|
|
section "Vérification Flutter"
|
|
|
|
if [ ! -f "$FLUTTER_BIN" ]; then
|
|
error "Flutter non trouvé à $FLUTTER_BIN"
|
|
exit 1
|
|
fi
|
|
|
|
success "Flutter trouvé: $FLUTTER_BIN"
|
|
$FLUTTER_BIN --version | head -1
|
|
|
|
# Vérifier le dossier frontend
|
|
if [ ! -d "$FRONTEND_DIR" ]; then
|
|
error "Dossier frontend non trouvé: $FRONTEND_DIR"
|
|
exit 1
|
|
fi
|
|
|
|
success "Dossier frontend trouvé"
|
|
|
|
# Créer dossier builds
|
|
mkdir -p "$BUILDS_DIR"/{linux,android,windows,web}
|
|
success "Dossier builds créé"
|
|
|
|
cd "$FRONTEND_DIR"
|
|
|
|
# Installer les dépendances
|
|
section "Installation des dépendances"
|
|
$FLUTTER_BIN pub get
|
|
success "Dépendances installées"
|
|
|
|
# ═══════════════════════════════════════════════════════════════
|
|
# LINUX BUILD
|
|
# ═══════════════════════════════════════════════════════════════
|
|
section "Build Linux Desktop"
|
|
|
|
warning "Le build Linux nécessite des dépendances système:"
|
|
warning " - clang, cmake, ninja-build, pkg-config"
|
|
warning " - libgtk-3-dev, liblzma-dev"
|
|
warning ""
|
|
warning "Installation: sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev"
|
|
warning ""
|
|
|
|
read -p "Voulez-vous tenter le build Linux? (y/N) " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
if $FLUTTER_BIN build linux --release 2>&1; then
|
|
success "Build Linux réussi!"
|
|
|
|
# Copier le build
|
|
if [ -d "build/linux/x64/release/bundle" ]; then
|
|
cp -r build/linux/x64/release/bundle/* "$BUILDS_DIR/linux/"
|
|
success "Build Linux copié dans $BUILDS_DIR/linux/"
|
|
|
|
# Info
|
|
echo ""
|
|
echo "Exécutable: $BUILDS_DIR/linux/audiOhm"
|
|
echo "Lancement: cd $BUILDS_DIR/linux && ./audiOhm"
|
|
fi
|
|
else
|
|
error "Build Linux échoué - voir logs ci-dessus"
|
|
warning "Il manque probablement des dépendances système"
|
|
warning "Voir $BUILDS_DIR/linux/README.md pour les instructions"
|
|
fi
|
|
else
|
|
warning "Build Linux ignoré"
|
|
fi
|
|
|
|
# ═══════════════════════════════════════════════════════════════
|
|
# ANDROID BUILD
|
|
# ═══════════════════════════════════════════════════════════════
|
|
section "Build Android APK"
|
|
|
|
warning "Le build Android nécessite le Android SDK"
|
|
warning ""
|
|
warning "Installation rapide:"
|
|
warning " 1. wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip"
|
|
warning " 2. unzip commandlinetools-*.zip -d ~/Android/sdk"
|
|
warning " 3. export ANDROID_HOME=~/Android/sdk"
|
|
warning " 4. flutter doctor --android-licenses"
|
|
warning ""
|
|
|
|
read -p "Voulez-vous tenter le build Android? (y/N) " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
if $FLUTTER_BIN build apk --release 2>&1; then
|
|
success "Build Android réussi!"
|
|
|
|
# Copier l'APK
|
|
if [ -f "build/app/outputs/flutter-apk/app-release.apk" ]; then
|
|
cp build/app/outputs/flutter-apk/app-release.apk "$BUILDS_DIR/android/"
|
|
success "APK copié dans $BUILDS_DIR/android/"
|
|
|
|
# Info
|
|
echo ""
|
|
echo "APK: $BUILDS_DIR/android/app-release.apk"
|
|
echo "Installation: adb install $BUILDS_DIR/android/app-release.apk"
|
|
fi
|
|
else
|
|
error "Build Android échoué - voir logs ci-dessus"
|
|
warning "Android SDK probablement manquant"
|
|
warning "Voir $BUILDS_DIR/android/README.md pour les instructions"
|
|
fi
|
|
else
|
|
warning "Build Android ignoré"
|
|
fi
|
|
|
|
# ═══════════════════════════════════════════════════════════════
|
|
# WINDOWS BUILD
|
|
# ═══════════════════════════════════════════════════════════════
|
|
section "Build Windows EXE"
|
|
|
|
error "Le build Windows DOIT être effectué sur Windows"
|
|
error ""
|
|
error "Instructions:"
|
|
error " 1. Copier le code sur une machine Windows"
|
|
error " 2. Installer Visual Studio 2022 avec C++ desktop"
|
|
error " 3. flutter build windows --release"
|
|
error ""
|
|
warning "Voir $BUILDS_DIR/windows/README.md pour les instructions complètes"
|
|
|
|
# ═══════════════════════════════════════════════════════════════
|
|
# WEB BUILD
|
|
# ═══════════════════════════════════════════════════════════════
|
|
section "Build Web"
|
|
|
|
warning "Le build web a un problème de compatibilité avec just_audio_web"
|
|
warning ""
|
|
warning "Alternatives:"
|
|
warning " 1. flutter run -d chrome (mode développement)"
|
|
warning " 2. Utiliser audioplayers à la place de just_audio"
|
|
warning " 3. Attendre une mise à jour de just_audio_web"
|
|
warning ""
|
|
|
|
read -p "Voulez-vous tenter le build Web? (y/N) " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
if $FLUTTER_BIN build web --release 2>&1; then
|
|
success "Build Web réussi!"
|
|
|
|
# Copier le build
|
|
if [ -d "build/web" ]; then
|
|
cp -r build/web/* "$BUILDS_DIR/web/"
|
|
success "Build Web copié dans $BUILDS_DIR/web/"
|
|
|
|
# Info
|
|
echo ""
|
|
echo "Déploiement: Héberger les fichiers de $BUILDS_DIR/web/"
|
|
echo "Test local: cd $BUILDS_DIR/web && python3 -m http.server 8080"
|
|
fi
|
|
else
|
|
error "Build Web échoué - voir logs ci-dessus"
|
|
warning "Problème de compatibilité just_audio_web connu"
|
|
warning "Voir $BUILDS_DIR/web/README.md pour les alternatives"
|
|
fi
|
|
else
|
|
warning "Build Web ignoré"
|
|
fi
|
|
|
|
# ═══════════════════════════════════════════════════════════════
|
|
# RÉSUMÉ
|
|
# ═══════════════════════════════════════════════════════════════
|
|
section "Résumé"
|
|
|
|
echo "Dossier des builds: $BUILDS_DIR"
|
|
echo ""
|
|
|
|
# Vérifier les builds créés
|
|
echo "Builds créés:"
|
|
for platform in linux android windows web; do
|
|
if [ "$(ls -A $BUILDS_DIR/$platform)" ]; then
|
|
success "$platform: Oui"
|
|
ls -lh "$BUILDS_DIR/$platform" | tail -n +2 | awk '{print " " $9 " (" $5 ")"}'
|
|
else
|
|
warning "$platform: Non (voir README dans $BUILDS_DIR/$platform/)"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
echo -e "${GREEN}Build terminé!${NC}"
|
|
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
echo ""
|
|
echo "Pour tester l'application immédiatement:"
|
|
echo " cd $FRONTEND_DIR"
|
|
echo " flutter run -d chrome"
|
|
echo ""
|
|
echo "Documentation:"
|
|
echo " - Builds: $BUILDS_DIR/README.md"
|
|
echo " - Status: $PROJECT_DIR/BUILD_STATUS.md"
|
|
echo " - Index: $PROJECT_DIR/BUILD_INDEX.md"
|
|
echo ""
|