-
Notifications
You must be signed in to change notification settings - Fork 508
/
installer.nsi
53 lines (43 loc) · 1.39 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
OutFile "obs-multi-rtmp-setup.exe"
Unicode true
RequestExecutionLevel user
SetDatablockOptimize on
SetCompress auto
SetCompressor /SOLID lzma
Name "obs-multi-rtmp"
Caption "Multiple RTMP Output Plugin for OBS Studio"
Icon "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
Var /Global DefInstDir
Function .onInit
ReadEnvStr $0 "ALLUSERSPROFILE"
StrCpy $DefInstDir "$0\obs-studio\plugins\obs-multi-rtmp"
StrCpy $INSTDIR "$DefInstDir"
IfFileExists "$DefInstDir\*.*" AskUninst DontAskUninst
AskUninst:
MessageBox MB_YESNO|MB_ICONQUESTION "Uninstall obs-multi-rtmp?" IDYES DoUninst IDNO NotDoUninst
DoUninst:
RMDir /r "$DefInstDir"
MessageBox MB_OK|MB_ICONINFORMATION "Done."
Quit
NotDoUninst:
DontAskUninst:
FunctionEnd
Function onDirPageLeave
StrCmp "$INSTDIR" "$DefInstDir" DirNotModified DirModified
DirModified:
MessageBox MB_OK|MB_ICONSTOP "Please don't change the install directory."
Abort
DirNotModified:
FunctionEnd
Page directory "" "" onDirPageLeave
Page instfiles
Section
SetOutPath "$INSTDIR\bin\64bit"
File "release\RelWithDebInfo\obs-plugins\64bit\obs-multi-rtmp.dll"
File "release\RelWithDebInfo\obs-plugins\64bit\obs-multi-rtmp.pdb"
SetOutPath "$INSTDIR\data\locale"
File "release\RelWithDebInfo\data\obs-plugins\obs-multi-rtmp\locale\*.ini"
SectionEnd
Section "Uninstaller"
RMDir /r /REBOOTOK "$INSTDIR\plugins\obs-multi-rtmp"
SectionEnd