|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- ; ýűʹ HM VNISEdit ű༭
-
- ; װʼ峣
- !define PRODUCT_NAME "MediaTool"
- !define PRODUCT_VERSION "1.0.1"
- !define PRODUCT_PUBLISHER "TH"
- !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\THUploadOss.exe"
- !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
- !define PRODUCT_UNINST_ROOT_KEY "HKLM"
-
- SetCompressor lzma
-
- ; ------ MUI ִ涨 (1.67 汾ϼ) ------
- !include "MUI.nsh"
-
- ; MUI Ԥ峣
- !define MUI_ABORTWARNING
- !define MUI_ICON "D:\CodeBackupPackage\THupload-Oss\THUploadOss\MediaTool.ico"
- !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
-
- ; ӭҳ
- !insertmacro MUI_PAGE_WELCOME
- ; װĿ¼ѡҳ
- !insertmacro MUI_PAGE_DIRECTORY
- ; װҳ
- !insertmacro MUI_PAGE_INSTFILES
- ; װҳ
- !define MUI_FINISHPAGE_RUN "$INSTDIR\THUploadOss.exe"
- !insertmacro MUI_PAGE_FINISH
-
- ; װжعҳ
- !insertmacro MUI_UNPAGE_INSTFILES
-
- ; װ
- !insertmacro MUI_LANGUAGE "SimpChinese"
-
- ; װԤͷļ
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
- ; ------ MUI ִ涨 ------
-
- Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
- OutFile "MediaTool.exe"
- InstallDir "$PROGRAMFILES\MediaTool"
- InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
- ShowInstDetails show
- ShowUnInstDetails show
-
- Section "MainSection" SEC01
- SetOutPath "$INSTDIR"
- SetOverwrite ifnewer
- File /r "D:\CodeBackupPackage\THupload-Oss\THUploadOss\bin\Release\*.*"
- CreateDirectory "$SMPROGRAMS\MediaTool"
- CreateShortCut "$SMPROGRAMS\MediaTool\MediaTool.lnk" "$INSTDIR\THUploadOss.exe"
- CreateShortCut "$DESKTOP\MediaTool.lnk" "$INSTDIR\THUploadOss.exe"
- File "D:\CodeBackupPackage\THupload-Oss\THUploadOss\bin\Release\THUploadOss.exe"
- SectionEnd
-
- Section -AdditionalIcons
- CreateShortCut "$SMPROGRAMS\MediaTool\Uninstall.lnk" "$INSTDIR\uninst.exe"
- SectionEnd
-
- Section -Post
- WriteUninstaller "$INSTDIR\uninst.exe"
- WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\THUploadOss.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\THUploadOss.exe"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
- SectionEnd
-
- /******************************
- * ǰװжز *
- ******************************/
-
- Section Uninstall
- Delete "$INSTDIR\uninst.exe"
- Delete "$INSTDIR\THUploadOss.exe"
-
- Delete "$SMPROGRAMS\MediaTool\Uninstall.lnk"
- Delete "$DESKTOP\MediaTool.lnk"
- Delete "$SMPROGRAMS\MediaTool\MediaTool.lnk"
-
- RMDir "$SMPROGRAMS\MediaTool"
-
- RMDir "$INSTDIR"
-
- DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
- DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
- SetAutoClose true
- SectionEnd
-
- #-- NSIS ű༭ Function α Section ֮дԱⰲװδԤ֪⡣--#
-
- Function un.onInit
- MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "ȷʵҪȫƳ $(^Name) е" IDYES +2
- Abort
- FunctionEnd
-
- Function un.onUninstSuccess
- HideWindow
- MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) ѳɹشļƳ"
- FunctionEnd
|