[Setup]
AppName=TranscribeStation
AppVersion=1.2.0
AppVerName=TranscribeStation 1.2.0
AppPublisher=H3Campus
AppPublisherURL=https://github.com/h3campus/transcribe-station
AppSupportURL=https://github.com/h3campus/transcribe-station
DefaultDirName={localappdata}\Programs\TranscribeStation
DefaultGroupName=TranscribeStation
AllowNoIcons=yes
OutputDir=C:\ts\installer
OutputBaseFilename=TranscribeStation_Setup_v1.2.0
SetupIconFile=C:\ts\icon.ico
Compression=lzma2/ultra64
SolidCompression=yes
WizardStyle=modern
WizardSizePercent=120
PrivilegesRequired=lowest
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
UninstallDisplayIcon={app}\TranscribeStation.exe
UninstallDisplayName=TranscribeStation 1.2.0
CloseApplications=yes

[Languages]
Name: "french"; MessagesFile: "compiler:Languages\French.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"

[Files]
Source: "C:\ts\dist\TranscribeStation\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{group}\TranscribeStation"; Filename: "{app}\TranscribeStation.exe"
Name: "{userdesktop}\TranscribeStation"; Filename: "{app}\TranscribeStation.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\TranscribeStation.exe"; Description: "Lancer TranscribeStation"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: filesandordirs; Name: "{app}"

[Code]
// Verifie que l'architecture est x64
function InitializeSetup(): Boolean;
begin
  Result := True;
  if not Is64BitInstallMode then begin
    MsgBox('TranscribeStation necessite Windows 64 bits.', mbError, MB_OK);
    Result := False;
  end;
end;
