-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathinstaller.iss
More file actions
149 lines (127 loc) · 5.37 KB
/
Copy pathinstaller.iss
File metadata and controls
149 lines (127 loc) · 5.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "BakkesMod"
#define MyAppVersion "3.0"
#define MyAppPublisher "BakkesMod"
#define MyAppURL "https://www.bakkesmod.com"
#define MyAppExeName "BakkesMod.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.)
;AppVerName={#MyAppName} {#MyAppVersion}
AllowNoIcons=yes
AppId={{BF029534-4334-4CFC-B771-50B7EE54346F}
AppMutex=BakkesModMutex
AppName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
AppVersion={#MyAppVersion}
ArchitecturesInstallIn64BitMode=x64
Compression=bzip
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
DisableStartupPrompt=yes
MinVersion=10.0
OutputBaseFilename=BakkesModSetup
;-{#MyAppVersion}
PrivilegesRequired=admin
SetupIconFile=.\BakkesModInjectorC.ico
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
[Files]
Source: ".\compile_assets\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs;
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall; Check: ShouldRunAfter();
[Registry]
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "HideOnMinimize"; ValueData: 1; ValueType: dword; Flags: dontcreatekey uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "HideOnBoot"; ValueData: 0; ValueType: dword; Flags: dontcreatekey uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "EnableSafeMode"; ValueData: 1; ValueType: dword; Flags: dontcreatekey uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "DisableWarnings"; ValueData: 0; ValueType: dword; Flags: dontcreatekey uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "InjectionTimeout"; ValueData: 2500; ValueType: dword; Flags: dontcreatekey uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "InstallPath"; ValueData: "{app}"; ValueType: string; Flags: createvalueifdoesntexist uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod\AppPath"; ValueName: "BakkesModPath"; ValueType: string; Flags: dontcreatekey uninsdeletevalue
Root: HKCU; Subkey: "SOFTWARE\BakkesMod\AppPath"; ValueName: "AppPath"; ValueData: "{app}"; Flags: createvalueifdoesntexist uninsdeletekey
Root: HKCU; Subkey: "SOFTWARE\BakkesMod"; ValueName: "BakkesMod"; Flags: createvalueifdoesntexist uninsdeletekey
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueName: "BakkesMod"; Flags: dontcreatekey uninsdeletevalue
[UninstallDelete]
Type: filesandordirs; Name: "{userappdata}\bakkesmod"
[Code]
var
AntiVirusPage: TOutputMsgWizardPage;
procedure InitializeWizard;
begin
end;
function ShouldRunAfter(): Boolean;
begin;
Result := ExpandConstant('{param:simpleupdater|false}') = 'false'
end;
procedure TaskKill(FileName: String);
var
ResultCode: Integer;
begin
Exec(ExpandConstant('taskkill.exe'), '/f /im ' + '"' + FileName + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;
function InitializeSetup(): Boolean;
begin
Result := False;
if ExpandConstant('{param:installfromdll|false}') = 'true' then
begin;
Result := True
TaskKill('BakkesMod.exe');
exit;
end;
// Ask the user a Yes/No question, defaulting to No
if MsgBox('To continue, this installer will close any open instances of Rocket League and BakkesMod.'#13#10''#13#10'Is this OK?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
begin
Result := True;
TaskKill('RocketLeague.exe');
TaskKill('BakkesMod.exe');
end;
if Result = False then
begin
MsgBox('Setup has been canceled', mbInformation, MB_OK)
exit;
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrCode: integer;
begin
if ExpandConstant('{param:installfromdll|false}') = 'false' then
begin;
if CurStep = ssPostInstall then
begin;
if MsgBox('BakkesMod is now installed! If you are running into issues, you may need to whitelist it in your AntiVirus.' + #13#10 + #13#10 + 'Do you want to view the documentation on whitelisting?', mbConfirmation, MB_YESNO) = IDYES
then begin
ShellExec('open', 'https://docs.google.com/spreadsheets/d/e/2PACX-1vSLd3OucDGczgvFDa_D4I72MYNVhskJMe-pA8Bi5eFBuCADixLR1QleIE-X8eE_4L-AlLNhIm6A7fTK/pubhtml',
'', '', SW_SHOW, ewNoWait, ErrCode);
end;
end;
end;
end;
[Code]
function InitializeUninstall(): Boolean;
var ErrorCode: Integer;
begin
Result := False;
if MsgBox('To continue uninstalling, this uninstaller will close any open instances of Rocket League and BakkesMod.'#13#10''#13#10'Is this OK?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
begin
Result := True;
TaskKill('RocketLeague.exe');
TaskKill('BakkesMod.exe');
end;
if Result = False then
begin
MsgBox('Uninstall has been canceled', mbInformation, MB_OK)
exit;
end;
end;