From 8e3bd2b53c4f4681c8e9ddccb21da7d2a3a7bc5c Mon Sep 17 00:00:00 2001 From: nocode Date: Wed, 8 Jul 2026 03:38:04 +0200 Subject: [PATCH] feat(gameboot-windows): add FirstBoot-FwsGameboot orchestrator script Add PowerShell script to orchestrate first-boot initialization on Windows gaming system. The script executes on first boot only: 1. Install-FwsGameboot.ps1 for gaming account setup and auto-login 2. Install-Games.ps1 to download and install configured games from official sources A marker file prevents re-execution on subsequent boots. Idempotent and safe to re-run. --- .../FirstBoot-FwsGameboot.ps1 | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 configs/releng/airootfs/usr/local/share/fws/gameboot-windows/FirstBoot-FwsGameboot.ps1 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 =="