-
Notifications
You must be signed in to change notification settings - Fork 7
/
installer.nsi
327 lines (259 loc) · 14.1 KB
/
installer.nsi
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
Unicode true
####################################################################
# Includes
!include MUI2.nsh
!include FileFunc.nsh
!include LogicLib.nsh
!insertmacro Locate
Var /GLOBAL switch_overwrite
!include MoveFileFolder.nsh
####################################################################
# File Info
!define PRODUCT_NAME "Extravi's ReShade-Preset"
!define PRODUCT_DESCRIPTION "ReShade presets made by Extravi."
!define COPYRIGHT "Copyright © 2023 sitiom, Extravi"
!define VERSION "7.0.0"
VIProductVersion "${VERSION}.0"
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey "ProductVersion" "${VERSION}"
VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileVersion" "${VERSION}.0"
####################################################################
# Installer Attributes
ManifestDPIAware true
Name "${PRODUCT_NAME}"
Outfile "Setup - ${PRODUCT_NAME}.exe"
Caption "Setup - ${PRODUCT_NAME}"
BrandingText "${PRODUCT_NAME}"
RequestExecutionLevel user
InstallDir "$LOCALAPPDATA\${PRODUCT_NAME}"
####################################################################
# Interface Settings
InstType "Full";1
####################################################################
# Pages
!define MUI_ICON "extravi-reshade.ico"
!define MUI_UNICON "extravi-reshade.ico"
!define MUI_ABORTWARNING
!define MUI_WELCOMEFINISHPAGE_BITMAP "extravi-reshade.bmp"
!define MUI_WELCOMEPAGE_TEXT "This will install ${PRODUCT_NAME} on your computer.$\r$\n\
$\r$\n\
Before continuing, ensure that Roblox is closed. If Roblox is open, the installer will terminate the process before it begins.$\r$\n\
$\r$\n\
There may be issues with the setup. If that's the case, it's recommended that you ask your questions in Extravi's Discord server.$\r$\n\
$\r$\n\
Click Next to continue."
!define MUI_LICENSEPAGE_RADIOBUTTONS
!define MUI_COMPONENTSPAGE_NODESC
!define MUI_FINISHPAGE_TEXT_LARGE
!define MUI_FINISHPAGE_TEXT "Setup has finished installing ${PRODUCT_NAME} on your computer. The effects will be applied the next time you launch Roblox.$\r$\n\
$\r$\n\
Click Finish to exit Setup."
!define MUI_FINISHPAGE_SHOWREADME "https://reshade.me/"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Visit reshade.me"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Subscribe to Extravi on Youtube"
!define MUI_FINISHPAGE_RUN_CHECKED
!define MUI_FINISHPAGE_RUN_FUNCTION "OpenLink"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "Extravi's ReShade-Preset\license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "StartTaskbarProgress"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
####################################################################
# Language
!insertmacro MUI_LANGUAGE "English"
####################################################################
# Sections
Var robloxPath
SpaceTexts none
Section "ReShade (required)"
SectionIn 1 RO
ExecWait "TaskKill /IM RobloxPlayerBeta.exe /F"
SetOutPath $INSTDIR
WriteUninstaller "$INSTDIR\uninstall.exe"
; Uninstall Regkeys
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "DisplayIcon" "$INSTDIR\uninstall.exe"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "DisplayName" "${PRODUCT_NAME}"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "DisplayVersion" "${VERSION}"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "QuietUninstallString" "$INSTDIR\uninstall.exe /S"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "InstallLocation" "$INSTDIR"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets" "Publisher" "Extravi"
NSCurl::http GET "https://github.com/BlueSkyDefender/AstrayFX/archive/refs/heads/master.zip" "AstrayFX-master.zip" /END
nsisunz::Unzip "AstrayFX-master.zip" "$INSTDIR"
Delete "AstrayFX-master.zip"
NSCurl::http GET "https://github.com/BlueSkyDefender/Depth3D/archive/refs/heads/master.zip" "Depth3D-master.zip" /END
nsisunz::Unzip "Depth3D-master.zip" "$INSTDIR"
Delete "Depth3D-master.zip"
NSCurl::http GET "https://github.com/crosire/reshade-shaders/archive/refs/heads/legacy.zip" "reshade-shaders-legacy.zip" /END
nsisunz::Unzip "reshade-shaders-legacy.zip" "$INSTDIR"
Delete "reshade-shaders-legacy.zip"
NSCurl::http GET "https://github.com/crosire/reshade-shaders/archive/refs/heads/master.zip" "reshade-shaders-master.zip" /END
nsisunz::Unzip "reshade-shaders-master.zip" "$INSTDIR"
Delete "reshade-shaders-master.zip"
NSCurl::http GET "https://github.com/prod80/prod80-ReShade-Repository/archive/refs/heads/master.zip" "prod80-ReShade-Repository-master.zip" /END
nsisunz::Unzip "prod80-ReShade-Repository-master.zip" "$INSTDIR"
Delete "prod80-ReShade-Repository-master.zip"
NSCurl::http GET "https://github.com/martymcmodding/qUINT/archive/refs/heads/master.zip" "qUINT-master.zip" /END
nsisunz::Unzip "qUINT-master.zip" "$INSTDIR"
Delete "qUINT-master.zip"
NSCurl::http GET "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip" "dh-reshade-shaders-master.zip" /END
nsisunz::Unzip "dh-reshade-shaders-master.zip" "$INSTDIR"
Delete "dh-reshade-shaders-master.zip"
NSCurl::http GET "https://github.com/rj200/Glamarye_Fast_Effects_for_ReShade/archive/refs/heads/main.zip" "Glamarye_Fast_Effects_for_ReShade-main.zip" /END
nsisunz::Unzip "Glamarye_Fast_Effects_for_ReShade-main.zip" "$INSTDIR"
Delete "Glamarye_Fast_Effects_for_ReShade-main.zip"
NSCurl::http GET "https://github.com/mj-ehsan/NiceGuy-Shaders/archive/refs/heads/main.zip" "NiceGuy-Shaders-main.zip" /END
nsisunz::Unzip "NiceGuy-Shaders-main.zip" "$INSTDIR"
Delete "NiceGuy-Shaders-main.zip"
NSCurl::http GET "https://github.com/CeeJayDK/SweetFX/archive/refs/heads/master.zip" "SweetFX-master.zip" /END
nsisunz::Unzip "SweetFX-master.zip" "$INSTDIR"
Delete "SweetFX-master.zip"
NSCurl::http GET "https://github.com/brussell1/Shaders/archive/refs/heads/master.zip" "Shaders-master.zip" /END
nsisunz::Unzip "Shaders-master.zip" "$INSTDIR"
Delete "Shaders-master.zip"
StrCpy $switch_overwrite 1 $INSTDIR
RMDir /r "$robloxPath\reshade-presets"
RMDir /r "$robloxPath\reshade-shaders"
RMDir /r "$robloxPath\ClientSettings"
Delete "$robloxPath\Reshade.ini"
Delete "$robloxPath\dxgi.dll"
Delete "$robloxPath\reshade.dll"
!insertmacro MoveFolder "$INSTDIR\AstrayFX-master\Shaders" "$robloxPath\reshade-shaders\Shaders\AstrayFX" "*"
!insertmacro MoveFolder "$INSTDIR\AstrayFX-master\Textures" "$robloxPath\reshade-shaders\Textures" "*"
RMDir /r "$INSTDIR\AstrayFX-master"
!insertmacro MoveFolder "$INSTDIR\Depth3D-master\Shaders" "$robloxPath\reshade-shaders\Shaders\Depth3D" "*"
!insertmacro MoveFolder "$INSTDIR\Depth3D-master\Textures" "$robloxPath\reshade-shaders\Textures" "*"
RMDir /r "$INSTDIR\Depth3D-master"
!insertmacro MoveFolder "$INSTDIR\reshade-shaders-legacy\Shaders" "$robloxPath\reshade-shaders\Shaders" "*"
!insertmacro MoveFolder "$INSTDIR\reshade-shaders-legacy\Textures" "$robloxPath\reshade-shaders\Textures" "*"
RMDir /r "$INSTDIR\reshade-shaders-legacy"
!insertmacro MoveFolder "$INSTDIR\prod80-ReShade-Repository-master\Shaders" "$robloxPath\reshade-shaders\Shaders" "*"
!insertmacro MoveFolder "$INSTDIR\prod80-ReShade-Repository-master\Textures" "$robloxPath\reshade-shaders\Textures" "*"
RMDir /r "$INSTDIR\prod80-ReShade-Repository-master"
!insertmacro MoveFolder "$INSTDIR\qUINT-master\Shaders" "$robloxPath\reshade-shaders\Shaders" "*"
RMDir /r "$INSTDIR\qUINT-master"
!insertmacro MoveFolder "$INSTDIR\dh-reshade-shaders-master\Shaders" "$robloxPath\reshade-shaders\Shaders" "*"
!insertmacro MoveFolder "$INSTDIR\dh-reshade-shaders-master\Textures" "$robloxPath\reshade-shaders\Textures" "*"
RMDir /r "$INSTDIR\dh-reshade-shaders-master"
Delete "$robloxPath\reshade-shaders\Shaders\dh_Lain.fx"
Delete "$robloxPath\reshade-shaders\Shaders\dh_rtgi.fx"
!insertmacro MoveFolder "$INSTDIR\Glamarye_Fast_Effects_for_ReShade-main\Shaders" "$robloxPath\reshade-shaders\Shaders" "*"
RMDir /r "$INSTDIR\Glamarye_Fast_Effects_for_ReShade-main"
!insertmacro MoveFolder "$INSTDIR\NiceGuy-Shaders-main" "$robloxPath\reshade-shaders" "*"
RMDir /r "$INSTDIR\NiceGuy-Shaders-main"
!insertmacro MoveFolder "$INSTDIR\SweetFX-master" "$robloxPath\reshade-shaders" "*"
RMDir /r "$INSTDIR\SweetFX-master"
!insertmacro MoveFolder "$INSTDIR\Shaders-master" "$robloxPath\reshade-shaders" "*"
RMDir /r "$INSTDIR\Shaders-master"
NSCurl::http GET "https://github.com/Extravi/extravi.github.io/raw/main/update/dxgi.zip" "dxgi.zip" /END
nsisunz::Unzip "dxgi.zip" "$robloxPath"
Delete "dxgi.zip"
NSCurl::http GET "https://github.com/Extravi/extravi.github.io/raw/main/update/config.zip" "config.zip" /END
nsisunz::Unzip "config.zip" "$robloxPath"
Delete "config.zip"
NSCurl::http GET "https://github.com/Extravi/extravi.github.io/raw/main/update/dependencies.zip" "dependencies.zip" /END
nsisunz::Unzip "dependencies.zip" "$robloxPath\reshade-shaders\Shaders"
Delete "dependencies.zip"
NSCurl::http GET "https://raw.githubusercontent.com/cyrie/Stormshade/master/reshade-shaders/Shaders/MXAO.fx" "$robloxPath\reshade-shaders\Shaders\MXAO.fx" /END
SetOutPath $robloxPath
SectionEnd
SectionGroup /e "Presets"
Section "Extravi's ReShade-Presets"
SectionIn 1
NSCurl::http GET "https://github.com/Extravi/extravi.github.io/raw/main/update/reshade-presets.zip" "reshade-presets.zip" /END
nsisunz::Unzip "reshade-presets.zip" "$robloxPath"
Delete "reshade-presets.zip"
SectionEnd
SectionGroupEnd
SectionGroup /e "rbxfpsunlocker"
Section "rbxfpsunlocker"
SectionIn 1
ExecWait "TaskKill /IM rbxfpsunlocker.exe /F"
NSCurl::http GET "https://github.com/axstin/rbxfpsunlocker/releases/latest/download/rbxfpsunlocker-x64.zip" "rbxfpsunlocker-x64.zip" /END
nsisunz::Unzip "rbxfpsunlocker-x64.zip" "$INSTDIR"
Delete "rbxfpsunlocker-x64.zip"
CreateShortCut "$DESKTOP\Roblox FPS Unlocker.lnk" "$INSTDIR\rbxfpsunlocker.exe"
CreateShortCut "$SMPROGRAMS\Roblox FPS Unlocker.lnk" "$INSTDIR\rbxfpsunlocker.exe"
RMDir /r "$robloxPath\r"
Exec "$INSTDIR\rbxfpsunlocker.exe"
SectionEnd
SectionGroupEnd
Section "uninstall"
${Locate} "$LOCALAPPDATA\Roblox\Versions" "/L=F /M=RobloxPlayerBeta.exe" "un.SetRobloxPath"
ExecWait "TaskKill /IM RobloxPlayerBeta.exe /F"
ExecWait "TaskKill /IM rbxfpsunlocker.exe /F"
Delete "$INSTDIR\rbxfpsunlocker.exe"
Delete "$INSTDIR\settings"
Delete "$robloxPath\settings"
Delete "$INSTDIR\uninstall.exe"
RMDir /r $INSTDIR
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\extravi-reshade-presets"
Delete "$robloxPath\ReShade.ini"
RMDir /r "$robloxPath\reshade-presets"
RMDir /r "$robloxPath\reshade-shaders"
RMDir /r "$robloxPath\ClientSettings"
Delete "$robloxPath\dxgi.dll"
Delete "$robloxPath\ReShade.log"
Delete "$robloxPath\NunitoSans-Regular.ttf"
Delete "$robloxPath\Hack-Regular.ttf"
Delete "$DESKTOP\Roblox FPS Unlocker.lnk"
Delete "$SMPROGRAMS\Roblox FPS Unlocker.lnk"
Delete "$robloxPath\license.txt"
SectionEnd
####################################################################
# Functions
Function .onInit
${Locate} "$PROGRAMFILES\Roblox\Versions" "/L=F /M=RobloxPlayerBeta.exe" "Troubleshoot"
StrCpy $robloxPath ""
${Locate} "$LOCALAPPDATA\Roblox\Versions" "/L=F /M=RobloxPlayerBeta.exe" "SetRobloxPath"
${If} $robloxPath == ""
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Roblox installation not found. Would you like to reinstall Roblox and try again?" IDYES yes
Abort
yes:
NScurl::http GET "https://www.roblox.com/download/client" "$INSTDIR\RobloxPlayerLauncher.exe" /POPUP /END
ExecWait "$INSTDIR\RobloxPlayerLauncher.exe"
MessageBox MB_ICONQUESTION "Roblox has been reinstalled, if that does not seem to be the case, please check your User Account Control settings."
RMDir /r $INSTDIR
Abort
${EndIf}
FunctionEnd
Function "Troubleshoot"
MessageBox MB_YESNO|MB_ICONEXCLAMATION "It seems like Roblox is installed system-wide in the Program Files directory. Would you like to attempt to install again under your own user? Make sure you follow all on-screen instructions, and ensure that Roblox is closed before proceeding." IDYES yes
Abort
yes:
ExecWait "TaskKill /IM RobloxPlayerBeta.exe /F"
MessageBox MB_ICONQUESTION `A User Account Control pop-up will appear, make sure to click "YES".`
${Locate} "$PROGRAMFILES\Roblox\Versions" "/L=F /M=RobloxPlayerBeta.exe" "SetRobloxPath"
ExecWait '"$robloxPath\RobloxPlayerLauncher.exe"" -uninstall'
MessageBox MB_ICONQUESTION "Roblox was removed from C:\Program Files (x86). Now will, attempt to reinstall Roblox."
NScurl::http GET "https://www.roblox.com/download/client" "$INSTDIR\RobloxPlayerLauncher.exe" /POPUP /END
ExecWait "$INSTDIR\RobloxPlayerLauncher.exe"
MessageBox MB_ICONQUESTION "Roblox has been reinstalled, if that does not seem to be the case, please check your User Account Control settings."
RMDir /r $INSTDIR
Abort
FunctionEnd
Function "SetRobloxPath"
SetOutPath $R8
StrCpy $robloxPath $R8
StrCpy $0 StopLocate
Push $0
FunctionEnd
Function "un.SetRobloxPath"
SetOutPath $R8
StrCpy $robloxPath $R8
StrCpy $0 StopLocate
Push $0
FunctionEnd
Function "StartTaskbarProgress"
w7tbp::Start
FunctionEnd
Function "OpenLink"
ExecShell "open" "https://www.youtube.com/channel/UCOZnRzWstxDLyW30TjWEevQ?sub_confirmation=1"
FunctionEnd