Skip to content

Commit

Permalink
include uninstaller.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorayuki committed Mar 14, 2021
1 parent c409f5c commit 3843bb9
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions installer_script/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,38 @@ RequestExecutionLevel user

SetDatablockOptimize on
SetCompress auto
SetCompressor /FINAL /SOLID lzma
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 $INSTDIR "$0\obs-studio\plugins\obs-multi-rtmp"
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

Page directory
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
Expand Down

0 comments on commit 3843bb9

Please sign in to comment.