1 # Auto-generated by EclipseNSIS Script Wizard
2 # Mar 26, 2009 2:30:42 PM
6 # General Symbol Definitions
7 !define REGKEY
"SOFTWARE\$(^Name)"
9 !define COMPANY
"Brian T. Rice"
10 !define URL
http://www
.slatelanguage
.org
12 # MultiUser Symbol Definitions
13 !define MULTIUSER_EXECUTIONLEVEL Power
14 !define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
16 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY
"${REGKEY}"
17 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME MultiUserInstallMode
18 !define MULTIUSER_INSTALLMODE_COMMANDLINE
19 !define MULTIUSER_INSTALLMODE_INSTDIR Slate
20 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY
"${REGKEY}"
21 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUE
"Path"
23 # MUI Symbol Definitions
24 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue-full.ico"
25 !define MUI_FINISHPAGE_NOAUTOCLOSE
26 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
27 !define MUI_STARTMENUPAGE_REGISTRY_KEY
${REGKEY}
28 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
29 !define MUI_STARTMENUPAGE_DEFAULTFOLDER Slate
30 !define MUI_FINISHPAGE_RUN
$INSTDIR\slate
.exe
31 !define MUI_FINISHPAGE_RUN_PARAMETERS
"-i $INSTDIR\slate.image"
32 !define MUI_FINISHPAGE_SHOWREADME
$INSTDIR\README
33 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-colorful.ico"
34 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
37 !include MultiUser
.nsh
47 !insertmacro MUI_PAGE_WELCOME
48 !insertmacro MUI_PAGE_LICENSE
..\
..\LICENSE
49 !insertmacro MUI_PAGE_COMPONENTS
50 !insertmacro MULTIUSER_PAGE_INSTALLMODE
51 !insertmacro MUI_PAGE_DIRECTORY
52 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuGroup
53 !insertmacro MUI_PAGE_INSTFILES
54 !insertmacro MUI_PAGE_FINISH
55 !insertmacro MUI_UNPAGE_CONFIRM
56 !insertmacro MUI_UNPAGE_INSTFILES
59 !insertmacro MUI_LANGUAGE English
61 # Installer attributes
67 VIProductVersion
1.0.0.0
68 VIAddVersionKey ProductName Slate
69 VIAddVersionKey ProductVersion
"${VERSION}"
70 VIAddVersionKey CompanyName
"${COMPANY}"
71 VIAddVersionKey CompanyWebsite
"${URL}"
72 VIAddVersionKey FileVersion
"${VERSION}"
73 VIAddVersionKey FileDescription
""
74 VIAddVersionKey LegalCopyright
""
75 InstallDirRegKey HKLM "${REGKEY}" Path
76 ShowUninstDetails show
80 # Installing library ..\..\..\..\Pre-built.2\lib\pthreadVC2.dll
81 !insertmacro InstallLib DLL
$LibInstall REBOOT_PROTECTED
..\
..\
..\
..\Pre
-built
.2\lib\pthreadVC2
.dll
$INSTDIR\pthreadVC2
.dll
$INSTDIR
85 File /r
/x
*.ncb
..\
..\
*
87 WriteRegStr HKLM "${REGKEY}\Components" Main
1
90 Section "Desktop Shortcut" SEC0001
92 CreateShortcut
"$DESKTOP\Launch Slate.lnk" "$INSTDIR\slate.exe -i $INSTDIR\slate.image"
93 WriteRegStr HKLM "${REGKEY}\Components" "Desktop Shortcut" 1
97 WriteRegStr HKLM "${REGKEY}" Path
$INSTDIR
99 WriteUninstaller $INSTDIR\uninstall
.exe
100 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
101 SetOutPath $SMPROGRAMS\
$StartMenuGroup
102 CreateShortcut
"$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall
.exe
103 !insertmacro MUI_STARTMENU_WRITE_END
104 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName
"$(^Name)"
105 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion
"${VERSION}"
106 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher
"${COMPANY}"
107 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout
"${URL}"
108 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon
$INSTDIR\uninstall
.exe
109 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString
$INSTDIR\uninstall
.exe
110 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify
1
111 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair
1
114 # Macro for selecting uninstaller sections
115 !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
117 ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}"
118 StrCmp $R0 1 0 next
${UNSECTION_ID}
119 !insertmacro SelectSection
"${UNSECTION_ID}"
120 GoTo done
${UNSECTION_ID}
122 !insertmacro UnselectSection
"${UNSECTION_ID}"
127 # Uninstaller sections
128 Section /o
"-un.Desktop Shortcut" UNSEC0001
129 Delete /REBOOTOK
"$DESKTOP\Launch Slate.lnk"
130 DeleteRegValue HKLM "${REGKEY}\Components" "Desktop Shortcut"
133 Section /o
-un
.Main UNSEC0000
134 RmDir
/r
/REBOOTOK
$INSTDIR
135 RmDir
/r
/REBOOTOK
$INSTDIR
136 Delete /REBOOTOK
$INSTDIR\LICENSE
137 Delete /REBOOTOK
$INSTDIR\README
138 Delete /REBOOTOK
$INSTDIR\kernel
.new
.little
.64.1234230732370510.image
139 Delete /REBOOTOK
$INSTDIR\kernel
.new
.little
.32.1234233045701141.image
140 Delete /REBOOTOK
$INSTDIR\slate
.image
141 Delete /REBOOTOK
$INSTDIR\slate
.exe
142 # Uninstalling library $INSTDIR\pthreadVC2.dll
143 !insertmacro UnInstallLib DLL SHARED REBOOT_PROTECTED
$INSTDIR\pthreadVC2
.dll
145 DeleteRegValue HKLM "${REGKEY}\Components" Main
148 Section -un
.post UNSEC0003
149 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
150 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
151 Delete /REBOOTOK
$INSTDIR\uninstall
.exe
152 DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
153 DeleteRegValue HKLM "${REGKEY}" Path
154 DeleteRegKey /IfEmpty
HKLM "${REGKEY}\Components"
155 DeleteRegKey /IfEmpty
HKLM "${REGKEY}"
156 RmDir
/REBOOTOK
$SMPROGRAMS\
$StartMenuGroup
157 RmDir
/REBOOTOK
$INSTDIR
159 StrCpy $R0 $StartMenuGroup 1
160 StrCmp $R0 ">" no_smgroup
165 # Installer functions
168 !insertmacro MULTIUSER_INIT
170 ReadRegStr $0 HKLM "${REGKEY}" Path
177 # Uninstaller functions
179 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuGroup
180 !insertmacro MULTIUSER_UNINIT
181 !insertmacro SELECT_UNSECTION Main
${UNSEC0000}
182 !insertmacro SELECT_UNSECTION
"Desktop Shortcut" ${UNSEC0001}
185 # Section Descriptions
186 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
187 !insertmacro MUI_DESCRIPTION_TEXT
${SEC0001} "A shortcut for running Slate from an icon on the desktop."
188 !insertmacro MUI_FUNCTION_DESCRIPTION_END