HaaliReader.nsi
上传用户:hmc_gdtv
上传日期:2013-08-04
资源大小:798k
文件大小:3k
- ; Default names
- !ifndef NAME
- !define NAME "Haali Reader CE"
- !endif
- !ifndef NSPNAME
- !define NSPNAME "HaaliReaderCE"
- !endif
- !ifndef VENDOR
- !define VENDOR "Haali"
- !endif
- !ifndef VERSION
- !define VERSION "2.0"
- !endif
- Name "${NAME}"
- ; Use the new UI
- !include "MUI.nsh"
- ; MUI settings
- !define MUI_ICON "${NSISDIR}ContribGraphicsIconswin-install.ico"
- !define MUI_UNICON "${NSISDIR}ContribGraphicsIconswin-uninstall.ico"
- ; The file to write
- OutFile "${NAME} v${VERSION} Setup.exe"
- ; The default installation directory
- InstallDir "$PROGRAMFILES${VENDOR}${NAME}"
- InstallDirRegKey HKLM "SOFTWARE${VENDOR}${NSPNAME}" "InstallDir"
- ; Insert MUI
- !insertmacro MUI_PAGE_WELCOME
- !insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
- !insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_PAGE_FINISH
- !insertmacro MUI_UNPAGE_WELCOME
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
- !insertmacro MUI_UNPAGE_FINISH
- !insertmacro MUI_LANGUAGE "English"
- Section "Haali Reader"
- SetOutPath $INSTDIR
- ; check for appmgr
- ReadRegStr $0 HKLM "SOFTWAREMicrosoftWindowsCurrentVersionApp PathsCEAPPMGR.EXE" ""
- StrCmp $0 "" 0 okmgr
- Abort "CE App Manager not found!"
- okmgr:
-
- File "HaaliReader.ARM.PPC.CAB"
- File "HaaliReader.MIPS.PPC.CAB"
- File "HaaliReader.SH3.PPC.CAB"
- File "HaaliReader.ini"
- ; Write the installation path into the registry
- WriteRegStr HKLM "SOFTWARE${VENDOR}${NSPNAME}" "InstallDir" "$INSTDIR"
- ; Uninstall info
- WriteRegStr HKLM "SoftwareMicrosoftWindowsCurrentVersionUninstall${VENDOR}${NSPNAME}" "DisplayName" "${NAME} ${VERSION} (remove only)"
- WriteRegStr HKLM "SoftwareMicrosoftWindowsCurrentVersionUninstall${VENDOR}${NSPNAME}" "UninstallString" '"$INSTDIRuninstall.exe"'
- ; uninstall program
- WriteUninstaller "uninstall.exe"
- ; run ce app mgr
- Exec '"$0" "$INSTDIRHaaliReader.ini"'
- IfErrors noclose
- SetAutoClose true
- noclose:
- SectionEnd
- Section "Uninstall"
- ; remove registry keys
- DeleteRegKey HKLM "SoftwareMicrosoftWindowsCurrentVersionUninstall${VENDOR}${NSPNAME}"
- DeleteRegKey HKLM "SOFTWARE${VENDOR}${NSPNAME}"
- ; remove files
- Delete "$INSTDIRHaaliReader.ini"
- Delete "$INSTDIRHaaliReader.ARM.PPC.CAB"
- Delete "$INSTDIRHaaliReader.MIPS.PPC.CAB"
- Delete "$INSTDIRHaaliReader.MIPS.PsPC.CAB"
- Delete "$INSTDIRHaaliReader.SH3.PPC.CAB"
- Delete "$INSTDIRHaaliReader.SH3.PsPC.CAB"
- ; MUST REMOVE UNINSTALLER, too
- Delete "$INSTDIRuninstall.exe"
- RMDir "$INSTDIR"
- IfErrors noclose
- SetAutoClose true
- noclose:
- SectionEnd
- ; eof