#ifndef IwcVersion
  #define IwcVersion "1.1.10"
#endif
#ifndef BuildRoot
  #define BuildRoot SourcePath + "\..\build_iwc_x64\rundir\RelWithDebInfo"
#endif

[Setup]
AppId={{D219473F-4E71-4BA9-BD06-7585D67CA357}
AppName=ICEWIRE CAST
AppVersion={#IwcVersion}
AppVerName=ICEWIRE CAST {#IwcVersion}
AppPublisher=ICEWIRE
AppPublisherURL=https://icewire-live-hockey.trevor981385.chatgpt.site
AppSupportURL=https://icewire-live-hockey.trevor981385.chatgpt.site
AppUpdatesURL=https://icewire-live-hockey.trevor981385.chatgpt.site/iwc/desktop
VersionInfoVersion={#IwcVersion}.0
VersionInfoCompany=ICEWIRE
VersionInfoDescription=ICEWIRE CAST Windows Installer
VersionInfoProductName=ICEWIRE CAST
VersionInfoProductVersion={#IwcVersion}
DefaultDirName={autopf}\ICEWIRE\ICEWIRE CAST
DefaultGroupName=ICEWIRE CAST
DisableProgramGroupPage=yes
LicenseFile={#SourcePath}\..\COPYING
OutputDir={#SourcePath}\..\artifacts
OutputBaseFilename=ICEWIRE-CAST-Setup-{#IwcVersion}-x64
SetupIconFile={#SourcePath}\..\build_iwc_x64\frontend\cmake\windows\iwc-cast.ico
UninstallDisplayIcon={app}\bin\64bit\iwc-cast.exe
Compression=lzma2/ultra64
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=admin
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
CloseApplications=yes
RestartApplications=yes
ChangesAssociations=no
MinVersion=10.0.17763

[Files]
Source: "{#BuildRoot}\*"; DestDir: "{app}"; Excludes: "*.pdb,*.lib,*.exp,*.ilk,debug.log,config\*"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#SourcePath}\..\COPYING"; DestDir: "{app}"; DestName: "GPL-2.0-or-later.txt"; Flags: ignoreversion
Source: "{#SourcePath}\..\UPSTREAM.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}\..\IWC_ARCHITECTURE.md"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{autoprograms}\ICEWIRE CAST"; Filename: "{app}\bin\64bit\iwc-cast.exe"; WorkingDir: "{app}\bin\64bit"
Name: "{autodesktop}\ICEWIRE CAST"; Filename: "{app}\bin\64bit\iwc-cast.exe"; WorkingDir: "{app}\bin\64bit"; Tasks: desktopicon

[Tasks]
Name: "desktopicon"; Description: "Create a desktop shortcut"; GroupDescription: "Shortcuts:"; Flags: checkedonce

[Run]
Filename: "{app}\bin\64bit\iwc-cast.exe"; Description: "Launch ICEWIRE CAST"; WorkingDir: "{app}\bin\64bit"; Flags: nowait postinstall skipifsilent

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