build(gui): add Windows GUI V6 one-click packaging

This commit is contained in:
2026-06-13 09:31:14 +02:00
parent 562f5a76dd
commit 873fd5622a
3 changed files with 102 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
param(
[switch]$GuiV6,
[switch]$SkipZip,
[switch]$SkipInstaller,
[switch]$SkipRequirements,
@@ -170,7 +171,9 @@ function Invoke-CodeSigning {
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$ProjectRoot = (Resolve-Path (Join-Path $ScriptDir "..")).Path
$SigningConfigPath = Join-Path $ProjectRoot "build_signing.local.ps1"
$SpecPath = Join-Path $ProjectRoot "anonymisation_onefile.spec"
$BuildFlavor = if ($GuiV6) { "GUI V6" } else { "GUI historique" }
$SpecFileName = if ($GuiV6) { "anonymisation_gui_v6_onefile.spec" } else { "anonymisation_onefile.spec" }
$SpecPath = Join-Path $ProjectRoot $SpecFileName
$InstallerScriptPath = Join-Path $ProjectRoot "installer\Anonymisation.iss"
$BuildInfoPath = Join-Path $ProjectRoot "build_info.py"
$ModelPath = Join-Path $ProjectRoot "models\camembert-bio-deid\onnx\model.onnx"
@@ -185,22 +188,48 @@ $ZipPath = Join-Path $ReleaseDir "Anonymisation-Windows.zip"
$HashPath = Join-Path $ReleaseDir "Anonymisation.exe.sha256.txt"
$InstallerPath = Join-Path $ReleaseDir "Anonymisation-Setup.exe"
$ReadmePath = Join-Path $PackageDir "README.txt"
$RequiredSourceFiles = @(
"launcher.py",
"Pseudonymisation_Gui_V5.py",
"anonymizer_core_refactored_onnx.py",
"admin_rules.py",
"config_defaults.py",
"profile_defaults.py",
"gui_batch_paths.py",
"manual_masking.py",
"pdf_mask_designer.py",
"format_converter.py",
"camembert_ner_manager.py"
)
if ($GuiV6) {
$RequiredSourceFiles = @(
"Pseudonymisation_Gui_V6.py",
"gui_v6\app.py",
"gui_v6\theme.py",
"gui_v6\ui_kit.py",
"gui_v6\engine_bridge.py",
"gui_v6\processing_runner.py",
"gui_v6\config_state.py",
"gui_v6\license_client.py",
"gui_v6\license_store.py",
"gui_v6\machine_id.py",
"anonymizer_core_refactored_onnx.py",
"admin_rules.py",
"config_defaults.py",
"profile_defaults.py",
"gui_batch_paths.py",
"manual_masking.py",
"pdf_mask_designer.py",
"format_converter.py",
"camembert_ner_manager.py"
)
} else {
$RequiredSourceFiles = @(
"launcher.py",
"Pseudonymisation_Gui_V5.py",
"anonymizer_core_refactored_onnx.py",
"admin_rules.py",
"config_defaults.py",
"profile_defaults.py",
"gui_batch_paths.py",
"manual_masking.py",
"pdf_mask_designer.py",
"format_converter.py",
"camembert_ner_manager.py"
)
}
Write-Step "Préparation du build Windows"
Write-Host "Projet : $ProjectRoot"
Write-Host "Variante : $BuildFlavor"
Write-Host "Spec PyInstaller : $SpecFileName"
Require-Path -PathValue $SpecPath -Label "Spec PyInstaller"
Require-Path -PathValue $InstallerScriptPath -Label "Script installateur Inno Setup"
@@ -261,6 +290,7 @@ try {
BUILD_DATE = "$buildDate"
BUILD_COMMIT = "$commit"
BUILD_BRANCH = "$branch"
BUILD_FLAVOR = "$BuildFlavor"
"@
Set-Content -Path $BuildInfoPath -Value $buildInfo -Encoding UTF8
Write-Host "Build info : $buildDate / $branch / $commit"
@@ -317,6 +347,7 @@ Build :
- Date : $buildDate
- Branche : $branch
- Commit : $commit
- Variante : $BuildFlavor
- Signature : $script:SignatureSummary
"@
Set-Content -Path $ReadmePath -Value $readme -Encoding UTF8