; Script generated by the HM NIS Edit Script Wizard.


; HM NIS Edit Wizard helper defines

!define PRODUCT_NAME "모과이캠"

!define PRODUCT_VERSION "1.0"

!define PRODUCT_PUBLISHER "문랩, Inc."

!define PRODUCT_WEB_SITE "http://www.mycompany.com"

!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\vcredist_x86.exe"

!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"

!define PRODUCT_UNINST_ROOT_KEY "HKLM"

BrandingText "문랩 모과이캠"

; MUI 1.67 compatible ------

!include "MUI.nsh"


; MUI Settings

!define MUI_ABORTWARNING

!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"

!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"


; Welcome page

!insertmacro MUI_PAGE_WELCOME

; License page

!insertmacro MUI_PAGE_LICENSE "..\lisence\moguwai.txt"

; Directory page

!insertmacro MUI_PAGE_DIRECTORY

; Instfiles page

!insertmacro MUI_PAGE_INSTFILES

; Finish page

!define MUI_FINISHPAGE_RUN "$INSTDIR\MOGUWAICam.exe"

!insertmacro MUI_PAGE_FINISH


; Uninstaller pages

!insertmacro MUI_UNPAGE_INSTFILES


; Language files

!insertmacro MUI_LANGUAGE "Korean"


; MUI end ------


Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"

OutFile "MOGUWAICamSetup.exe"

InstallDir "$PROGRAMFILES\MOONLAB\MOGUWAICam"

InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""

ShowInstDetails show

ShowUnInstDetails show


Section "MainSection" SEC01

  SetOutPath "$INSTDIR"

  SetOverwrite ifnewer

  File "..\vccorlib120.dll"

  File "..\msvcr120.dll"

  File "..\msvcp120.dll"

  File "..\mfc120u.dll"

  File "..\mfc120.dll"

  File "..\opencv_core248.dll"

  File "..\opencv_highgui248.dll"

  File "..\screen-capture-recorder.dll"

  File "..\vcredist_x86.exe"

  File "..\audio_sniffer.dll"

  File "..\ffmpeg.exe"

  File "..\MOGUWAICam.exe"

  ExecWait "$INSTDIR\vcredist_x86.exe /q"

  RegDLL "$INSTDIR\audio_sniffer.dll"

  RegDLL "$INSTDIR\screen-capture-recorder.dll"

  CreateDirectory "$SMPROGRAMS\모과이캠"

  CreateShortCut "$SMPROGRAMS\모과이캠\모과이캠.lnk" "$INSTDIR\MOGUWAICam.exe"

  CreateShortCut "$DESKTOP\모과이캠.lnk" "$INSTDIR\MOGUWAICam.exe"

SectionEnd


Section -AdditionalIcons

  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"

  CreateShortCut "$SMPROGRAMS\모과이캠\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"

  CreateShortCut "$SMPROGRAMS\모과이캠\Uninstall.lnk" "$INSTDIR\uninst.exe"

SectionEnd


Section -Post

  WriteUninstaller "$INSTDIR\uninst.exe"

  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vcredist_x86.exe"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\vcredist_x86.exe"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"

SectionEnd



Function un.onUninstSuccess

  HideWindow

  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name)는(은) 완전히 제거되었습니다."

FunctionEnd


Function un.onInit

  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(^Name)을(를) 제거하시겠습니까?" IDYES +2

  Abort

FunctionEnd


Section Uninstall

  UnRegDLL "$INSTDIR\audio_sniffer.dll"

  UnRegDLL "$INSTDIR\screen-capture-recorder.dll"

  Delete "$INSTDIR\${PRODUCT_NAME}.url"

  Delete "$INSTDIR\uninst.exe"

  Delete "$INSTDIR\MOGUWAICam.exe"

  Delete "$INSTDIR\ffmpeg.exe"

  Delete "$INSTDIR\audio_sniffer.dll"

  Delete "$INSTDIR\vcredist_x86.exe"

  Delete "$INSTDIR\screen-capture-recorder.dll"

  Delete "$INSTDIR\opencv_highgui248.dll"

  Delete "$INSTDIR\opencv_core248.dll"

  Delete "$INSTDIR\mfc120.dll"

  Delete "$INSTDIR\mfc120u.dll"

  Delete "$INSTDIR\msvcp120.dll"

  Delete "$INSTDIR\msvcr120.dll"

  Delete "$INSTDIR\vccorlib120.dll"


  Delete "$SMPROGRAMS\모과이캠\Uninstall.lnk"

  Delete "$SMPROGRAMS\모과이캠\Website.lnk"

  Delete "$DESKTOP\모과이캠.lnk"

  Delete "$SMPROGRAMS\모과이캠\모과이캠.lnk"


  RMDir "$SMPROGRAMS\모과이캠"

  RMDir "$INSTDIR"


  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"

  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"

  SetAutoClose true

SectionEnd

Posted by 모과이IT
,