Files
WGSecure/wgsecure.iss
T
2026-08-31 13:48:41 +02:00

53 lines
2.1 KiB
Plaintext

; ──────────────────────────────────────────────
; WGSecure (WGS) — Script Inno Setup
; Installeur Windows (bundle VC++ Redistributable)
; ──────────────────────────────────────────────
#define MyAppName "WGSecure"
#define MyAppVersion "0.4.2"
#define MyAppPublisher "WGSecure"
#define MyAppExeName "wgsecure.exe"
[Setup]
AppId={{8F3B2C1A-7D4E-4A9B-9C6F-1E2D3F4A5B6C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputDir=dist
OutputBaseFilename=wgsecure-{#MyAppVersion}-setup
Compression=lzma2
SolidCompression=yes
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
PrivilegesRequired=admin
[Languages]
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
[Files]
Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
; VC++ Redistributable x64 — à télécharger avant compilation :
; https://aka.ms/vs/17/release/vc_redist.x64.exe → installer\vc_redist.x64.exe
Source: "installer\vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
[Run]
; Installation silencieuse du VC++ Redistributable si absent (corrige "Failed to load Python DLL: python312.dll")
Filename: "{tmp}\vc_redist.x64.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installation du composant Visual C++ Redistributable…"; Check: VCRedistNeedsInstall
Filename: "{app}\{#MyAppExeName}"; Description: "Lancer {#MyAppName}"; Flags: nowait postinstall skipifsilent
[Code]
function VCRedistNeedsInstall: Boolean;
var
Version: String;
begin
// Clé présente si VC++ 2015-2022 x64 (v14+) déjà installé
Result := not RegQueryStringValue(HKLM64, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64', 'Version', Version);
end;