param( [Parameter(Mandatory=$true)] [string]$ManifestPath ) if (!(Test-Path $ManifestPath)) { Write-Host "[ERREUR] AndroidManifest.xml introuvable : $ManifestPath" -ForegroundColor Red exit 1 } $text = Get-Content $ManifestPath -Raw # Remplace les attributs existants. $text = [regex]::Replace($text, 'android:label="[^"]*"', 'android:label="FIN65"') $text = [regex]::Replace($text, 'android:icon="[^"]*"', 'android:icon="@mipmap/ic_launcher"') $text = [regex]::Replace($text, 'android:roundIcon="[^"]*"', 'android:roundIcon="@mipmap/ic_launcher_round"') # Ajoute les attributs s'ils n'existaient pas. if ($text -notmatch 'android:label=') { $text = $text -replace '