movie.get_last_movie()
[lsnes.git] / lsnes.nsi
blobfffd1bdbe0d53af15f5eb7d8ed11863d04f1269c
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"
16 ShowInstDetails show
17 ShowUnInstDetails show
18 RequestExecutionLevel admin ;Request elevated privileges for Windows 6.x+
20 ; MUI 1.67 compatible ------
21 !include "MUI.nsh"
23 ; MUI Settings
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"
28 ; License page
29 !define MUI_LICENSEPAGE_CHECKBOX
30 !insertmacro MUI_PAGE_LICENSE "COPYING.GPL"
31 !define MUI_LICENSEPAGE_CHECKBOX
32 !insertmacro MUI_PAGE_LICENSE "COPYING.GPL3"
33 ;Directory page
34 !insertmacro MUI_PAGE_DIRECTORY
35 ; Instfiles page
36 !insertmacro MUI_PAGE_INSTFILES
37 ; Finish page
38 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\manual.txt"
39 !insertmacro MUI_PAGE_FINISH
41 ; Uninstaller pages
42 !insertmacro MUI_UNPAGE_INSTFILES
43 ; Language files
44 !insertmacro MUI_LANGUAGE "English"
45 ; Reserve files
46 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
48 ; MUI end ------
50 Section "Main installer files" SEC01
51 SetShellVarContext all
53 SetOutPath "$INSTDIR"
54 File "COPYING.GPL"
55 File "COPYING.GPL3"
56 File "lsnesgb-sdl.exe"
57 File "lsnesgb-wxwidgets.exe"
58 File "lsnes-sdl.exe"
59 File "lsnes-wxwidgets.exe"
60 File "lsnes.nsi"
61 File "manual.txt"
63 File /r "buildoptions"
64 File /r "data"
65 SectionEnd
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"
75 SectionEnd
77 Section -Post
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"
86 SectionEnd
89 Function un.onUninstSuccess
90 HideWindow
91 MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
92 FunctionEnd
94 Function un.onInit
95 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES Done
96 Abort
97 Done:
98 FunctionEnd
100 Section Uninstall
101 SetShellVarContext all
103 RMDir /R "$SMPROGRAMS\${INSTALL_DIR}"
104 RMdir /R "$INSTDIR"
106 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
107 SetAutoClose true
108 SectionEnd