123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- ; Script generated by the HM NIS Edit Script Wizard.
- ; HM NIS Edit Wizard helper defines
- !define PRODUCT_NAME "scbc application"
- !define PRODUCT_VERSION "2.0.1.9"
- !define PRODUCT_PUBLISHER "tcl company, Inc."
- !define PRODUCT_WEB_SITE "http://www.tcl.com"
- !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\TCL Copy Tool.exe"
- !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
- !define PRODUCT_UNINST_ROOT_KEY "HKLM"
- Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
- OutFile "Setup${PRODUCT_VERSION}.exe"
- LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
- LoadLanguageFile "${NSISDIR}\Contrib\Language files\SimpChinese.nlf"
- InstallDir "$PROGRAMFILES\scbc application"
- Icon "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
- UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
- InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
- DirText "安装程序将安装 $(^Name) 在下列文件夹。$\r$\n$\r$\n要安装在不同文件夹,单击 [浏览] 并选择其他文件夹。"
- LicenseText "如果你接受所有协议条款,选择 [我愿意] 继续。你必须接受协议才能安装 $(^Name)。."
- LicenseData "Licence.txt"
- ShowInstDetails show
- ShowUnInstDetails show
- ; 安装VC环境
- Function InstallVC
- Push $R0
- ClearErrors
- ;FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4 Visual C++ 2008 runtime files VC 9.0 (x86)
- ;9A25302D-30C0-39D9-BD6F-21E6EC160475 Visual C++ 2008 SP1 runtime files VC 9.0 SP1 (x86)
- ;f50edb7e-c25e-47b4-bc4f-7ec4a4d256b1 Visual C++ 2017 runtime files VC 9.0 SP1 (x86)
- ;ad831ec0-6a55-427f-b75b-341c827ce380 Visual C++ ??? runtime files VC 9.0 SP1 (x86)
- ; vs2008
- ;ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}" "Version"
- ; vs2017
- ;ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ad831ec0-6a55-427f-b75b-341c827ce380}" "Version"
- ; vs2019
- ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5bfc1380-fd35-4b85-9715-7351535d077e}" "Version"
- ; 检测含有vc的注册表信息是否存在
- IfErrors 0 VSRedistInstalled
- Exec "$INSTDIR\vcredist_x86.exe /q" ;若不存在,执行静默安装
- StrCpy $R0 "-1"
- ; MessageBox MB_OK $R0
- VSRedistInstalled:
- ; MessageBox MB_OK "已安装"
- Exch $R0
- ; Delete "$INSTDIR\vcredist_x86."
- FunctionEnd
- Function .onInit
- FunctionEnd
- Section "MainSection" SEC01
- SetOutPath "$INSTDIR"
- ;覆盖旧文件;
- SetOverwrite ifnewer
- File "..\..\..\..\bin\TCL Copy Tool\TCL Copy Tool.exe"
- File "lib\Log4C.dll"
- File "lib\libcurl.dll"
- File "lib\libeay32.dll"
- File "lib\ssleay32.dll"
- File "lib\zlibwapi.dll"
- File "log4crc.xml"
- File "vcredist_x86.exe"
- CreateDirectory "$SMPROGRAMS\scbc application"
- CreateShortCut "$SMPROGRAMS\scbc application\scbc application.lnk" "$INSTDIR\TCL Copy Tool.exe"
- CreateShortCut "$DESKTOP\scbc application.lnk" "$INSTDIR\TCL Copy Tool.exe"
- File "..\..\..\..\bin\rename\rename.exe"
- ;不覆盖config.ini配置文件;
- SetOverwrite off
- File "TCL Copy Tool\config.json"
- SetOutPath "$INSTDIR\log"
- SetOutPath "$INSTDIR\db"
- SetOutPath "$INSTDIR\DataDir"
- SetOutPath "$INSTDIR\DataDir\WB"
- SetOutPath "$INSTDIR\DataDir\CIKEY"
- SetOutPath "$INSTDIR\DataDir\DeviceID"
- SetOutPath "$INSTDIR\DataDir\ESN"
- SetOutPath "$INSTDIR\DataDir\HDCPKEY"
- SetOutPath "$INSTDIR\DataDir\HDCPKEY22"
- SetOutPath "$INSTDIR\DataDir\MAC"
- SetOutPath "$INSTDIR\DataDir\Widevine"
- SetOutPath "$INSTDIR\DataDir\WiDi"
- ;安装VC环境
- Call InstallVC
- SectionEnd
- Section -AdditionalIcons
- WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
- CreateShortCut "$SMPROGRAMS\scbc application\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
- CreateShortCut "$SMPROGRAMS\scbc application\Uninstall.lnk" "$INSTDIR\uninst.exe"
- SectionEnd
- Section -Post
- WriteUninstaller "$INSTDIR\uninst.exe"
- WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\TCL Copy Tool.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\TCL Copy Tool.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
- Delete "$INSTDIR\${PRODUCT_NAME}.url"
- Delete "$INSTDIR\uninst.exe"
- Delete "$INSTDIR\rename.exe"
- Delete "$INSTDIR\TCL Copy Tool.exe"
- Delete "$INSTDIR\config.json"
- Delete "$INSTDIR\Log4C.dll"
- Delete "$SMPROGRAMS\scbc application\Uninstall.lnk"
- Delete "$SMPROGRAMS\scbc application\Website.lnk"
- Delete "$DESKTOP\scbc application.lnk"
- Delete "$SMPROGRAMS\scbc application\scbc application.lnk"
- RMDir "$SMPROGRAMS\scbc application"
- RMDir "$INSTDIR"
- DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
- DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
- SetAutoClose true
- SectionEnd
|