【第22期】观点:IT 行业加班,到底有没有价值?

InnoSetup比NSS好用,下面是一些碎片记录

翻译 2017年01月03日 19:45:48




LYYDownloader
5.2
iMath, Inc.
http://mathjoy.lofter.com/post/42208d_7cabd00




E:\自动备份盘\编程\Python\Project\LYYDownloader-qt5\icon256.ico
LYYDownloader5_Setup.exe
去选English,勾选SimpleChinese




E:\自动备份盘\编程\Python\Project\LYYDownloader-qt5\乐影音下载器授权文件.txt




添加tree  E:\自动备份盘\编程\Python\Project\LYYDownloader-qt5\dist\LYYDownloader


cx  :  E:\360云盘\编程\Python\Project\LYYDownloader-qt5\build\exe.win32-3.5








添加头
!include "x64.nsh"




删除下面的内容
  SetOutPath "$INSTDIR\ffmpeg\32"
  File "..\dist\LYYDownloader\ffmpeg\32\ffmpeg.exe"
  SetOutPath "$INSTDIR\ffmpeg\64"
  File "..\dist\LYYDownloader\ffmpeg\64\ffmpeg.exe"
  SetOutPath "$INSTDIR"






那么多行添加文件 的开始添加
Delete "$APPDATA\iMath\LYYDownloader.ini"


的末尾添加
  ${If} ${RunningX64}
    File "..\dist\LYYDownloader\ffmpeg\64\ffmpeg.exe"
  ${Else}
    File "..\dist\LYYDownloader\ffmpeg\32\ffmpeg.exe"
  ${EndIf}
SectionEnd




Website  替换为  软件主页




后面卸载的地方(Delete 和RMDir) 交界处添加添加
  Delete "$APPDATA\iMath\LYYDownloader.ini"      ;一开始那么多行添加文件之前也要有


  RMDir "$APPDATA\iMath\乐影音下载未完成"




替换
  Delete "$INSTDIR\ffmpeg\64\ffmpeg.exe"
  Delete "$INSTDIR\ffmpeg\32\ffmpeg.exe"

Delete "$INSTDIR\ffmpeg.exe"


; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "LYYDownloader"
!define PRODUCT_VERSION "5.2"
!define PRODUCT_PUBLISHER "iMath, Inc."
!define PRODUCT_WEB_SITE "http://mathjoy.lofter.com/post/42208d_7cabd00"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\ffmpeg.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"

; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "x64.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\icon256.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "..\乐影音下载器授权文件.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LYYDownloader"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\LYYDownloader.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\乐影音下载器授权文件.txt"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "SimpChinese"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "LYYDownloader5_Setup.exe"
InstallDir "$PROGRAMFILES\LYYDownloader"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  Delete "$APPDATA\iMath\LYYDownloader.ini"
  File "..\dist\LYYDownloader\api-ms-win-crt-conio-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-convert-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-environment-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-filesystem-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-heap-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-locale-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-math-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-multibyte-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-process-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-runtime-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-stdio-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-string-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-time-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-utility-l1-1-0.dll"
  File "..\dist\LYYDownloader\base_library.zip"
  File "..\dist\LYYDownloader\Crypto.Cipher._AES.cp35-win32.pyd"
  File "..\dist\LYYDownloader\LYYDownloader.exe"
  File "..\dist\LYYDownloader\LYYDownloader.exe.manifest"
  File "..\dist\LYYDownloader\mfc140u.dll"
  File "..\dist\LYYDownloader\MSVCP140.dll"
  File "..\dist\LYYDownloader\pyexpat.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.Qt.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtCore.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtGui.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtNetwork.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtPrintSupport.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtWebSockets.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtWidgets.cp35-win32.pyd"
  File "..\dist\LYYDownloader\python35.dll"
  File "..\dist\LYYDownloader\pythoncom35.dll"
  File "..\dist\LYYDownloader\pywintypes35.dll"
  File "..\dist\LYYDownloader\Qt5Core.dll"
  File "..\dist\LYYDownloader\Qt5Gui.dll"
  File "..\dist\LYYDownloader\Qt5Network.dll"
  File "..\dist\LYYDownloader\Qt5PrintSupport.dll"
  File "..\dist\LYYDownloader\Qt5Svg.dll"
  File "..\dist\LYYDownloader\Qt5WebSockets.dll"
  File "..\dist\LYYDownloader\Qt5Widgets.dll"
  SetOutPath "$INSTDIR\qt5_plugins\bearer"
  File "..\dist\LYYDownloader\qt5_plugins\bearer\qgenericbearer.dll"
  File "..\dist\LYYDownloader\qt5_plugins\bearer\qnativewifibearer.dll"
  SetOutPath "$INSTDIR\qt5_plugins\iconengines"
  File "..\dist\LYYDownloader\qt5_plugins\iconengines\qsvgicon.dll"
  SetOutPath "$INSTDIR\qt5_plugins\imageformats"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qdds.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qgif.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qicns.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qico.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qjpeg.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qsvg.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qtga.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qtiff.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qwbmp.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qwebp.dll"
  SetOutPath "$INSTDIR\qt5_plugins\platforms"
  File "..\dist\LYYDownloader\qt5_plugins\platforms\qminimal.dll"
  File "..\dist\LYYDownloader\qt5_plugins\platforms\qoffscreen.dll"
  File "..\dist\LYYDownloader\qt5_plugins\platforms\qwindows.dll"
  SetOutPath "$INSTDIR\qt5_plugins\printsupport"
  File "..\dist\LYYDownloader\qt5_plugins\printsupport\windowsprintersupport.dll"
  SetOutPath "$INSTDIR"
  File "..\dist\LYYDownloader\qt_zh_CN.qm"
  SetOutPath "$INSTDIR\requests"
  File "..\dist\LYYDownloader\requests\cacert.pem"
  SetOutPath "$INSTDIR"
  File "..\dist\LYYDownloader\select.cp35-win32.pyd"
  File "..\dist\LYYDownloader\sip.cp35-win32.pyd"
  File "..\dist\LYYDownloader\unicodedata.cp35-win32.pyd"
  File "..\dist\LYYDownloader\VCRUNTIME140.dll"
  File "..\dist\LYYDownloader\win32api.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32com.shell.shell.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32evtlog.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32trace.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32ui.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32wnet.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_bz2.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_ctypes.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_decimal.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_hashlib.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_lzma.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_multiprocessing.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_socket.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_ssl.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_win32sysloader.cp35-win32.pyd"
  File "..\dist\LYYDownloader\乐影音下载器授权文件.txt"

; Shortcuts
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\LYYDownloader.lnk" "$INSTDIR\LYYDownloader.exe"
  CreateShortCut "$DESKTOP\LYYDownloader.lnk" "$INSTDIR\LYYDownloader.exe"
  !insertmacro MUI_STARTMENU_WRITE_END
  ${If} ${RunningX64}
    File "..\dist\LYYDownloader\ffmpeg\64\ffmpeg.exe"
  ${Else}
    File "..\dist\LYYDownloader\ffmpeg\32\ffmpeg.exe"
  ${EndIf}
SectionEnd

Section -AdditionalIcons
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\ffmpeg\32\ffmpeg.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\ffmpeg\32\ffmpeg.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
  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
  Delete "$INSTDIR\${PRODUCT_NAME}.url"
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\乐影音下载器授权文件.txt"
  Delete "$INSTDIR\_win32sysloader.cp35-win32.pyd"
  Delete "$INSTDIR\_ssl.cp35-win32.pyd"
  Delete "$INSTDIR\_socket.cp35-win32.pyd"
  Delete "$INSTDIR\_multiprocessing.cp35-win32.pyd"
  Delete "$INSTDIR\_lzma.cp35-win32.pyd"
  Delete "$INSTDIR\_hashlib.cp35-win32.pyd"
  Delete "$INSTDIR\_decimal.cp35-win32.pyd"
  Delete "$INSTDIR\_ctypes.cp35-win32.pyd"
  Delete "$INSTDIR\_bz2.cp35-win32.pyd"
  Delete "$INSTDIR\win32wnet.cp35-win32.pyd"
  Delete "$INSTDIR\win32ui.cp35-win32.pyd"
  Delete "$INSTDIR\win32trace.cp35-win32.pyd"
  Delete "$INSTDIR\win32evtlog.cp35-win32.pyd"
  Delete "$INSTDIR\win32com.shell.shell.cp35-win32.pyd"
  Delete "$INSTDIR\win32api.cp35-win32.pyd"
  Delete "$INSTDIR\VCRUNTIME140.dll"
  Delete "$INSTDIR\unicodedata.cp35-win32.pyd"
  Delete "$INSTDIR\sip.cp35-win32.pyd"
  Delete "$INSTDIR\select.cp35-win32.pyd"
  Delete "$INSTDIR\requests\cacert.pem"
  Delete "$INSTDIR\qt_zh_CN.qm"
  Delete "$INSTDIR\qt5_plugins\printsupport\windowsprintersupport.dll"
  Delete "$INSTDIR\qt5_plugins\platforms\qwindows.dll"
  Delete "$INSTDIR\qt5_plugins\platforms\qoffscreen.dll"
  Delete "$INSTDIR\qt5_plugins\platforms\qminimal.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qwebp.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qwbmp.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qtiff.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qtga.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qsvg.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qjpeg.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qico.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qicns.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qgif.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qdds.dll"
  Delete "$INSTDIR\qt5_plugins\iconengines\qsvgicon.dll"
  Delete "$INSTDIR\qt5_plugins\bearer\qnativewifibearer.dll"
  Delete "$INSTDIR\qt5_plugins\bearer\qgenericbearer.dll"
  Delete "$INSTDIR\Qt5Widgets.dll"
  Delete "$INSTDIR\Qt5WebSockets.dll"
  Delete "$INSTDIR\Qt5Svg.dll"
  Delete "$INSTDIR\Qt5PrintSupport.dll"
  Delete "$INSTDIR\Qt5Network.dll"
  Delete "$INSTDIR\Qt5Gui.dll"
  Delete "$INSTDIR\Qt5Core.dll"
  Delete "$INSTDIR\pywintypes35.dll"
  Delete "$INSTDIR\pythoncom35.dll"
  Delete "$INSTDIR\python35.dll"
  Delete "$INSTDIR\PyQt5.QtWidgets.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtWebSockets.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtPrintSupport.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtNetwork.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtGui.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtCore.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.Qt.cp35-win32.pyd"
  Delete "$INSTDIR\pyexpat.cp35-win32.pyd"
  Delete "$INSTDIR\MSVCP140.dll"
  Delete "$INSTDIR\mfc140u.dll"
  Delete "$INSTDIR\LYYDownloader.exe.manifest"
  Delete "$INSTDIR\LYYDownloader.exe"
  Delete "$INSTDIR\ffmpeg.exe"
  Delete "$INSTDIR\Crypto.Cipher._AES.cp35-win32.pyd"
  Delete "$INSTDIR\base_library.zip"
  Delete "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"
  Delete "$APPDATA\iMath\LYYDownloader.ini"      ;一开始那么多行添加文件之前也要有

  RMDir "$APPDATA\iMath\乐影音下载未完成"
  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
  Delete "$DESKTOP\LYYDownloader.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\LYYDownloader.lnk"

  RMDir "$SMPROGRAMS\$ICONS_GROUP"
  RMDir "$INSTDIR\requests"
  RMDir "$INSTDIR\qt5_plugins\printsupport"
  RMDir "$INSTDIR\qt5_plugins\platforms"
  RMDir "$INSTDIR\qt5_plugins\imageformats"
  RMDir "$INSTDIR\qt5_plugins\iconengines"
  RMDir "$INSTDIR\qt5_plugins\bearer"
  RMDir "$INSTDIR\ffmpeg\64"
  RMDir "$INSTDIR\ffmpeg\32"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd



; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "LYYDownloader"
!define PRODUCT_VERSION "5.2"
!define PRODUCT_PUBLISHER "iMath, Inc."
!define PRODUCT_WEB_SITE "http://mathjoy.lofter.com/post/42208d_7cabd00"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\ffmpeg.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"

; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "x64.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\icon256.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "..\乐影音下载器授权文件.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "乐影音下载器"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\LYYDownloader.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\乐影音下载器授权文件.txt"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "SimpChinese"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "LYYDownloader5_Setup.exe"
InstallDir "$PROGRAMFILES\LYYDownloader"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  Delete "$APPDATA\iMath\LYYDownloader.ini"
  File "..\dist\LYYDownloader\api-ms-win-crt-conio-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-convert-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-environment-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-filesystem-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-heap-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-locale-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-math-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-multibyte-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-process-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-runtime-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-stdio-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-string-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-time-l1-1-0.dll"
  File "..\dist\LYYDownloader\api-ms-win-crt-utility-l1-1-0.dll"
  File "..\dist\LYYDownloader\base_library.zip"
  File "..\dist\LYYDownloader\Crypto.Cipher._AES.cp35-win32.pyd"
  File "..\dist\LYYDownloader\LYYDownloader.exe"
  File "..\dist\LYYDownloader\LYYDownloader.exe.manifest"
  File "..\dist\LYYDownloader\mfc140u.dll"
  File "..\dist\LYYDownloader\MSVCP140.dll"
  File "..\dist\LYYDownloader\pyexpat.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.Qt.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtCore.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtGui.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtNetwork.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtPrintSupport.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtWebSockets.cp35-win32.pyd"
  File "..\dist\LYYDownloader\PyQt5.QtWidgets.cp35-win32.pyd"
  File "..\dist\LYYDownloader\python35.dll"
  File "..\dist\LYYDownloader\pythoncom35.dll"
  File "..\dist\LYYDownloader\pywintypes35.dll"
  File "..\dist\LYYDownloader\Qt5Core.dll"
  File "..\dist\LYYDownloader\Qt5Gui.dll"
  File "..\dist\LYYDownloader\Qt5Network.dll"
  File "..\dist\LYYDownloader\Qt5PrintSupport.dll"
  File "..\dist\LYYDownloader\Qt5Svg.dll"
  File "..\dist\LYYDownloader\Qt5WebSockets.dll"
  File "..\dist\LYYDownloader\Qt5Widgets.dll"
  SetOutPath "$INSTDIR\qt5_plugins\bearer"
  File "..\dist\LYYDownloader\qt5_plugins\bearer\qgenericbearer.dll"
  File "..\dist\LYYDownloader\qt5_plugins\bearer\qnativewifibearer.dll"
  SetOutPath "$INSTDIR\qt5_plugins\iconengines"
  File "..\dist\LYYDownloader\qt5_plugins\iconengines\qsvgicon.dll"
  SetOutPath "$INSTDIR\qt5_plugins\imageformats"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qdds.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qgif.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qicns.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qico.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qjpeg.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qsvg.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qtga.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qtiff.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qwbmp.dll"
  File "..\dist\LYYDownloader\qt5_plugins\imageformats\qwebp.dll"
  SetOutPath "$INSTDIR\qt5_plugins\platforms"
  File "..\dist\LYYDownloader\qt5_plugins\platforms\qminimal.dll"
  File "..\dist\LYYDownloader\qt5_plugins\platforms\qoffscreen.dll"
  File "..\dist\LYYDownloader\qt5_plugins\platforms\qwindows.dll"
  SetOutPath "$INSTDIR\qt5_plugins\printsupport"
  File "..\dist\LYYDownloader\qt5_plugins\printsupport\windowsprintersupport.dll"
  SetOutPath "$INSTDIR"
  File "..\dist\LYYDownloader\qt_zh_CN.qm"
  SetOutPath "$INSTDIR\requests"
  File "..\dist\LYYDownloader\requests\cacert.pem"
  SetOutPath "$INSTDIR"
  File "..\dist\LYYDownloader\select.cp35-win32.pyd"
  File "..\dist\LYYDownloader\sip.cp35-win32.pyd"
  File "..\dist\LYYDownloader\unicodedata.cp35-win32.pyd"
  File "..\dist\LYYDownloader\VCRUNTIME140.dll"
  File "..\dist\LYYDownloader\win32api.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32com.shell.shell.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32evtlog.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32trace.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32ui.cp35-win32.pyd"
  File "..\dist\LYYDownloader\win32wnet.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_bz2.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_ctypes.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_decimal.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_hashlib.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_lzma.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_multiprocessing.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_socket.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_ssl.cp35-win32.pyd"
  File "..\dist\LYYDownloader\_win32sysloader.cp35-win32.pyd"
  File "..\dist\LYYDownloader\乐影音下载器授权文件.txt"

; Shortcuts
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\LYYDownloader.lnk" "$INSTDIR\LYYDownloader.exe"
  CreateShortCut "$DESKTOP\LYYDownloader.lnk" "$INSTDIR\LYYDownloader.exe"
  !insertmacro MUI_STARTMENU_WRITE_END
  ${If} ${RunningX64}
    File "..\dist\LYYDownloader\ffmpeg\64\ffmpeg.exe"
  ${Else}
    File "..\dist\LYYDownloader\ffmpeg\32\ffmpeg.exe"
  ${EndIf}
SectionEnd

Section -AdditionalIcons
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\LYYDownloader.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\LYYDownloader.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
  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
  Delete "$INSTDIR\${PRODUCT_NAME}.url"
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\乐影音下载器授权文件.txt"
  Delete "$INSTDIR\_win32sysloader.cp35-win32.pyd"
  Delete "$INSTDIR\_ssl.cp35-win32.pyd"
  Delete "$INSTDIR\_socket.cp35-win32.pyd"
  Delete "$INSTDIR\_multiprocessing.cp35-win32.pyd"
  Delete "$INSTDIR\_lzma.cp35-win32.pyd"
  Delete "$INSTDIR\_hashlib.cp35-win32.pyd"
  Delete "$INSTDIR\_decimal.cp35-win32.pyd"
  Delete "$INSTDIR\_ctypes.cp35-win32.pyd"
  Delete "$INSTDIR\_bz2.cp35-win32.pyd"
  Delete "$INSTDIR\win32wnet.cp35-win32.pyd"
  Delete "$INSTDIR\win32ui.cp35-win32.pyd"
  Delete "$INSTDIR\win32trace.cp35-win32.pyd"
  Delete "$INSTDIR\win32evtlog.cp35-win32.pyd"
  Delete "$INSTDIR\win32com.shell.shell.cp35-win32.pyd"
  Delete "$INSTDIR\win32api.cp35-win32.pyd"
  Delete "$INSTDIR\VCRUNTIME140.dll"
  Delete "$INSTDIR\unicodedata.cp35-win32.pyd"
  Delete "$INSTDIR\sip.cp35-win32.pyd"
  Delete "$INSTDIR\select.cp35-win32.pyd"
  Delete "$INSTDIR\requests\cacert.pem"
  Delete "$INSTDIR\qt_zh_CN.qm"
  Delete "$INSTDIR\qt5_plugins\printsupport\windowsprintersupport.dll"
  Delete "$INSTDIR\qt5_plugins\platforms\qwindows.dll"
  Delete "$INSTDIR\qt5_plugins\platforms\qoffscreen.dll"
  Delete "$INSTDIR\qt5_plugins\platforms\qminimal.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qwebp.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qwbmp.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qtiff.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qtga.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qsvg.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qjpeg.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qico.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qicns.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qgif.dll"
  Delete "$INSTDIR\qt5_plugins\imageformats\qdds.dll"
  Delete "$INSTDIR\qt5_plugins\iconengines\qsvgicon.dll"
  Delete "$INSTDIR\qt5_plugins\bearer\qnativewifibearer.dll"
  Delete "$INSTDIR\qt5_plugins\bearer\qgenericbearer.dll"
  Delete "$INSTDIR\Qt5Widgets.dll"
  Delete "$INSTDIR\Qt5WebSockets.dll"
  Delete "$INSTDIR\Qt5Svg.dll"
  Delete "$INSTDIR\Qt5PrintSupport.dll"
  Delete "$INSTDIR\Qt5Network.dll"
  Delete "$INSTDIR\Qt5Gui.dll"
  Delete "$INSTDIR\Qt5Core.dll"
  Delete "$INSTDIR\pywintypes35.dll"
  Delete "$INSTDIR\pythoncom35.dll"
  Delete "$INSTDIR\python35.dll"
  Delete "$INSTDIR\PyQt5.QtWidgets.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtWebSockets.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtPrintSupport.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtNetwork.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtGui.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.QtCore.cp35-win32.pyd"
  Delete "$INSTDIR\PyQt5.Qt.cp35-win32.pyd"
  Delete "$INSTDIR\pyexpat.cp35-win32.pyd"
  Delete "$INSTDIR\MSVCP140.dll"
  Delete "$INSTDIR\mfc140u.dll"
  Delete "$INSTDIR\LYYDownloader.exe.manifest"
  Delete "$INSTDIR\LYYDownloader.exe"
  Delete "$INSTDIR\ffmpeg.exe"
  Delete "$INSTDIR\Crypto.Cipher._AES.cp35-win32.pyd"
  Delete "$INSTDIR\base_library.zip"
  Delete "$INSTDIR\api-ms-win-crt-utility-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-time-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-string-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-process-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-multibyte-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-filesystem-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-environment-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-convert-l1-1-0.dll"
  Delete "$INSTDIR\api-ms-win-crt-conio-l1-1-0.dll"

  Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
  Delete "$DESKTOP\LYYDownloader.lnk"
  Delete "$SMPROGRAMS\$ICONS_GROUP\LYYDownloader.lnk"
  Delete "$APPDATA\iMath\LYYDownloader.ini"      ;一开始那么多行添加文件之前也要有

  RMDir "$APPDATA\iMath\乐影音下载未完成"
  RMDir "$SMPROGRAMS\$ICONS_GROUP"
  RMDir "$INSTDIR\requests"
  RMDir "$INSTDIR\qt5_plugins\printsupport"
  RMDir "$INSTDIR\qt5_plugins\platforms"
  RMDir "$INSTDIR\qt5_plugins\imageformats"
  RMDir "$INSTDIR\qt5_plugins\iconengines"
  RMDir "$INSTDIR\qt5_plugins\bearer"
  RMDir "$INSTDIR\ffmpeg\64"
  RMDir "$INSTDIR\ffmpeg\32"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd



; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "LYYDownloader"
!define PRODUCT_VERSION "5.0"
!define PRODUCT_PUBLISHER "iMath, Inc."
!define PRODUCT_WEB_SITE "http://mathjoy.lofter.com/post/42208d_7cabd00"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\LYYDownloader.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "x64.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\icon256.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "..\..\LYYDownloader\乐影音下载器授权文件.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\LYYDownloader.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\乐影音下载器授权文件.txt"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "SimpChinese"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "LYYDownloader5_Setup.exe"
InstallDir "$PROGRAMFILES\LYYDownloader"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  Delete "$APPDATA\iMath\LYYDownloader.ini"
  SetOutPath "$INSTDIR\imageformats"
  File "..\build\exe.win32-3.5\imageformats\qdds.dll"
  File "..\build\exe.win32-3.5\imageformats\qgif.dll"
  File "..\build\exe.win32-3.5\imageformats\qicns.dll"
  File "..\build\exe.win32-3.5\imageformats\qico.dll"
  File "..\build\exe.win32-3.5\imageformats\qjpeg.dll"
  File "..\build\exe.win32-3.5\imageformats\qsvg.dll"
  File "..\build\exe.win32-3.5\imageformats\qtga.dll"
  File "..\build\exe.win32-3.5\imageformats\qtiff.dll"
  File "..\build\exe.win32-3.5\imageformats\qwbmp.dll"
  File "..\build\exe.win32-3.5\imageformats\qwebp.dll"
  SetOutPath "$INSTDIR"
  File "..\build\exe.win32-3.5\LYYDownloader.exe"
  CreateDirectory "$SMPROGRAMS\乐影音下载器"
  CreateShortCut "$SMPROGRAMS\乐影音下载器\LYYDownloader.lnk" "$INSTDIR\LYYDownloader.exe"
  CreateShortCut "$DESKTOP\LYYDownloader.lnk" "$INSTDIR\LYYDownloader.exe"
  File "..\build\exe.win32-3.5\MSVCP140.dll"
  SetOutPath "$INSTDIR\platforms"
  File "..\build\exe.win32-3.5\platforms\qminimal.dll"
  File "..\build\exe.win32-3.5\platforms\qoffscreen.dll"
  File "..\build\exe.win32-3.5\platforms\qwindows.dll"
  SetOutPath "$INSTDIR"
  File "..\build\exe.win32-3.5\pyexpat.pyd"
  File "..\build\exe.win32-3.5\PyQt5.QtCore.pyd"
  File "..\build\exe.win32-3.5\PyQt5.QtGui.pyd"
  File "..\build\exe.win32-3.5\PyQt5.QtNetwork.pyd"
  File "..\build\exe.win32-3.5\PyQt5.QtWebSockets.pyd"
  File "..\build\exe.win32-3.5\PyQt5.QtWidgets.pyd"
  File "..\build\exe.win32-3.5\python35.dll"
  File "..\build\exe.win32-3.5\python35.zip"
  File "..\build\exe.win32-3.5\pythoncom35.dll"
  File "..\build\exe.win32-3.5\pywintypes35.dll"
  File "..\build\exe.win32-3.5\Qt5Core.dll"
  File "..\build\exe.win32-3.5\Qt5Gui.dll"
  File "..\build\exe.win32-3.5\Qt5Network.dll"
  File "..\build\exe.win32-3.5\Qt5Svg.dll"
  File "..\build\exe.win32-3.5\Qt5WebSockets.dll"
  File "..\build\exe.win32-3.5\Qt5Widgets.dll"
  File "..\build\exe.win32-3.5\qt_zh_CN.qm"
  File "..\build\exe.win32-3.5\select.pyd"
  File "..\build\exe.win32-3.5\sip.pyd"
  File "..\build\exe.win32-3.5\unicodedata.pyd"
  File "..\build\exe.win32-3.5\VCRUNTIME140.dll"
  File "..\build\exe.win32-3.5\win32api.pyd"
  File "..\build\exe.win32-3.5\win32com.shell.shell.pyd"
  File "..\build\exe.win32-3.5\win32wnet.pyd"
  File "..\build\exe.win32-3.5\_bz2.pyd"
  File "..\build\exe.win32-3.5\_ctypes.pyd"
  File "..\build\exe.win32-3.5\_decimal.pyd"
  File "..\build\exe.win32-3.5\_hashlib.pyd"
  File "..\build\exe.win32-3.5\_lzma.pyd"
  File "..\build\exe.win32-3.5\_multiprocessing.pyd"
  File "..\build\exe.win32-3.5\_socket.pyd"
  File "..\build\exe.win32-3.5\_ssl.pyd"
  File "..\build\exe.win32-3.5\乐影音下载器授权文件.txt"
  ${If} ${RunningX64}
    File "..\dist\LYYDownloader\ffmpeg\64\ffmpeg.exe"
  ${Else}
    File "..\dist\LYYDownloader\ffmpeg\32\ffmpeg.exe"
  ${EndIf}
SectionEnd

Section -AdditionalIcons
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\乐影音下载器\软件主页.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\ffmpeg\32\ffmpeg.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\ffmpeg\32\ffmpeg.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\乐影音下载器授权文件.txt"
  Delete "$INSTDIR\_ssl.pyd"
  Delete "$INSTDIR\_socket.pyd"
  Delete "$INSTDIR\_multiprocessing.pyd"
  Delete "$INSTDIR\_lzma.pyd"
  Delete "$INSTDIR\_hashlib.pyd"
  Delete "$INSTDIR\_decimal.pyd"
  Delete "$INSTDIR\_ctypes.pyd"
  Delete "$INSTDIR\_bz2.pyd"
  Delete "$INSTDIR\win32wnet.pyd"
  Delete "$INSTDIR\win32com.shell.shell.pyd"
  Delete "$INSTDIR\win32api.pyd"
  Delete "$INSTDIR\VCRUNTIME140.dll"
  Delete "$INSTDIR\unicodedata.pyd"
  Delete "$INSTDIR\sip.pyd"
  Delete "$INSTDIR\select.pyd"
  Delete "$INSTDIR\qt_zh_CN.qm"
  Delete "$INSTDIR\Qt5Widgets.dll"
  Delete "$INSTDIR\Qt5WebSockets.dll"
  Delete "$INSTDIR\Qt5Svg.dll"
  Delete "$INSTDIR\Qt5Network.dll"
  Delete "$INSTDIR\Qt5Gui.dll"
  Delete "$INSTDIR\Qt5Core.dll"
  Delete "$INSTDIR\pywintypes35.dll"
  Delete "$INSTDIR\pythoncom35.dll"
  Delete "$INSTDIR\python35.zip"
  Delete "$INSTDIR\python35.dll"
  Delete "$INSTDIR\PyQt5.QtWidgets.pyd"
  Delete "$INSTDIR\PyQt5.QtWebSockets.pyd"
  Delete "$INSTDIR\PyQt5.QtNetwork.pyd"
  Delete "$INSTDIR\PyQt5.QtGui.pyd"
  Delete "$INSTDIR\PyQt5.QtCore.pyd"
  Delete "$INSTDIR\pyexpat.pyd"
  Delete "$INSTDIR\platforms\qwindows.dll"
  Delete "$INSTDIR\platforms\qoffscreen.dll"
  Delete "$INSTDIR\platforms\qminimal.dll"
  Delete "$INSTDIR\MSVCP140.dll"
  Delete "$INSTDIR\LYYDownloader.exe"
  Delete "$INSTDIR\imageformats\qwebp.dll"
  Delete "$INSTDIR\imageformats\qwbmp.dll"
  Delete "$INSTDIR\imageformats\qtiff.dll"
  Delete "$INSTDIR\imageformats\qtga.dll"
  Delete "$INSTDIR\imageformats\qsvg.dll"
  Delete "$INSTDIR\imageformats\qjpeg.dll"
  Delete "$INSTDIR\imageformats\qico.dll"
  Delete "$INSTDIR\imageformats\qicns.dll"
  Delete "$INSTDIR\imageformats\qgif.dll"
  Delete "$INSTDIR\imageformats\qdds.dll"
  Delete "$INSTDIR\ffmpeg\64\ffmpeg.exe"
  Delete "$INSTDIR\ffmpeg\32\ffmpeg.exe"

  Delete "$SMPROGRAMS\乐影音下载器\Uninstall.lnk"
  Delete "$SMPROGRAMS\乐影音下载器\软件主页.lnk"
  Delete "$DESKTOP\LYYDownloader.lnk"
  Delete "$SMPROGRAMS\乐影音下载器\LYYDownloader.lnk"
  Delete "$APPDATA\iMath\LYYDownloader.ini"      ;一开始那么多行添加文件之前也要有

  RMDir "$APPDATA\iMath\乐影音下载未完成"
  RMDir "$SMPROGRAMS\乐影音下载器"
  RMDir "$INSTDIR\platforms"
  RMDir "$INSTDIR\imageformats"
  Delete "$INSTDIR\ffmpeg.exe"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd


举报

相关文章推荐

怎样发布程序

发布程序的方法很多.如果你只想直接在别人电脑上运行,就不用下载发布程序的软件了.如果想打包软件,并且可以在别的电脑上安装使用,则需要下载第三方发布软件.有一个免费的发布软件叫做Inno Setup. ...

未加载mfc120ud.i386.pdb:VS2013调试MFC程序解决方法

刚使用VS2013时,想转入MFC库函数发现无法调试MFC代码。VS2013提示如下: 网上查了一下才得知,VS2013不像以前的VS版本一样自带MFC的pdb文件。但是微软提供了Microso...

程序员升职加薪指南!还缺一个“证”!

CSDN出品,立即查看!

C:\Windows\system32\MFC42u.dll没有被指定在Windows上运行?

最近一位朋友的电脑上Windows 7在运行程序时经常出现错误提示: 用FileInfo提取C:\Windows\system32\MFC42u.dll的信息如下:文件说明符 : C:\Windows...

MFC学习总结 (67个技巧)

1."属性页的添加:创建对话框的类,该类要从CpropertyPage继承;然后在要添加该对话框为属性页的类(头文件)里创建CpropertySheet类的一个对象m_tabsheet和新创建的对话框...

Inno Setup与NSIS的比较

Inno Setup和NSIS都很有名气、很不错的开源安装包制作工具。1. 入门难度,说实话两者都不难学,文档都挺齐全的,而且都有现成的例子供学习参考。再不济,可以在网上找到相应的社区论坛上寻求帮助。...
  • jally
  • jally
  • 2010-01-12 16:36
  • 4945

分享一个使用NSIS制作安装包的UI插件

做软件开发以来,接触的安装包制作方式也有几种了,从最原始的MSI安装包方式,到InnoSetup,再到NSIS;但一直都是使用其脚本功能,并没有在界面上做一些美化操作。   很早之前就想做...

NSIS安装制作基础教程[初级篇], 献给对NSIS有兴趣的初学者

NSIS简介:   NSIS 是“Nullsoft 脚本安装系统”(Nullsoft Scriptable Installation System)的缩写,它是一个免费的 Win32 安装、卸载系统...

一些常用软件静默安装参数(nsis,msi,InstallShield ,Inno)

有时我们在安装程序的时候,希望是静默安装的,不显示下一步下一步,这编访问来教大家如何来操作,现在常用的制作安装程序的软件有,   Microsoft Windows Installer , Windo...

一些常用软件静默安装参数(nsis,msi,InstallShield ,Inno)

打包的时候,经常需要安装一些其它的环境库,而又不想让用户繁锁的去选择,这时就需要静默安装,而不同的文件所加的参数了不一致,比如VS的环境库vcredist_x86.exe(这是32位的环境库)后面加/...

InnoSetup教程

使 用 笔 记 1、Inno Setup 是什么? Inno Setup 是一个免费的 Windows 安装程序制作软件。第一次发表是在 1997 年,Inno Setup 今天在功能设置和稳...
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)