diff --git a/assets b/assets index 2c75d24d..6ec80c4e 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 2c75d24ddfeb29c266d98a6d637b6c5768c5cafe +Subproject commit 6ec80c4e0beb75068763696fe84bb839616b8f06 diff --git a/deps b/deps index ed45883a..49ef5853 160000 --- a/deps +++ b/deps @@ -1 +1 @@ -Subproject commit ed45883a444c6de548b6211a83a079ff2ecfce15 +Subproject commit 49ef5853662500ec9634af75b73b61f8168a14f9 diff --git a/resources/Axyz.ico b/resources/Axyz.ico new file mode 100755 index 00000000..b033831f Binary files /dev/null and b/resources/Axyz.ico differ diff --git a/resources/Inno Setup Script.iss b/resources/Inno Setup Script.iss new file mode 100755 index 00000000..ddaf61d0 --- /dev/null +++ b/resources/Inno Setup Script.iss @@ -0,0 +1,127 @@ +; 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= + +[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; + + procedure InitializeWizard(); +begin + // Welcome page + // Hide the labels + WizardForm.WelcomeLabel1.Visible := False; + WizardForm.WelcomeLabel2.Visible := False; + // Stretch image over whole page + WizardForm.WizardBitmapImage.Width := WizardForm.WizardBitmapImage.Parent.Width; + + // Finished page + // Hide the labels + WizardForm.FinishedLabel.Visible := False; + WizardForm.FinishedHeadingLabel.Visible := False; + // Stretch image over whole page + WizardForm.WizardBitmapImage2.Width := WizardForm.WizardBitmapImage2.Parent.Width; +end;