build(gui): add Windows GUI V6 one-click packaging
This commit is contained in:
28
build_windows_gui_v6_oneclick.bat
Normal file
28
build_windows_gui_v6_oneclick.bat
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
set "SCRIPT_DIR=%~dp0"
|
||||||
|
set "PS_SCRIPT=%SCRIPT_DIR%scripts\build_windows_oneclick.ps1"
|
||||||
|
|
||||||
|
if not exist "%PS_SCRIPT%" (
|
||||||
|
echo Script PowerShell introuvable : %PS_SCRIPT%
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Lancement du build Windows GUI V6...
|
||||||
|
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%PS_SCRIPT%" -GuiV6
|
||||||
|
set "EXITCODE=%ERRORLEVEL%"
|
||||||
|
|
||||||
|
if not "%EXITCODE%"=="0" (
|
||||||
|
echo.
|
||||||
|
echo Le build GUI V6 a echoue. Code retour : %EXITCODE%
|
||||||
|
pause
|
||||||
|
exit /b %EXITCODE%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Build GUI V6 termine avec succes.
|
||||||
|
echo Sortie attendue : release\Anonymisation-Setup.exe
|
||||||
|
pause
|
||||||
|
exit /b 0
|
||||||
@@ -3,9 +3,11 @@
|
|||||||
Le packaging Windows standard du projet repose sur :
|
Le packaging Windows standard du projet repose sur :
|
||||||
|
|
||||||
- `build_windows_oneclick.bat`
|
- `build_windows_oneclick.bat`
|
||||||
|
- `build_windows_gui_v6_oneclick.bat`
|
||||||
- `build_windows_installer_oneclick.bat`
|
- `build_windows_installer_oneclick.bat`
|
||||||
- `scripts/build_windows_oneclick.ps1`
|
- `scripts/build_windows_oneclick.ps1`
|
||||||
- `anonymisation_onefile.spec`
|
- `anonymisation_onefile.spec`
|
||||||
|
- `anonymisation_gui_v6_onefile.spec`
|
||||||
- `installer/Anonymisation.iss`
|
- `installer/Anonymisation.iss`
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -65,6 +67,33 @@ Pour ne générer que l'exécutable et le ZIP :
|
|||||||
powershell -ExecutionPolicy Bypass -File .\scripts\build_windows_oneclick.ps1 -SkipInstaller
|
powershell -ExecutionPolicy Bypass -File .\scripts\build_windows_oneclick.ps1 -SkipInstaller
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## GUI V6
|
||||||
|
|
||||||
|
La GUI V6 utilise le même pipeline PyInstaller + Inno Setup, mais avec l'entrée
|
||||||
|
`Pseudonymisation_Gui_V6.py` et la spec dédiée `anonymisation_gui_v6_onefile.spec`.
|
||||||
|
Le comportement historique reste le défaut du script one-click.
|
||||||
|
|
||||||
|
Sur la machine Windows de build :
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
powershell -ExecutionPolicy Bypass -File .\scripts\build_windows_oneclick.ps1 -GuiV6
|
||||||
|
```
|
||||||
|
|
||||||
|
ou double-cliquer sur :
|
||||||
|
|
||||||
|
```text
|
||||||
|
build_windows_gui_v6_oneclick.bat
|
||||||
|
```
|
||||||
|
|
||||||
|
Sorties attendues identiques :
|
||||||
|
|
||||||
|
- `dist\Anonymisation.exe` : exécutable GUI V6 ;
|
||||||
|
- `release\Anonymisation-Windows\Anonymisation.exe` : paquet local ;
|
||||||
|
- `release\Anonymisation-Windows.zip` : archive locale ;
|
||||||
|
- `release\Anonymisation-Setup.exe` : installateur destiné au portail après GO
|
||||||
|
diffusion ;
|
||||||
|
- `release\Anonymisation.exe.sha256.txt` : hash de l'exécutable.
|
||||||
|
|
||||||
## Important
|
## Important
|
||||||
|
|
||||||
- les utilisateurs finaux n'ont pas besoin d'installer Python
|
- les utilisateurs finaux n'ont pas besoin d'installer Python
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
param(
|
param(
|
||||||
|
[switch]$GuiV6,
|
||||||
[switch]$SkipZip,
|
[switch]$SkipZip,
|
||||||
[switch]$SkipInstaller,
|
[switch]$SkipInstaller,
|
||||||
[switch]$SkipRequirements,
|
[switch]$SkipRequirements,
|
||||||
@@ -170,7 +171,9 @@ function Invoke-CodeSigning {
|
|||||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
$ProjectRoot = (Resolve-Path (Join-Path $ScriptDir "..")).Path
|
$ProjectRoot = (Resolve-Path (Join-Path $ScriptDir "..")).Path
|
||||||
$SigningConfigPath = Join-Path $ProjectRoot "build_signing.local.ps1"
|
$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"
|
$InstallerScriptPath = Join-Path $ProjectRoot "installer\Anonymisation.iss"
|
||||||
$BuildInfoPath = Join-Path $ProjectRoot "build_info.py"
|
$BuildInfoPath = Join-Path $ProjectRoot "build_info.py"
|
||||||
$ModelPath = Join-Path $ProjectRoot "models\camembert-bio-deid\onnx\model.onnx"
|
$ModelPath = Join-Path $ProjectRoot "models\camembert-bio-deid\onnx\model.onnx"
|
||||||
@@ -185,7 +188,30 @@ $ZipPath = Join-Path $ReleaseDir "Anonymisation-Windows.zip"
|
|||||||
$HashPath = Join-Path $ReleaseDir "Anonymisation.exe.sha256.txt"
|
$HashPath = Join-Path $ReleaseDir "Anonymisation.exe.sha256.txt"
|
||||||
$InstallerPath = Join-Path $ReleaseDir "Anonymisation-Setup.exe"
|
$InstallerPath = Join-Path $ReleaseDir "Anonymisation-Setup.exe"
|
||||||
$ReadmePath = Join-Path $PackageDir "README.txt"
|
$ReadmePath = Join-Path $PackageDir "README.txt"
|
||||||
$RequiredSourceFiles = @(
|
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",
|
"launcher.py",
|
||||||
"Pseudonymisation_Gui_V5.py",
|
"Pseudonymisation_Gui_V5.py",
|
||||||
"anonymizer_core_refactored_onnx.py",
|
"anonymizer_core_refactored_onnx.py",
|
||||||
@@ -197,10 +223,13 @@ $RequiredSourceFiles = @(
|
|||||||
"pdf_mask_designer.py",
|
"pdf_mask_designer.py",
|
||||||
"format_converter.py",
|
"format_converter.py",
|
||||||
"camembert_ner_manager.py"
|
"camembert_ner_manager.py"
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Write-Step "Préparation du build Windows"
|
Write-Step "Préparation du build Windows"
|
||||||
Write-Host "Projet : $ProjectRoot"
|
Write-Host "Projet : $ProjectRoot"
|
||||||
|
Write-Host "Variante : $BuildFlavor"
|
||||||
|
Write-Host "Spec PyInstaller : $SpecFileName"
|
||||||
|
|
||||||
Require-Path -PathValue $SpecPath -Label "Spec PyInstaller"
|
Require-Path -PathValue $SpecPath -Label "Spec PyInstaller"
|
||||||
Require-Path -PathValue $InstallerScriptPath -Label "Script installateur Inno Setup"
|
Require-Path -PathValue $InstallerScriptPath -Label "Script installateur Inno Setup"
|
||||||
@@ -261,6 +290,7 @@ try {
|
|||||||
BUILD_DATE = "$buildDate"
|
BUILD_DATE = "$buildDate"
|
||||||
BUILD_COMMIT = "$commit"
|
BUILD_COMMIT = "$commit"
|
||||||
BUILD_BRANCH = "$branch"
|
BUILD_BRANCH = "$branch"
|
||||||
|
BUILD_FLAVOR = "$BuildFlavor"
|
||||||
"@
|
"@
|
||||||
Set-Content -Path $BuildInfoPath -Value $buildInfo -Encoding UTF8
|
Set-Content -Path $BuildInfoPath -Value $buildInfo -Encoding UTF8
|
||||||
Write-Host "Build info : $buildDate / $branch / $commit"
|
Write-Host "Build info : $buildDate / $branch / $commit"
|
||||||
@@ -317,6 +347,7 @@ Build :
|
|||||||
- Date : $buildDate
|
- Date : $buildDate
|
||||||
- Branche : $branch
|
- Branche : $branch
|
||||||
- Commit : $commit
|
- Commit : $commit
|
||||||
|
- Variante : $BuildFlavor
|
||||||
- Signature : $script:SignatureSummary
|
- Signature : $script:SignatureSummary
|
||||||
"@
|
"@
|
||||||
Set-Content -Path $ReadmePath -Value $readme -Encoding UTF8
|
Set-Content -Path $ReadmePath -Value $readme -Encoding UTF8
|
||||||
|
|||||||
Reference in New Issue
Block a user