Ajout de la langue anglaise

Ajout d'un README.md avec le descriptif et les instructions
L'ancien README.md s'appelle désormais CHANGELOG.md
Activation du pavé numérique par défaut pour les installations sans assistance
Nouveau design pour la fenêtre de déploiement.
Ajout de paramètre pour pouvoir procéder à une installation totalement automatisée
Ajout de paramètre pour copier au choix sources, drivers ou les deux sur C:\DeployVenter avant leur usage par DISM.
This commit is contained in:
benoit committed 2026-10-18 04:14:17 +02:00
1 parent cb917c97ce
commit 2212e25d31
26 files changed
+2625 -830

No files matched your search

+21 -21
View File
@@ -1,5 +1,5 @@
# DeployCenter - Chargement et validation des profils de partitionnement
# Les profils PSD1 sont des fichiers de données ; ils ne contiennent aucun code exécuté.
# DeployCenter - Load and validate partitioning profiles
# PSD1 profiles are data files; they contain no executable code.
function Get-DeployCenterPartitionProfileNames {
[CmdletBinding()]
@@ -20,61 +20,61 @@ function Import-DeployCenterPartitionProfile {
[Parameter(Mandatory=$true)][string]$ProfileName
)
if ($ProfileName -notmatch '^[A-Za-z0-9_-]+$') { throw "Nom de profil invalide : $ProfileName" }
if ($ProfileName -notmatch '^[A-Za-z0-9_-]+$') { throw "Invalid profile name: $ProfileName" }
$path = Join-Path $ProfilesRoot ($ProfileName + '.psd1')
if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { throw "Profil introuvable : $ProfileName" }
if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { throw "Profile not found: $ProfileName" }
$profile = Import-PowerShellDataFile -LiteralPath $path
foreach ($key in @('Id','Name','Description','Firmware','PartitionStyle','Partitions')) {
if (-not $profile.ContainsKey($key)) { throw "Le profil '$ProfileName' ne contient pas la clé '$key'." }
if (-not $profile.ContainsKey($key)) { throw "The profile '$ProfileName' does not contain key '$key'." }
}
if ([string]$profile.Id -ne $ProfileName) { throw "L'identifiant du profil '$ProfileName' ne correspond pas au nom du fichier." }
if (@($profile.Partitions).Count -lt 2) { throw "Le profil '$ProfileName' doit définir au moins deux partitions." }
if ([string]$profile.Id -ne $ProfileName) { throw "Profile ID '$ProfileName' does not match the file name." }
if (@($profile.Partitions).Count -lt 2) { throw 'The profile must define at least two partitions.' }
if (@($profile.Partitions | Where-Object { [string]$_.Role -eq 'Windows' }).Count -ne 1) {
throw "Le profil '$ProfileName' doit définir exactement une partition Windows."
throw 'The profile must define exactly one Windows partition.'
}
$userInputPartitions = @($profile.Partitions | Where-Object { [string]$_.Size.Policy -eq 'UserInputGB' })
$remainderPartitions = @($profile.Partitions | Where-Object { [string]$_.Size.Policy -eq 'RemainderAfterInputs' })
$remainingPartitions = @($profile.Partitions | Where-Object { [string]$_.Size.Policy -eq 'Remaining' })
if ($userInputPartitions.Count -gt 0) {
if ($remainderPartitions.Count -ne 1 -or $remainingPartitions.Count -gt 0) {
throw "Le profil '$ProfileName' doit associer les saisies utilisateur à une partition de reste unique."
throw "Profile '$ProfileName' must associate user inputs with exactly one remaining-space partition."
}
} elseif ($remainingPartitions.Count -ne 1 -or [string]$profile.Partitions[-1].Size.Policy -ne 'Remaining') {
throw "Le profil '$ProfileName' doit placer une unique partition utilisant l'espace restant en dernière position."
throw "Profile '$ProfileName' must place exactly one remaining-space partition last."
}
foreach ($partition in $profile.Partitions) {
foreach ($key in @('Name','Role','FileSystem','Size')) {
if (-not $partition.ContainsKey($key)) { throw "Une partition du profil '$ProfileName' ne contient pas la clé '$key'." }
if (-not $partition.ContainsKey($key)) { throw "A profile partition '$ProfileName' does not contain key '$key'." }
}
if (-not $partition.Size.ContainsKey('Policy')) { throw "La taille d'une partition du profil '$ProfileName' ne définit pas Policy." }
if (-not $partition.Size.ContainsKey('Policy')) { throw "The size of a profile partition '$ProfileName' does not define Policy." }
switch ([string]$partition.Size.Policy) {
'FixedMB' {
if ([int]$partition.Size.Value -le 0) { throw "Une taille fixe du profil '$ProfileName' doit être supérieure à zéro." }
if ([int]$partition.Size.Value -le 0) { throw "A fixed size in profile '$ProfileName' must be greater than zero." }
}
'ImageSizePlusFreeSpace' {
if ([int]$partition.Size.FreeSpaceMB -lt 250) { throw "La marge libre WinRE du profil '$ProfileName' doit être d'au moins 250 Mo." }
if ([int]$partition.Size.PreviewMB -le 0) { throw "Le profil '$ProfileName' doit définir une réserve PreviewMB pour estimer la capacité disponible." }
if ([int]$partition.Size.FreeSpaceMB -lt 250) { throw 'The WinRE free-space allowance must be at least 250 MB.' }
if ([int]$partition.Size.PreviewMB -le 0) { throw "Profile '$ProfileName' must define a PreviewMB reserve to estimate available capacity." }
}
'ConfiguredMB' {
if ([string]::IsNullOrWhiteSpace([string]$partition.Size.ConfigKey) -or
[int]$partition.Size.Value -le 0 -or [int]$partition.Size.PreviewMB -le 0) {
throw "La taille configurée de la partition '$($partition.Name)' du profil '$ProfileName' doit définir ConfigKey et des tailles strictement positives."
throw "The configured size of partition '$($partition.Name)' in profile '$ProfileName' must define ConfigKey and strictly positive sizes."
}
}
'UserInputGB' {
if ([int]$partition.Size.MinimumGB -le 0 -or [int]$partition.Size.DefaultPercent -le 0 -or [int]$partition.Size.DefaultPercent -ge 100) {
throw "La saisie de taille utilisateur du profil '$ProfileName' doit définir MinimumGB et un DefaultPercent entre 1 et 99."
throw 'The user-size input must define MinimumGB and a DefaultPercent from 1 to 99.'
}
if ([string]::IsNullOrWhiteSpace([string]$partition.Size.Label)) { throw "La saisie de taille utilisateur du profil '$ProfileName' doit définir Label." }
if ([string]::IsNullOrWhiteSpace([string]$partition.Size.Label)) { throw "The profile user-size input '$ProfileName' must define Label." }
}
'RemainderAfterInputs' {
if ([double]$partition.Size.MinimumGB -lt 0 -or [string]::IsNullOrWhiteSpace([string]$partition.Size.Label)) {
throw "La partition de reste du profil '$ProfileName' doit définir un MinimumGB non négatif et un Label."
throw "The remaining-space partition in profile '$ProfileName' must define a non-negative MinimumGB and a Label."
}
}
'Remaining' { }
default { throw "Politique de taille inconnue dans le profil '$ProfileName' : $($partition.Size.Policy)" }
default { throw "Unknown size policy in profile '$ProfileName': $($partition.Size.Policy)" }
}
}
@@ -99,7 +99,7 @@ function Get-DeployCenterPartitionSizingCapacity {
}
$capacityBytes = $DiskSizeBytes - [long][math]::Ceiling($reservedMB * 1MB)
if ($capacityBytes -le 0) { throw "Le disque est trop petit pour les réserves du profil '$($Profile.Name)'." }
if ($capacityBytes -le 0) { throw "The disk is too small for the profile reserves '$($Profile.Name)'." }
return [pscustomobject]@{
UsableBytes = [long]$capacityBytes
UsableGB = [math]::Round(($capacityBytes / 1GB), 1)