Ajouter flatpacks/setup_atlauncher
This commit is contained in:
parent
f3068fa642
commit
c0c604e0df
1 changed files with 33 additions and 0 deletions
33
flatpacks/setup_atlauncher
Normal file
33
flatpacks/setup_atlauncher
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LOG_FILE="$HOME/.logs/atlauncher_setup.log"
|
||||||
|
|
||||||
|
# Création du répertoire de logs s'il n'existe pas
|
||||||
|
mkdir -p "$(dirname "$LOG_FILE")"
|
||||||
|
|
||||||
|
# Fonction de log
|
||||||
|
log() {
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
NVIDIAFlag=$1
|
||||||
|
|
||||||
|
log "Début de l'installation de AtLauncher via Flatpak"
|
||||||
|
if sudo flatpak install flathub -y com.atlauncher.ATLauncher 2>&1 | tee -a "$LOG_FILE"; then
|
||||||
|
log "Installation réussie"
|
||||||
|
else
|
||||||
|
log "Erreur lors de l'installation"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $NVIDIAFlag = "--nvidia" ]] || [[ $NVIDIAFlag = "-n" ]]; then
|
||||||
|
log "Application des overrides NVIDIA pour AtLauncher"
|
||||||
|
if sudo flatpak override --device=dri --env=__NV_PRIME_RENDER_OFFLOAD=1 --env=__GLX_VENDOR_LIBRARY_NAME=nvidia com.atlauncher.ATLauncher 2>&1 | tee -a "$LOG_FILE"; then
|
||||||
|
log "Overrides NVIDIA appliqués avec succès"
|
||||||
|
else
|
||||||
|
log "Erreur lors de l'application des overrides NVIDIA"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Script terminé avec succès"
|
Loading…
Add table
Reference in a new issue