1 !define PRODUCT_NAME
"lsnes"
2 !define PRODUCT_VERSION
"rr1-delta18epsilon3"
3 !define PRODUCT_PUBLISHER
"Ilari"
4 !define PRODUCT_WEB_SITE
"http://tasvideos.org/Lsnes.html"
5 !define PRODUCT_UNINST_KEY
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
6 !define PRODUCT_UNINST_ROOT_KEY
"HKLM"
8 !define INSTALL_DIR
"lsnes"
10 SetCompressor
/SOLID lzma
11 BrandingText "${PRODUCT_NAME} ${PRODUCT_VERSION} Installer"
12 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
13 OutFile "${PRODUCT_NAME}-${PRODUCT_VERSION}-installer.exe"
14 InstallDir "$PROGRAMFILES\${INSTALL_DIR}"
15 InstallDirRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DIR"
17 ShowUnInstDetails show
18 RequestExecutionLevel admin
;Request elevated privileges for Windows 6.x+
20 ; MUI 1.67 compatible ------
24 !define MUI_ABORTWARNING
25 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
26 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
29 !define MUI_LICENSEPAGE_CHECKBOX
30 !insertmacro MUI_PAGE_LICENSE
"COPYING.GPL"
31 !define MUI_LICENSEPAGE_CHECKBOX
32 !insertmacro MUI_PAGE_LICENSE
"COPYING.GPL3"
34 !insertmacro MUI_PAGE_DIRECTORY
36 !insertmacro MUI_PAGE_INSTFILES
38 !define MUI_FINISHPAGE_SHOWREADME
"$INSTDIR\manual.txt"
39 !insertmacro MUI_PAGE_FINISH
42 !insertmacro MUI_UNPAGE_INSTFILES
44 !insertmacro MUI_LANGUAGE
"English"
46 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
50 Section "Main installer files" SEC01
51 SetShellVarContext all
56 File "lsnesgb-sdl.exe"
57 File "lsnesgb-wxwidgets.exe"
59 File "lsnes-wxwidgets.exe"
63 File /r
"buildoptions"
67 Section -AdditionalIcons
68 SetShellVarContext all
69 CreateDirectory "$SMPROGRAMS\${INSTALL_DIR}"
70 CreateShortCut "$SMPROGRAMS\${INSTALL_DIR}\Super Nintendo Emulator.lnk" "$INSTDIR\lsnes-wxwidgets.exe"
71 CreateShortCut "$SMPROGRAMS\${INSTALL_DIR}\Gameboy Emulator.lnk" "$INSTDIR\lsnesgb-wxwidgets.exe"
72 WriteIniStr
"$SMPROGRAMS\${INSTALL_DIR}\${PRODUCT_NAME} website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
73 CreateShortCut "$SMPROGRAMS\${INSTALL_DIR}\Manual.lnk" "$INSTDIR\manual.txt"
74 CreateShortCut "$SMPROGRAMS\${INSTALL_DIR}\Uninstall.lnk" "$INSTDIR\uninst.exe"
78 SetShellVarContext all
79 WriteUninstaller "$INSTDIR\uninst.exe"
80 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
81 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
82 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
83 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
84 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
85 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DIR" "$INSTDIR"
89 Function un
.onUninstSuccess
91 MessageBox MB_ICONINFORMATION|
MB_OK "$(^Name) was successfully removed from your computer."
95 MessageBox MB_ICONQUESTION|
MB_YESNO|MB_DEFBUTTON2
"Are you sure you want to completely remove $(^Name) and all of its components?" IDYES Done
101 SetShellVarContext all
103 RMDir /R
"$SMPROGRAMS\${INSTALL_DIR}"
106 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"