Skip to content

Commit 5f998d5

Browse files
committed
Added installation script.
Renamed solution and project files (with spaces).
1 parent 0ea6c63 commit 5f998d5

File tree

4 files changed

+103
-6
lines changed

4 files changed

+103
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.*/
2+
/Release/
23
bin/
34
obj/
45
packages/

Setup/WAT.iss

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#include <idp.iss>
2+
3+
#define SourceRoot SourcePath + "\..\Source"
4+
#define BinDir SourceRoot + "\bin\Release"
5+
#define OutputDir SourcePath + "\..\Release"
6+
7+
#define MyAppName "Warframe Alert Tracker"
8+
#define MyAppExeName "WAT.exe"
9+
#define MyAppVersion RemoveFileExt(GetFileVersion(BinDir + "\" + MyAppExeName))
10+
#define MyAppPublisher "ScriptFUSION"
11+
#define MyAppURL "https://github.com/ScriptFUSION/WAT"
12+
13+
[Setup]
14+
AppId={{6FE66627-C1FC-4509-B914-BE115AFB98C2}
15+
AppName={#MyAppName}
16+
AppVersion={#MyAppVersion}
17+
AppPublisher={#MyAppPublisher}
18+
AppPublisherURL={#MyAppURL}
19+
AppSupportURL={#MyAppURL}
20+
AppUpdatesURL={#MyAppURL}
21+
DefaultDirName={pf}\{#MyAppPublisher}\{#MyAppName}
22+
DefaultGroupName={#MyAppPublisher}\{#MyAppName}
23+
LicenseFile={#SourceRoot}\..\LICENSE
24+
OutputDir={#OutputDir}
25+
OutputBaseFilename={#MyAppName} {#MyAppVersion} setup
26+
AllowNoIcons=yes
27+
SolidCompression=yes
28+
29+
[Languages]
30+
Name: "english"; MessagesFile: "compiler:Default.isl"
31+
32+
[Tasks]
33+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
34+
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
35+
36+
[Files]
37+
Source: "{#BinDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
38+
Source: "{#BinDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion
39+
40+
[Icons]
41+
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
42+
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
43+
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
44+
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
45+
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
46+
47+
[Run]
48+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent
49+
50+
[Code]
51+
var
52+
dotNetInstaller: string;
53+
54+
procedure InitializeWizard;
55+
var
56+
netVersion: cardinal;
57+
begin
58+
dotNetInstaller := ExpandConstant('{tmp}\NetFrameworkInstaller.exe');
59+
60+
RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', netVersion)
61+
62+
// .NET Framework version < 4.5.1.
63+
if (netVersion < 378675) then begin
64+
// Download .NET Framework 4.5.2 Web installer.
65+
idpAddFile('http://go.microsoft.com/fwlink/?LinkId=397707', dotNetInstaller);
66+
idpDownloadAfter(wpReady);
67+
end;
68+
end;
69+
70+
procedure InstallFramework;
71+
var
72+
StatusText: string;
73+
ResultCode: Integer;
74+
begin
75+
if not FileExists(dotNetInstaller) then exit;
76+
77+
StatusText := WizardForm.StatusLabel.Caption;
78+
WizardForm.StatusLabel.Caption := 'Installing .NET Framework 4.5.2. This may take a few minutes...';
79+
WizardForm.ProgressGauge.Style := npbstMarquee;
80+
try
81+
if not Exec(dotNetInstaller, '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin
82+
MsgBox('.NET Framework installation failed: ' + SysErrorMessage(ResultCode) + ' (#' + IntToStr(ResultCode) + ').', mbError, MB_OK);
83+
end;
84+
finally
85+
WizardForm.StatusLabel.Caption := StatusText;
86+
WizardForm.ProgressGauge.Style := npbstNormal;
87+
88+
DeleteFile(dotNetInstaller);
89+
end;
90+
end;
91+
92+
procedure CurStepChanged(CurStep: TSetupStep);
93+
begin
94+
// Install .NET Framework before program files.
95+
if CurStep = ssInstall then InstallFramework;
96+
end;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{37C22337-38D4-4E8E-99B4-89BB16C1FF1D}</ProjectGuid>
7+
<ProjectGuid>{C3A9F1E5-D0F9-475F-8515-D4134666B5DA}</ProjectGuid>
88
<OutputType>WinExe</OutputType>
99
<RootNamespace>ScriptFUSION.WarframeAlertTracker</RootNamespace>
1010
<AssemblyName>WAT</AssemblyName>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.27703.2035
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WarframeAlertTracker", "WarframeAlertTracker.csproj", "{37C22337-38D4-4E8E-99B4-89BB16C1FF1D}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Warframe Alert Tracker", "Warframe Alert Tracker.csproj", "{C3A9F1E5-D0F9-475F-8515-D4134666B5DA}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{37C22337-38D4-4E8E-99B4-89BB16C1FF1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{37C22337-38D4-4E8E-99B4-89BB16C1FF1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{37C22337-38D4-4E8E-99B4-89BB16C1FF1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{37C22337-38D4-4E8E-99B4-89BB16C1FF1D}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{C3A9F1E5-D0F9-475F-8515-D4134666B5DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{C3A9F1E5-D0F9-475F-8515-D4134666B5DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{C3A9F1E5-D0F9-475F-8515-D4134666B5DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{C3A9F1E5-D0F9-475F-8515-D4134666B5DA}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)