Added support for Speex input.
[LameXP.git] / etc / NSIS / setup.nsi
blob99ae3d7d622b8b99f5fccc0f2a47037d70a19fc2
1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // LameXP - Audio Encoder Front-End
3 ; // Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
4 ; //
5 ; // This program is free software; you can redistribute it and/or modify
6 ; // it under the terms of the GNU General Public License as published by
7 ; // the Free Software Foundation; either version 2 of the License, or
8 ; // (at your option) any later version.
9 ; //
10 ; // This program is distributed in the hope that it will be useful,
11 ; // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; // GNU General Public License for more details.
14 ; //
15 ; // You should have received a copy of the GNU General Public License along
16 ; // with this program; if not, write to the Free Software Foundation, Inc.,
17 ; // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 ; //
19 ; // http://www.gnu.org/licenses/gpl-2.0.txt
20 ; ///////////////////////////////////////////////////////////////////////////////
22 ;--------------------------------
23 ;Basic Defines
24 ;--------------------------------
26 !ifndef LAMEXP_VERSION
27 !error "LAMEXP_VERSION is not defined !!!"
28 !endif
29 !ifndef LAMEXP_BUILD
30 !error "LAMEXP_BUILD is not defined !!!"
31 !endif
32 !ifndef LAMEXP_SUFFIX
33 !error "LAMEXP_SUFFIX is not defined !!!"
34 !endif
35 !ifndef LAMEXP_DATE
36 !error "LAMEXP_DATE is not defined !!!"
37 !endif
38 !ifndef LAMEXP_OUTPUT_FILE
39 !error "LAMEXP_OUTPUT_FILE is not defined !!!"
40 !endif
41 !ifndef LAMEXP_SOURCE_PATH
42 !error "LAMEXP_SOURCE_PATH is not defined !!!"
43 !endif
44 !ifndef LAMEXP_UPX_PATH
45 !error "LAMEXP_UPX_PATH is not defined !!!"
46 !endif
48 ;UUID
49 !define MyRegPath "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}"
52 ;--------------------------------
53 ;Includes
54 ;--------------------------------
56 !include `MUI2.nsh`
57 !include `WinVer.nsh`
58 !include `UAC.nsh`
59 !include `parameters.nsh`
62 ;--------------------------------
63 ;Installer Attributes
64 ;--------------------------------
66 RequestExecutionLevel user
67 ShowInstDetails show
68 ShowUninstDetails show
69 Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_SUFFIX} [Build #${LAMEXP_BUILD}]"
70 OutFile "${LAMEXP_OUTPUT_FILE}"
71 BrandingText "Date created: ${LAMEXP_DATE}"
72 InstallDir "$PROGRAMFILES\MuldeR\LameXP v${LAMEXP_VERSION}"
73 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
76 ;--------------------------------
77 ;Compressor
78 ;--------------------------------
80 SetCompressor /SOLID LZMA
81 SetCompressorDictSize 64
83 !packhdr "$%TEMP%\exehead.tmp" '"${LAMEXP_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
86 ;--------------------------------
87 ;Reserved Files
88 ;--------------------------------
90 ReserveFile "${NSISDIR}\Plugins\UAC.dll"
91 ReserveFile "${NSISDIR}\Plugins\System.dll"
92 ReserveFile "${NSISDIR}\Plugins\nsDialogs.dll"
93 ReserveFile "${NSISDIR}\Plugins\StartMenu.dll"
94 ReserveFile "${NSISDIR}\Plugins\LockedList.dll"
97 ;--------------------------------
98 ;Variables
99 ;--------------------------------
101 Var StartMenuFolder
104 ;--------------------------------
105 ;Version Info
106 ;--------------------------------
108 !searchreplace PRODUCT_VERSION_DATE "${LAMEXP_DATE}" "-" "."
109 VIProductVersion "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD}"
111 VIAddVersionKey "Author" "LoRd_MuldeR <mulder2@gmx.de>"
112 VIAddVersionKey "Comments" "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."
113 VIAddVersionKey "CompanyName" "Free Software Foundation"
114 VIAddVersionKey "FileDescription" "LameXP v${LAMEXP_VERSION} ${LAMEXP_SUFFIX} [Build #${LAMEXP_BUILD}]"
115 VIAddVersionKey "FileVersion" "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD} (${LAMEXP_VERSION})"
116 VIAddVersionKey "LegalCopyright" "Copyright 2004-2010 LoRd_MuldeR"
117 VIAddVersionKey "LegalTrademarks" "GNU"
118 VIAddVersionKey "OriginalFilename" "LameXP.${LAMEXP_DATE}.exe"
119 VIAddVersionKey "ProductName" "LameXP - Audio Encoder Frontend"
120 VIAddVersionKey "ProductVersion" "${LAMEXP_VERSION}, Build #${LAMEXP_BUILD} (${LAMEXP_DATE})"
121 VIAddVersionKey "Website" "http://mulder.at.gg/"
124 ;--------------------------------
125 ;MUI2 Interface Settings
126 ;--------------------------------
128 !define MUI_ABORTWARNING
129 !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
130 !define MUI_STARTMENUPAGE_REGISTRY_KEY "${MyRegPath}"
131 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "StartmenuFolder"
132 !define MUI_LANGDLL_REGISTRY_ROOT HKLM
133 !define MUI_LANGDLL_REGISTRY_KEY "${MyRegPath}"
134 !define MUI_LANGDLL_REGISTRY_VALUENAME "SetupLanguage"
135 !define MUI_STARTMENUPAGE_DEFAULTFOLDER "LameXP v${LAMEXP_VERSION}"
136 !define MUI_FINISHPAGE_NOAUTOCLOSE
137 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
138 !define MUI_FINISHPAGE_RUN
139 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
140 !define MUI_FINISHPAGE_SHOWREADME
141 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
142 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
143 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
144 !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
145 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp"
146 !define MUI_HEADERIMAGE
147 !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp"
148 !define MUI_HEADERIMAGE_UNBITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-uninstall.bmp"
149 !define MUI_LANGDLL_ALLLANGUAGES
150 !define MUI_CUSTOMFUNCTION_GUIINIT MyUacInit
151 !define MUI_CUSTOMFUNCTION_UNGUIINIT un.MyUacInit
152 !define MUI_LANGDLL_ALWAYSSHOW
155 ;--------------------------------
156 ;MUI2 Pages
157 ;--------------------------------
159 ;Installer
160 !define MUI_WELCOMEPAGE_TITLE_3LINES
161 !define MUI_FINISHPAGE_TITLE_3LINES
162 !insertmacro MUI_PAGE_WELCOME
163 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
164 !insertmacro MUI_PAGE_DIRECTORY
165 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
166 Page Custom LockedListShow
167 !insertmacro MUI_PAGE_INSTFILES
168 !insertmacro MUI_PAGE_FINISH
170 ;Uninstaller
171 !define MUI_WELCOMEPAGE_TITLE_3LINES
172 !define MUI_FINISHPAGE_TITLE_3LINES
173 !insertmacro MUI_UNPAGE_WELCOME
174 !insertmacro MUI_UNPAGE_CONFIRM
175 UninstPage Custom un.LockedListShow
176 !insertmacro MUI_UNPAGE_INSTFILES
177 !insertmacro MUI_UNPAGE_FINISH
180 ;--------------------------------
181 ;Languages
182 ;--------------------------------
184 !insertmacro MUI_LANGUAGE "English" ;first language is the default language
185 !insertmacro MUI_LANGUAGE "German"
186 !insertmacro MUI_LANGUAGE "Spanish"
188 ; !insertmacro MUI_LANGUAGE "French"
189 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
190 ; !insertmacro MUI_LANGUAGE "SimpChinese"
191 ; !insertmacro MUI_LANGUAGE "TradChinese"
192 ; !insertmacro MUI_LANGUAGE "Japanese"
193 ; !insertmacro MUI_LANGUAGE "Italian"
194 ; !insertmacro MUI_LANGUAGE "Dutch"
195 ; !insertmacro MUI_LANGUAGE "Greek"
196 ; !insertmacro MUI_LANGUAGE "Russian"
197 ; !insertmacro MUI_LANGUAGE "Polish"
198 ; !insertmacro MUI_LANGUAGE "Ukrainian"
199 ; !insertmacro MUI_LANGUAGE "Hungarian"
200 ; !insertmacro MUI_LANGUAGE "Romanian"
201 ; !insertmacro MUI_LANGUAGE "Serbian"
202 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
203 ; !insertmacro MUI_LANGUAGE "Arabic"
204 ; !insertmacro MUI_LANGUAGE "Portuguese"
205 ; !insertmacro MUI_LANGUAGE "Afrikaans"
206 ; !insertmacro MUI_LANGUAGE "Malay"
207 ; !insertmacro MUI_LANGUAGE "Indonesian"
210 ;--------------------------------
211 ;Translation
212 ;--------------------------------
214 ;English
215 !include "..\Translation\Blank.nsh"
217 ;German
218 !include "..\Translation\LameXP_DE.nsh"
220 ;Spanish
221 !include "..\Translation\LameXP_ES.nsh"
224 ;--------------------------------
225 ;Installer initialization
226 ;--------------------------------
228 Function .onInit
229 ${If} ${UAC_IsInnerInstance}
230 !insertmacro MUI_LANGDLL_DISPLAY
231 ${Else}
232 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
233 Pop $0
234 StrCmp $0 0 +3
235 MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the installer is already running!"
236 Quit
237 ${EndIf}
239 ${If} ${IsNT}
240 Goto OS_Windows_NT
241 ${Else}
242 MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, the Windows 9x series (including ME) is not supported by this application!"
243 Quit
244 ${EndIf}
246 OS_Windows_NT:
247 ${If} ${AtMostWinNT4}
248 MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, Windows NT 4.0 (and older) is not supported by this application!"
249 Quit
250 ${EndIf}
251 FunctionEnd
253 Function un.onInit
254 ${If} ${UAC_IsInnerInstance}
255 !insertmacro MUI_LANGDLL_DISPLAY
256 ${Else}
257 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
258 Pop $0
259 StrCmp $0 0 +3
260 MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the un-installer is already running!"
261 Quit
262 ${EndIf}
263 FunctionEnd
266 ;--------------------------------
267 ;UAC initialization
268 ;--------------------------------
270 Function MyUacInit
271 UAC_TryAgain:
272 !insertmacro UAC_RunElevated
273 ${Switch} $0
274 ${Case} 0
275 ${IfThen} $1 = 1 ${|} Quit ${|}
276 ${IfThen} $3 <> 0 ${|} ${Break} ${|}
277 ${If} $1 = 3
278 MessageBox MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND|MB_OKCANCEL "This installer requires admin access, please try again!" /SD IDCANCEL IDOK UAC_TryAgain
279 ${EndIf}
280 ${Case} 1223
281 MessageBox MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND|MB_OKCANCEL "This installer requires admin privileges, please try again!" /SD IDCANCEL IDOK UAC_TryAgain
282 Quit
283 ${Case} 1062
284 MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND "Logon service not running, aborting!"
285 Quit
286 ${Default}
287 MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND "Unable to elevate installer! (Error code: $0)"
288 Quit
289 ${EndSwitch}
290 FunctionEnd
292 Function un.MyUacInit
293 UAC_TryAgain:
294 !insertmacro UAC_RunElevated
295 ${Switch} $0
296 ${Case} 0
297 ${IfThen} $1 = 1 ${|} Quit ${|}
298 ${IfThen} $3 <> 0 ${|} ${Break} ${|}
299 ${If} $1 = 3
300 MessageBox MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND|MB_OKCANCEL "This un-installer requires admin access, please try again!" /SD IDCANCEL IDOK UAC_TryAgain
301 ${EndIf}
302 ${Case} 1223
303 MessageBox MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND|MB_OKCANCEL "This un-installer requires admin privileges, please try again!" /SD IDCANCEL IDOK UAC_TryAgain
304 Quit
305 ${Case} 1062
306 MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND "Logon service not running, aborting!"
307 Quit
308 ${Default}
309 MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND "Unable to elevate installer! (Error code: $0)"
310 Quit
311 ${EndSwitch}
312 FunctionEnd
315 ;--------------------------------
316 ;Macros & Auxiliary Functions
317 ;--------------------------------
319 !macro PrintProgress Text
320 SetDetailsPrint textonly
321 DetailPrint '${Text}'
322 SetDetailsPrint listonly
323 Sleep 1000
324 !macroend
326 !macro CreateWebLink ShortcutFile TargetURL
327 Push $0
328 Push $1
329 StrCpy $0 "${ShortcutFile}"
330 StrCpy $1 "${TargetURL}"
331 Call _CreateWebLink
332 Pop $1
333 Pop $0
334 !macroend
336 Function _CreateWebLink
337 FlushINI "$0"
338 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
339 DeleteINISec "$0" "DEFAULT"
340 DeleteINISec "$0" "InternetShortcut"
341 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
342 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
343 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
344 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
345 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
346 FlushINI "$0"
347 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
348 FunctionEnd
350 !macro TrimStr VarName
351 Push ${VarName}
352 Call _TrimStr
353 Pop ${VarName}
354 !macroend
356 Function _TrimStr
357 Exch $R1
358 Push $R2
360 TrimLoop1:
361 StrCpy $R2 "$R1" 1
362 StrCmp "$R2" " " TrimLeft
363 StrCmp "$R2" "$\r" TrimLeft
364 StrCmp "$R2" "$\n" TrimLeft
365 StrCmp "$R2" "$\t" TrimLeft
366 Goto TrimLoop2
367 TrimLeft:
368 StrCpy $R1 "$R1" "" 1
369 Goto TrimLoop1
371 TrimLoop2:
372 StrCpy $R2 "$R1" 1 -1
373 StrCmp "$R2" " " TrimRight
374 StrCmp "$R2" "$\r" TrimRight
375 StrCmp "$R2" "$\n" TrimRight
376 StrCmp "$R2" "$\t" TrimRight
377 Goto TrimDone
378 TrimRight:
379 StrCpy $R1 "$R1" -1
380 Goto TrimLoop2
382 TrimDone:
383 Pop $R2
384 Exch $R1
385 FunctionEnd
387 !macro GetExecutableName OutVar
388 !insertmacro GetCommandlineParameter "Update" "LameXP.exe" ${OutVar}
389 !insertmacro TrimStr ${OutVar}
390 StrCmp ${OutVar} "" 0 +2
391 StrCpy ${OutVar} "LameXP.exe"
392 !macroend
395 ;--------------------------------
396 ;Install Files
397 ;--------------------------------
399 Section "-Prepare"
400 SetOutPath "$INSTDIR"
401 SectionEnd
403 Section "!Install Files"
404 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_INSTFILES)"
405 !insertmacro GetExecutableName $R0
406 File `/oname=$R0` `${LAMEXP_SOURCE_PATH}\LameXP.exe`
407 File `${LAMEXP_SOURCE_PATH}\*.txt`
408 File `${LAMEXP_SOURCE_PATH}\*.html`
409 SectionEnd
411 Section "-Write Uinstaller"
412 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_MAKEUNINST)"
413 WriteUninstaller "$INSTDIR\Uninstall.exe"
414 SectionEnd
416 Section "-Create Shortcuts"
417 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
418 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_SHORTCUTS)"
419 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
421 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
422 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
423 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
425 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" "$INSTDIR\LameXP.exe" "" "$INSTDIR\LameXP.exe" 0
426 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\License.lnk" "$INSTDIR\License.txt"
427 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
429 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Official LameXP Homepage.url" "http://mulder.dummwiedeutsch.de/"
430 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\RareWares.org.url" "http://rarewares.org/"
431 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Hydrogenaudio Forums.url" "http://www.hydrogenaudio.org/"
432 !insertmacro MUI_STARTMENU_WRITE_END
433 SectionEnd
435 Section "-Update Registry"
436 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_REGISTRY)"
437 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
438 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
439 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "LameXP"
440 SectionEnd
442 Section "-Finished"
443 !insertmacro PrintProgress "$(MUI_TEXT_FINISH_TITLE)."
445 ; ---- POLL ----
446 !insertmacro UAC_AsUser_ExecShell "" "http://mulder.brhack.net/temp/style_poll/" "" "" SW_SHOWNORMAL
447 ; ---- POLL ----
448 SectionEnd
451 ;--------------------------------
452 ;Uninstaller
453 ;--------------------------------
455 Section "Uninstall"
456 SetOutPath "$INSTDIR"
457 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_UNINSTALL)"
459 Delete /REBOOTOK "$INSTDIR\*.exe"
460 Delete /REBOOTOK "$INSTDIR\*.txt"
461 RMDir "$INSTDIR"
463 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
464 StrCmp "$StartMenuFolder" "" NoStartmenuFolder
465 IfFileExists "$SMPROGRAMS\$StartMenuFolder\*.*" 0 NoStartmenuFolder
466 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
467 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
468 RMDir "$SMPROGRAMS\$StartMenuFolder"
470 NoStartmenuFolder:
472 DeleteRegValue HKLM "${MyRegPath}" "InstallLocation"
473 DeleteRegValue HKLM "${MyRegPath}" "UninstallString"
474 DeleteRegValue HKLM "${MyRegPath}" "DisplayName"
475 DeleteRegValue HKLM "${MyRegPath}" "StartmenuFolder"
476 DeleteRegValue HKLM "${MyRegPath}" "SetupLanguage"
478 MessageBox MB_YESNO|MB_TOPMOST "$(LAMEXP_LANG_UNINST_PERSONAL)" IDNO +2
479 Delete "$LOCALAPPDATA\LoRd_MuldeR\LameXP - Audio Encoder Front-End\config.ini"
481 !insertmacro PrintProgress "$(MUI_UNTEXT_FINISH_TITLE)."
482 SectionEnd
485 ;--------------------------------
486 ;Check For Update Mode
487 ;--------------------------------
489 Function CheckForUpdate
490 !insertmacro GetCommandlineParameter "Update" "?" $R0
491 StrCmp $R0 "?" 0 EnableUpdateMode
493 StrCmp "$INSTDIR" "" 0 +2
494 Return
495 IfFileExists "$INSTDIR\*.*" +2
496 Return
497 StrCmp "$EXEDIR" "$INSTDIR" 0 +2
498 Return
499 IfFileExists "$INSTDIR\LameXP.exe" +2
500 Return
502 EnableUpdateMode:
504 FindWindow $R0 "#32770" "" $HWNDPARENT
505 GetDlgItem $R1 $R0 1019
506 EnableWindow $R1 0
508 FindWindow $R0 "#32770" "" $HWNDPARENT
509 GetDlgItem $R1 $R0 1001
510 EnableWindow $R1 0
511 FunctionEnd
514 ;--------------------------------
515 ;Locked List
516 ;--------------------------------
518 Function LockedListShow
519 !insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
520 ${If} ${AtLeastWinXP}
521 !insertmacro GetExecutableName $R0
522 LockedList::AddModule "\$R0"
523 LockedList::AddModule "\Uninstall.exe"
524 LockedList::AddModule "\Au_.exe"
525 ${EndIf}
526 LockedList::Dialog /autonext /heading "$(LAMEXP_LANG_LOCKEDLIST_HEADING)" /noprograms "$(LAMEXP_LANG_LOCKEDLIST_NOPROG)" /searching "$(LAMEXP_LANG_LOCKEDLIST_SEARCH)" /colheadings "$(LAMEXP_LANG_LOCKEDLIST_COLHDR1)" "$(LAMEXP_LANG_LOCKEDLIST_COLHDR2)"
527 Pop $R0
528 FunctionEnd
530 Function un.LockedListShow
531 !insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
532 ${If} ${AtLeastWinXP}
533 LockedList::AddModule "\LameXP.exe"
534 LockedList::AddModule "\Uninstall.exe"
535 ${EndIf}
536 LockedList::Dialog /autonext /heading "$(LAMEXP_LANG_LOCKEDLIST_HEADING)" /noprograms "$(LAMEXP_LANG_LOCKEDLIST_NOPROG)" /searching "$(LAMEXP_LANG_LOCKEDLIST_SEARCH)" /colheadings "$(LAMEXP_LANG_LOCKEDLIST_COLHDR1)" "$(LAMEXP_LANG_LOCKEDLIST_COLHDR2)"
537 Pop $R0
538 FunctionEnd
541 ;--------------------------------
542 ;Install Success
543 ;--------------------------------
545 Function RunAppFunction
546 !insertmacro GetExecutableName $R0
547 !insertmacro UAC_AsUser_ExecShell "explore" "$INSTDIR" "" "" SW_SHOWNORMAL
548 !insertmacro UAC_AsUser_ExecShell "open" "$INSTDIR\$R0" "" "$INSTDIR" SW_SHOWNORMAL
549 FunctionEnd
551 Function ShowReadmeFunction
552 !insertmacro UAC_AsUser_ExecShell "open" "$INSTDIR\License.txt" "" "" SW_SHOWNORMAL
553 FunctionEnd