; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Axyz" #define MyAppVersion "1.0" #define MyAppURL "https://github.com/teamfisk/TacticalZ" #define MyAppExeName "TacticalZ.exe" [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{38D77EB2-6B56-4B4F-BAAE-43F9E6E1A191} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} DisableProgramGroupPage=yes OutputBaseFilename=Axyz Setup SetupIconFile=..\Axyz.ico Compression=lzma2 SolidCompression=yes ; "ArchitecturesAllowed=x64" specifies that Setup cannot run on ; anything but x64. ArchitecturesAllowed=x64 ; "ArchitecturesInstallIn64BitMode=x64" requests that the install be ; done in "64-bit mode" on x64, meaning it should use the native ; 64-bit Program Files directory and the 64-bit view of the registry. ArchitecturesInstallIn64BitMode=x64 OutputDir=. DisableWelcomePage=false ;WizardSmallImageFile= WizardImageFile=Setup Banner.bmp [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "..\..\bin\Audio\*"; DestDir: "{app}\Audio\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Fonts\*"; DestDir: "{app}\Fonts\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Licenses\*"; DestDir: "{app}\Licenses\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Models\*"; DestDir: "{app}\Models\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Schema\*"; DestDir: "{app}\Schema\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Shaders\*"; DestDir: "{app}\Shaders\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Textures\*"; DestDir: "{app}\Textures\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\assimp.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\DefaultConfig.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\TacticalZ.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\xerces-c_3_1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\zlib.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\deps\redist\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall [Icons] Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [INI] Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist [Run] Filename: "{tmp}\VC_redist.x64.exe"; StatusMsg: "Installing Microsoft Visual C++ Redistributable...."; Check: IsWin64 and not VCinstalled [ThirdParty] UseRelativePaths=True [Code] function VCinstalled: Boolean; // By Michael Weiner // Function for Inno Setup Compiler // 13 November 2015 // Returns True if Microsoft Visual C++ Redistributable is installed, otherwise False. // The programmer may set the year of redistributable to find; see below. var names: TArrayOfString; i: Integer; dName, key, year: String; begin // Year of redistributable to find; leave null to find installation for any year. year := ''; Result := False; key := 'Software\Microsoft\Windows\CurrentVersion\Uninstall'; // Get an array of all of the uninstall subkey names. if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, key, names) then // Uninstall subkey names were found. begin i := 0 while ((i < GetArrayLength(names)) and (Result = False)) do // The loop will end as soon as one instance of a Visual C++ redistributable is found. begin // For each uninstall subkey, look for a DisplayName value. // If not found, then the subkey name will be used instead. if not RegQueryStringValue(HKEY_LOCAL_MACHINE, key + '\' + names[i], 'DisplayName', dName) then dName := names[i]; // See if the value contains both of the strings below. Result := (Pos(Trim('Visual C++ ' + year),dName) * Pos('Redistributable',dName) <> 0) i := i + 1; end; end; end;