diff --git a/configs/releng/airootfs/usr/local/share/fws/gameboot-windows/FirstBoot-FwsGameboot.ps1 b/configs/releng/airootfs/usr/local/share/fws/gameboot-windows/FirstBoot-FwsGameboot.ps1 new file mode 100644 index 0000000..5185ebc --- /dev/null +++ b/configs/releng/airootfs/usr/local/share/fws/gameboot-windows/FirstBoot-FwsGameboot.ps1 @@ -0,0 +1,34 @@ +<# + FirstBoot-FwsGameboot.ps1 — orchestrateur de PREMIER DEMARRAGE (une seule fois). + + Au tout premier boot du Windows gaming, execute automatiquement : + 1. Install-FwsGameboot.ps1 (composant de retour + auto-login + taches) ; + 2. Install-Games.ps1 (telecharge+lance les installeurs officiels des + jeux marques autoinstall dans installers.json). + Puis pose un marqueur pour ne PLUS rien refaire aux boots suivants. + + Cablage (le declencheur du "premier boot") : soit via autounattend.xml + quand FWS pilote l'install Windows (cf. README), soit via + une entree RunOnce. Idempotent : re-lancable sans risque (le marqueur protege). +#> +#Requires -RunAsAdministrator +$ErrorActionPreference = 'Continue' +$here = Split-Path -Parent $MyInvocation.MyCommand.Path +$done = Join-Path $Env:ProgramData 'FWS\.firstboot-done' + +if (Test-Path $done) { Write-Host "FWS first boot deja effectue — rien a faire."; return } + +Write-Host "== FWS premier demarrage : configuration gameboot + installation des jeux ==" + +# 1) Composant de retour + auto-login (compte gaming SANS mot de passe recommande). +try { & (Join-Path $here 'Install-FwsGameboot.ps1') } +catch { Write-Warning "Install-FwsGameboot a echoue : $_" } + +# 2) Installation des jeux (sources officielles Riot). +try { & (Join-Path $here 'Install-Games.ps1') } +catch { Write-Warning "Install-Games a echoue : $_" } + +# Marqueur "fait" (dans le meme dossier durci que le reste). +New-Item -ItemType Directory -Force -Path (Split-Path $done) | Out-Null +New-Item -ItemType File -Force -Path $done | Out-Null +Write-Host "== FWS premier demarrage termine =="