1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // LameXP - Audio Encoder Front-End
3 ; // Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
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.
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.
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.
19 ; // http://www.gnu.org/licenses/gpl-2.0.txt
20 ; ///////////////////////////////////////////////////////////////////////////////
23 ;--------------------------------
25 ;--------------------------------
28 !error "NSIS_UNICODE is undefined, please compile with Unicode NSIS !!!"
31 !ifndef LAMEXP_VERSION
32 !error "LAMEXP_VERSION is not defined !!!"
35 !error "LAMEXP_BUILD is not defined !!!"
37 !ifndef LAMEXP_INSTTYPE
38 !error "LAMEXP_INSTTYPE is not defined !!!"
41 !error "LAMEXP_PATCH is not defined !!!"
44 !error "LAMEXP_DATE is not defined !!!"
46 !ifndef LAMEXP_OUTPUT_FILE
47 !error "LAMEXP_OUTPUT_FILE is not defined !!!"
49 !ifndef LAMEXP_SOURCE_PATH
50 !error "LAMEXP_SOURCE_PATH is not defined !!!"
52 !ifndef LAMEXP_UPX_PATH
53 !error "LAMEXP_UPX_PATH is not defined !!!"
57 !define MyRegPath "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}"
60 !define MyWebSite "http://muldersoft.com/"
63 ;--------------------------------
64 ;Check for Pre-Release
65 ;--------------------------------
67 !define LAMEXP_IS_PRERELEASE
69 !if '${LAMEXP_INSTTYPE}' == 'Final'
70 !undef LAMEXP_IS_PRERELEASE
72 !if '${LAMEXP_INSTTYPE}' == 'Hotfix'
73 !undef LAMEXP_IS_PRERELEASE
77 ;--------------------------------
79 ;--------------------------------
84 !include `StdUtils.nsh`
87 ;--------------------------------
89 ;--------------------------------
91 RequestExecutionLevel admin
93 ShowUninstDetails show
94 Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
95 OutFile "${LAMEXP_OUTPUT_FILE}"
96 BrandingText "Date created: ${LAMEXP_DATE} [Build #${LAMEXP_BUILD}]"
97 InstallDir "$PROGRAMFILES\MuldeR\LameXP v${LAMEXP_VERSION}"
98 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
101 ;--------------------------------
103 ;--------------------------------
105 SetCompressor /SOLID LZMA
106 SetCompressorDictSize 64
108 !packhdr "$%TEMP%\exehead.tmp" '"${LAMEXP_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
111 ;--------------------------------
113 ;--------------------------------
115 ReserveFile "${NSISDIR}\Plugins\Aero.dll"
116 ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
117 ReserveFile "${NSISDIR}\Plugins\LockedList.dll"
118 ReserveFile "${NSISDIR}\Plugins\nsDialogs.dll"
119 ReserveFile "${NSISDIR}\Plugins\nsExec.dll"
120 ReserveFile "${NSISDIR}\Plugins\StartMenu.dll"
121 ReserveFile "${NSISDIR}\Plugins\StdUtils.dll"
122 ReserveFile "${NSISDIR}\Plugins\System.dll"
123 ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
124 ReserveFile "checkproc.exe"
127 ;--------------------------------
129 ;--------------------------------
134 ;--------------------------------
136 ;--------------------------------
138 !searchreplace PRODUCT_VERSION_DATE "${LAMEXP_DATE}" "-" "."
139 VIProductVersion "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD}"
141 VIAddVersionKey "Author" "LoRd_MuldeR <mulder2@gmx.de>"
142 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."
143 VIAddVersionKey "CompanyName" "Free Software Foundation"
144 VIAddVersionKey "FileDescription" "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
145 VIAddVersionKey "FileVersion" "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD} (${LAMEXP_VERSION})"
146 VIAddVersionKey "LegalCopyright" "Copyright 2004-2013 LoRd_MuldeR"
147 VIAddVersionKey "LegalTrademarks" "GNU"
148 VIAddVersionKey "OriginalFilename" "LameXP.${LAMEXP_DATE}.exe"
149 VIAddVersionKey "ProductName" "LameXP - Audio Encoder Frontend"
150 VIAddVersionKey "ProductVersion" "${LAMEXP_VERSION}, Build #${LAMEXP_BUILD} (${LAMEXP_DATE})"
151 VIAddVersionKey "Website" "${MyWebSite}"
154 ;--------------------------------
155 ;MUI2 Interface Settings
156 ;--------------------------------
158 !define MUI_ABORTWARNING
159 !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
160 !define MUI_STARTMENUPAGE_REGISTRY_KEY "${MyRegPath}"
161 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "StartmenuFolder"
162 !define MUI_LANGDLL_REGISTRY_ROOT HKLM
163 !define MUI_LANGDLL_REGISTRY_KEY "${MyRegPath}"
164 !define MUI_LANGDLL_REGISTRY_VALUENAME "SetupLanguage"
165 !define MUI_STARTMENUPAGE_DEFAULTFOLDER "LameXP v${LAMEXP_VERSION}"
166 !define MUI_FINISHPAGE_NOAUTOCLOSE
167 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
168 !define MUI_FINISHPAGE_RUN
169 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
170 !define MUI_FINISHPAGE_SHOWREADME
171 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
172 !define MUI_FINISHPAGE_LINK ${MyWebSite}
173 !define MUI_FINISHPAGE_LINK_LOCATION ${MyWebSite}
174 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
175 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
176 !define MUI_WELCOMEFINISHPAGE_BITMAP "wizard.bmp"
177 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "wizard-un.bmp"
178 !define MUI_HEADERIMAGE
179 !define MUI_HEADERIMAGE_BITMAP "header.bmp"
180 !define MUI_HEADERIMAGE_UNBITMAP "header-un.bmp"
181 !define MUI_LANGDLL_ALLLANGUAGES
182 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
183 !define MUI_CUSTOMFUNCTION_UNGUIINIT un.MyGuiInit
184 !define MUI_LANGDLL_ALWAYSSHOW
187 ;--------------------------------
189 ;--------------------------------
192 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
193 !define MUI_WELCOMEPAGE_TITLE_3LINES
194 !define MUI_FINISHPAGE_TITLE_3LINES
195 !insertmacro MUI_PAGE_WELCOME
196 !insertmacro MUI_PAGE_LICENSE "license.rtf"
197 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
198 !insertmacro MUI_PAGE_DIRECTORY
199 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
200 Page Custom LockedListShow
201 !insertmacro MUI_PAGE_INSTFILES
202 !insertmacro MUI_PAGE_FINISH
205 !define MUI_WELCOMEPAGE_TITLE_3LINES
206 !define MUI_FINISHPAGE_TITLE_3LINES
207 !define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
208 !insertmacro MUI_UNPAGE_WELCOME
209 !define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
210 !insertmacro MUI_UNPAGE_CONFIRM
211 UninstPage Custom un.LockedListShow
212 !insertmacro MUI_UNPAGE_INSTFILES
213 !insertmacro MUI_UNPAGE_FINISH
216 ;--------------------------------
218 ;--------------------------------
220 !insertmacro MUI_LANGUAGE "English" ;first language is the default language
221 !insertmacro MUI_LANGUAGE "German"
222 !insertmacro MUI_LANGUAGE "Spanish"
223 !insertmacro MUI_LANGUAGE "Russian"
224 !insertmacro MUI_LANGUAGE "Ukrainian"
226 ; !insertmacro MUI_LANGUAGE "French"
227 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
228 ; !insertmacro MUI_LANGUAGE "SimpChinese"
229 ; !insertmacro MUI_LANGUAGE "TradChinese"
230 ; !insertmacro MUI_LANGUAGE "Japanese"
231 ; !insertmacro MUI_LANGUAGE "Italian"
232 ; !insertmacro MUI_LANGUAGE "Dutch"
233 ; !insertmacro MUI_LANGUAGE "Greek"
234 ; !insertmacro MUI_LANGUAGE "Polish"
235 ; !insertmacro MUI_LANGUAGE "Hungarian"
236 ; !insertmacro MUI_LANGUAGE "Romanian"
237 ; !insertmacro MUI_LANGUAGE "Serbian"
238 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
239 ; !insertmacro MUI_LANGUAGE "Arabic"
240 ; !insertmacro MUI_LANGUAGE "Portuguese"
241 ; !insertmacro MUI_LANGUAGE "Afrikaans"
242 ; !insertmacro MUI_LANGUAGE "Malay"
243 ; !insertmacro MUI_LANGUAGE "Indonesian"
246 ;--------------------------------
248 ;--------------------------------
251 !include "..\Translation\Blank.nsh"
254 !include "..\Translation\LameXP_DE.nsh"
257 !include "..\Translation\LameXP_ES.nsh"
260 !include "..\Translation\LameXP_RU.nsh"
263 !include "..\Translation\LameXP_UK.nsh"
266 ;--------------------------------
267 ;Installer initialization
268 ;--------------------------------
271 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
274 MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the installer is already running!"
280 # Running on Windows NT family?
282 MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
283 ExecShell "open" "http://windows.microsoft.com/"
287 # Running on Windows XP or later?
288 ${If} ${AtMostWin2000}
289 MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, but your operating system is *not* supported anymore.$\nInstallation will be aborted!$\n$\nThe minimum required platform is Windows XP (Service Pack 3)."
290 ExecShell "open" "http://windows.microsoft.com/"
294 # If on Windows XP, is the required Service Pack installed?
296 ${IfNot} ${RunningX64} # Windows XP 32-Bit, requires Service Pack 3
297 ${AndIf} ${AtMostServicePack} 2
298 MessageBox MB_TOPMOST|MB_ICONEXCLAMATION "This application requires Windows XP with Service Pack 3 installed.$\nWindows XP *without* Service Pack 3 reached end-of-life on 2010-07-13.$\nCurrent Windows XP (Service Pack 3) will be supported until 2014-04-08.$\n$\nPlease install Service Pack 3 now or just run Windows Update!"
299 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 3 for Windows XP now?" IDYES`
300 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=24"
302 ExecShell "open" "http://windowsupdate.microsoft.com/"
306 ${If} ${RunningX64} # Windows XP 64-Bit, requires Service Pack 2
307 ${AndIf} ${AtMostServicePack} 1
308 MessageBox MB_TOPMOST|MB_ICONEXCLAMATION "This application requires Windows XP x64 Edition with Service Pack 2 installed.$\nWindows XP x64 Edition *without* Service Pack 2 reached end-of-life on 2009-04-14.$\nCurrent Windows XP x64 Edition (Service Pack 2) will be supported until 2014-04-08.$\n$\nPlease install Service Pack 2 now or just run Windows Update!"
309 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 2 for Windows XP x64 Edition now?" IDYES`
310 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=17791"
312 ExecShell "open" "http://windowsupdate.microsoft.com/"
320 ${StdUtils.GetParameter} $R0 "Update" "?"
322 !insertmacro MUI_LANGDLL_DISPLAY
327 UserInfo::GetAccountType
330 MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
331 SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
338 File "/oname=$PLUGINSDIR\checkproc.exe" "checkproc.exe"
339 nsExec::Exec /TIMEOUT=5000 '"$PLUGINSDIR\checkproc.exe" Softonic Brothersoft Afreecodec'
344 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
347 MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the un-installer is already running!"
351 ${StdUtils.GetParameter} $R0 "Force" "?"
353 !insertmacro MUI_LANGDLL_DISPLAY
358 UserInfo::GetAccountType
361 MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
362 SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
368 ;--------------------------------
370 ;--------------------------------
373 StrCpy $0 $HWNDPARENT
374 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
378 Function un.MyGuiInit
379 StrCpy $0 $HWNDPARENT
380 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
385 ;--------------------------------
386 ;Macros & Auxiliary Functions
387 ;--------------------------------
389 !macro PrintProgress Text
390 SetDetailsPrint textonly
391 DetailPrint '${Text}'
392 SetDetailsPrint listonly
396 !macro CreateWebLink ShortcutFile TargetURL
399 StrCpy $0 "${ShortcutFile}"
400 StrCpy $1 "${TargetURL}"
406 Function _CreateWebLink
408 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
409 DeleteINISec "$0" "DEFAULT"
410 DeleteINISec "$0" "InternetShortcut"
411 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
412 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
413 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
414 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
415 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
417 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
420 !macro GetExecutableName OutVar
421 ${StdUtils.GetParameter} ${OutVar} "Update" ""
422 ${StdUtils.TrimStr} ${OutVar}
423 ${IfThen} "${OutVar}" == "" ${|} StrCpy ${OutVar} "LameXP.exe" ${|}
426 !macro DisableNextButton TmpVar
427 GetDlgItem ${TmpVar} $HWNDPARENT 1
428 EnableWindow ${TmpVar} 0
432 ;--------------------------------
434 ;--------------------------------
437 SetShellVarContext all
438 SetOutPath "$INSTDIR"
441 Section "!Install Files"
442 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_INSTFILES)"
444 Delete "$INSTDIR\Changelog.htm"
445 Delete "$INSTDIR\Changelog.html"
446 Delete "$INSTDIR\Contributors.txt"
447 Delete "$INSTDIR\Copying.txt"
448 Delete "$INSTDIR\FAQ.html"
449 Delete "$INSTDIR\Howto.html"
450 Delete "$INSTDIR\LameEnc.sys"
451 Delete "$INSTDIR\LameXP.exe"
452 Delete "$INSTDIR\LameXP.exe.sig"
453 Delete "$INSTDIR\LameXP-Portable.exe"
454 Delete "$INSTDIR\License.txt"
455 Delete "$INSTDIR\Manual.html"
456 Delete "$INSTDIR\Readme.htm"
457 Delete "$INSTDIR\ReadMe.txt"
458 Delete "$INSTDIR\PRE_RELEASE_INFO.txt"
459 Delete "$INSTDIR\Settings.cfg"
460 Delete "$INSTDIR\Translate.html"
461 Delete "$INSTDIR\Uninstall.exe"
463 !insertmacro GetExecutableName $R0
467 Delete "$INSTDIR\$R0"
470 MessageBox MB_TOPMOST|MB_ICONSTOP|MB_RETRYCANCEL 'Could not delete old "$R0" file. Is LameXP still running?' IDRETRY DeleteOldBinary
471 Abort "Could not delete old binary!"
474 File /a `/oname=$R0` `${LAMEXP_SOURCE_PATH}\LameXP.exe`
475 File /a `${LAMEXP_SOURCE_PATH}\*.txt`
476 File /a `${LAMEXP_SOURCE_PATH}\*.html`
479 Section "-Write Uinstaller"
480 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_MAKEUNINST)"
481 WriteUninstaller "$INSTDIR\Uninstall.exe"
484 Section "-Create Shortcuts"
485 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
486 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_SHORTCUTS)"
487 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
489 SetShellVarContext current
491 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
492 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
493 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
495 SetShellVarContext all
497 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
498 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
499 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
501 !insertmacro GetExecutableName $R0
503 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
504 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_LICENSE).lnk" "$INSTDIR\License.txt"
505 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\Changelog.html"
506 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_TRANSLATE).lnk" "$INSTDIR\Translate.html"
507 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_FAQ).lnk" "$INSTDIR\FAQ.html"
508 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_MANUAL).lnk" "$INSTDIR\Manual.html"
509 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
511 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Official LameXP Homepage.url" "http://mulder.dummwiedeutsch.de/"
512 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
513 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\RareWares.org.url" "http://rarewares.org/"
514 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Hydrogenaudio Forums.url" "http://www.hydrogenaudio.org/"
516 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
517 ${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils.Const.ISV_PinToTaskbar}
518 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
520 !insertmacro MUI_STARTMENU_WRITE_END
523 Section "-Update Registry"
524 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_REGISTRY)"
526 !insertmacro GetExecutableName $R0
527 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
528 WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
529 WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
530 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
531 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "LameXP v${LAMEXP_VERSION}"
532 WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
533 WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
534 WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
535 WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
539 !insertmacro PrintProgress "$(MUI_TEXT_FINISH_TITLE)."
541 !ifdef LAMEXP_IS_PRERELEASE
542 ${If} ${FileExists} "$INSTDIR\PRE_RELEASE_INFO.txt"
543 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\PRE_RELEASE_INFO.txt" "open" ""
549 ;--------------------------------
551 ;--------------------------------
554 SetOutPath "$INSTDIR"
555 !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_UNINSTALL)"
561 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
562 ${IfNot} "$StartMenuFolder" == ""
563 SetShellVarContext current
564 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
565 ${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils.Const.ISV_UnpinFromTaskbar}
566 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
568 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
569 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
570 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
571 RMDir "$SMPROGRAMS\$StartMenuFolder"
574 SetShellVarContext all
575 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
576 ${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils.Const.ISV_UnpinFromTaskbar}
577 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
579 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
580 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
581 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
582 RMDir "$SMPROGRAMS\$StartMenuFolder"
590 ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
591 ${IfThen} "$R0" == "" ${|} StrCpy $R0 "LameXP.exe" ${|}
593 Delete /REBOOTOK "$INSTDIR\LameXP.exe"
594 Delete /REBOOTOK "$INSTDIR\$R0"
595 Delete /REBOOTOK "$INSTDIR\LameXP-Portable.exe"
596 Delete /REBOOTOK "$INSTDIR\LameXP.exe.sig"
597 Delete /REBOOTOK "$INSTDIR\LameXP*"
599 Delete /REBOOTOK "$INSTDIR\Changelog.htm"
600 Delete /REBOOTOK "$INSTDIR\Changelog.html"
601 Delete /REBOOTOK "$INSTDIR\Contributors.txt"
602 Delete /REBOOTOK "$INSTDIR\Copying.txt"
603 Delete /REBOOTOK "$INSTDIR\FAQ.html"
604 Delete /REBOOTOK "$INSTDIR\Howto.html"
605 Delete /REBOOTOK "$INSTDIR\LameEnc.sys"
606 Delete /REBOOTOK "$INSTDIR\License.txt"
607 Delete /REBOOTOK "$INSTDIR\Manual.html"
608 Delete /REBOOTOK "$INSTDIR\Readme.htm"
609 Delete /REBOOTOK "$INSTDIR\ReadMe.txt"
610 Delete /REBOOTOK "$INSTDIR\PRE_RELEASE_INFO.txt"
611 Delete /REBOOTOK "$INSTDIR\Settings.cfg"
612 Delete /REBOOTOK "$INSTDIR\Translate.html"
613 Delete /REBOOTOK "$INSTDIR\Uninstall.exe"
621 DeleteRegKey HKLM "${MyRegPath}"
622 DeleteRegKey HKCU "${MyRegPath}"
624 DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
625 DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
627 MessageBox MB_YESNO|MB_TOPMOST "$(LAMEXP_LANG_UNINST_PERSONAL)" IDNO +3
628 Delete "$LOCALAPPDATA\LoRd_MuldeR\LameXP - Audio Encoder Front-End\config.ini"
629 Delete "$INSTDIR\*.ini"
631 !insertmacro PrintProgress "$(MUI_UNTEXT_FINISH_TITLE)."
635 ;--------------------------------
636 ;Check For Update Mode
637 ;--------------------------------
639 Function CheckForUpdate
640 ${StdUtils.GetParameter} $R0 "Update" "?"
641 ${IfNotThen} "$R0" == "?" ${|} Goto EnableUpdateMode ${|}
643 ${IfThen} "$INSTDIR" == "" ${|} Return ${|}
644 ${IfThen} "$INSTDIR" == "$EXEDIR" ${|} Return ${|}
645 ${IfNotThen} ${FileExists} "$INSTDIR\LameXP.exe" ${|} Return ${|}
649 FindWindow $R0 "#32770" "" $HWNDPARENT
650 GetDlgItem $R1 $R0 1019
653 FindWindow $R0 "#32770" "" $HWNDPARENT
654 GetDlgItem $R1 $R0 1001
658 Function un.CheckForcedUninstall
659 ${StdUtils.GetParameter} $R0 "Force" "?"
660 ${IfNotThen} "$R0" == "?" ${|} Abort ${|}
664 ;--------------------------------
665 ;Check For Pre-Release
666 ;--------------------------------
668 Function CheckForPreRelease
669 !ifdef LAMEXP_IS_PRERELEASE
670 ${StdUtils.GetParameter} $R0 "Update" "?"
671 StrCmp $R0 "?" 0 SkipPrereleaseWarning
672 MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
674 SkipPrereleaseWarning:
679 ;--------------------------------
681 ;--------------------------------
683 Function LockedListShow
684 !insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
685 !insertmacro GetExecutableName $R0
686 LockedList::AddModule "\$R0"
687 LockedList::AddModule "\Uninstall.exe"
688 LockedList::AddModule "\Au_.exe"
689 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)"
693 Function un.LockedListShow
694 !insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
695 LockedList::AddModule "\LameXP.exe"
696 LockedList::AddModule "\Uninstall.exe"
697 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)"
702 ;--------------------------------
704 ;--------------------------------
706 Function RunAppFunction
707 !insertmacro DisableNextButton $R0
708 !insertmacro GetExecutableName $R0
709 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR" "explore" ""
710 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\$R0" "open" "--first-run"
713 Function ShowReadmeFunction
714 !insertmacro DisableNextButton $R0
715 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\FAQ.html" "open" ""