1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // LameXP - Audio Encoder Front-End
3 ; // Copyright (C) 2004-2015 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 AppPaths
"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
63 !define MyWebSite
"http://muldersoft.com/"
66 ;--------------------------------
67 ;Check for Pre-Release
68 ;--------------------------------
70 !define LAMEXP_IS_PRERELEASE
72 !if '${LAMEXP_INSTTYPE}' ==
'Final'
73 !undef LAMEXP_IS_PRERELEASE
75 !if '${LAMEXP_INSTTYPE}' ==
'Hotfix'
76 !undef LAMEXP_IS_PRERELEASE
80 ;--------------------------------
82 ;--------------------------------
87 !include `StdUtils.nsh`
90 ;--------------------------------
92 ;--------------------------------
94 RequestExecutionLevel admin
96 ShowUninstDetails show
97 Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
98 OutFile "${LAMEXP_OUTPUT_FILE}"
99 BrandingText "Date created: ${LAMEXP_DATE} [Build #${LAMEXP_BUILD}]"
100 InstallDir "$PROGRAMFILES\MuldeR\LameXP v${LAMEXP_VERSION}"
101 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
104 ;--------------------------------
106 ;--------------------------------
108 SetCompressor
/SOLID LZMA
109 SetCompressorDictSize
64
111 !packhdr "$%TEMP%\exehead.tmp" '"${LAMEXP_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
114 ;--------------------------------
116 ;--------------------------------
118 ReserveFile
"${NSISDIR}\Plugins\Aero.dll"
119 ReserveFile
"${NSISDIR}\Plugins\LangDLL.dll"
120 ReserveFile
"${NSISDIR}\Plugins\LockedList.dll"
121 ReserveFile
"${NSISDIR}\Plugins\LockedList64.dll"
122 ReserveFile
"${NSISDIR}\Plugins\nsDialogs.dll"
123 ReserveFile
"${NSISDIR}\Plugins\nsExec.dll"
124 ReserveFile
"${NSISDIR}\Plugins\StartMenu.dll"
125 ReserveFile
"${NSISDIR}\Plugins\StdUtils.dll"
126 ReserveFile
"${NSISDIR}\Plugins\System.dll"
127 ReserveFile
"${NSISDIR}\Plugins\UserInfo.dll"
128 ReserveFile
"checkproc.exe"
131 ;--------------------------------
133 ;--------------------------------
138 ;--------------------------------
140 ;--------------------------------
142 !searchreplace PRODUCT_VERSION_DATE
"${LAMEXP_DATE}" "-" "."
143 VIProductVersion
"${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD}"
145 VIAddVersionKey
"Author" "LoRd_MuldeR <mulder2@gmx.de>"
146 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."
147 VIAddVersionKey
"CompanyName" "Free Software Foundation"
148 VIAddVersionKey
"FileDescription" "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
149 VIAddVersionKey
"FileVersion" "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD} (${LAMEXP_VERSION})"
150 VIAddVersionKey
"LegalCopyright" "Copyright 2004-2015 LoRd_MuldeR"
151 VIAddVersionKey
"LegalTrademarks" "GNU"
152 VIAddVersionKey
"OriginalFilename" "LameXP.${LAMEXP_DATE}.exe"
153 VIAddVersionKey
"ProductName" "LameXP - Audio Encoder Frontend"
154 VIAddVersionKey
"ProductVersion" "${LAMEXP_VERSION}, Build #${LAMEXP_BUILD} (${LAMEXP_DATE})"
155 VIAddVersionKey
"Website" "${MyWebSite}"
158 ;--------------------------------
159 ;MUI2 Interface Settings
160 ;--------------------------------
162 !define MUI_ABORTWARNING
163 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
164 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"${MyRegPath}"
165 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"StartmenuFolder"
166 !define MUI_LANGDLL_REGISTRY_ROOT
HKLM
167 !define MUI_LANGDLL_REGISTRY_KEY
"${MyRegPath}"
168 !define MUI_LANGDLL_REGISTRY_VALUENAME
"SetupLanguage"
169 !define MUI_STARTMENUPAGE_DEFAULTFOLDER
"LameXP v${LAMEXP_VERSION}"
170 !define MUI_FINISHPAGE_NOAUTOCLOSE
171 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
172 !define MUI_FINISHPAGE_RUN
173 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
174 !define MUI_FINISHPAGE_SHOWREADME
175 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
176 !define MUI_FINISHPAGE_LINK
${MyWebSite}
177 !define MUI_FINISHPAGE_LINK_LOCATION
${MyWebSite}
178 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
179 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
180 !define MUI_WELCOMEFINISHPAGE_BITMAP
"wizard.bmp"
181 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"wizard-un.bmp"
182 !define MUI_HEADERIMAGE
183 !define MUI_HEADERIMAGE_BITMAP
"header.bmp"
184 !define MUI_HEADERIMAGE_UNBITMAP
"header-un.bmp"
185 !define MUI_LANGDLL_ALLLANGUAGES
186 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
187 !define MUI_CUSTOMFUNCTION_UNGUIINIT un
.MyGuiInit
188 !define MUI_LANGDLL_ALWAYSSHOW
191 ;--------------------------------
192 ;MUI2 Pages (Installer)
193 ;--------------------------------
196 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
197 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
198 !define MUI_WELCOMEPAGE_TITLE_3LINES
199 !define MUI_FINISHPAGE_TITLE_3LINES
200 !insertmacro MUI_PAGE_WELCOME
203 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
204 !insertmacro MUI_PAGE_LICENSE
"license.rtf"
207 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
208 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
209 !insertmacro MUI_PAGE_DIRECTORY
212 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
213 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
216 Page Custom LockedListShow
219 !insertmacro MUI_PAGE_INSTFILES
222 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
223 !insertmacro MUI_PAGE_FINISH
226 ;--------------------------------
227 ;MUI2 Pages (Uninstaller)
228 ;--------------------------------
231 !define MUI_WELCOMEPAGE_TITLE_3LINES
232 !define MUI_FINISHPAGE_TITLE_3LINES
233 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
234 !insertmacro MUI_UNPAGE_WELCOME
237 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
238 !insertmacro MUI_UNPAGE_CONFIRM
241 UninstPage Custom un
.LockedListShow
244 !insertmacro MUI_UNPAGE_INSTFILES
247 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
248 !insertmacro MUI_UNPAGE_FINISH
251 ;--------------------------------
253 ;--------------------------------
255 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
256 !insertmacro MUI_LANGUAGE
"German"
257 !insertmacro MUI_LANGUAGE
"Spanish"
258 !insertmacro MUI_LANGUAGE
"Russian"
259 !insertmacro MUI_LANGUAGE
"Ukrainian"
260 !insertmacro MUI_LANGUAGE
"Polish"
261 !insertmacro MUI_LANGUAGE
"Hungarian"
263 ; !insertmacro MUI_LANGUAGE "French"
264 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
265 ; !insertmacro MUI_LANGUAGE "SimpChinese"
266 ; !insertmacro MUI_LANGUAGE "TradChinese"
267 ; !insertmacro MUI_LANGUAGE "Japanese"
268 ; !insertmacro MUI_LANGUAGE "Italian"
269 ; !insertmacro MUI_LANGUAGE "Dutch"
270 ; !insertmacro MUI_LANGUAGE "Greek"
271 ; !insertmacro MUI_LANGUAGE "Romanian"
272 ; !insertmacro MUI_LANGUAGE "Serbian"
273 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
274 ; !insertmacro MUI_LANGUAGE "Arabic"
275 ; !insertmacro MUI_LANGUAGE "Portuguese"
276 ; !insertmacro MUI_LANGUAGE "Afrikaans"
277 ; !insertmacro MUI_LANGUAGE "Malay"
278 ; !insertmacro MUI_LANGUAGE "Indonesian"
281 ;--------------------------------
283 ;--------------------------------
286 !include "..\Translation\Blank.nsh"
289 !include "..\Translation\LameXP_DE.nsh"
292 !include "..\Translation\LameXP_ES.nsh"
295 !include "..\Translation\LameXP_RU.nsh"
298 !include "..\Translation\LameXP_UK.nsh"
301 !include "..\Translation\LameXP_PL.nsh"
304 !include "..\Translation\LameXP_HU.nsh"
307 ;--------------------------------
308 ;Installer initialization
309 ;--------------------------------
312 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
315 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the installer is already running!"
321 # Running on Windows NT family?
323 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
324 ExecShell "open" "http://windows.microsoft.com/"
328 # Running on Windows XP or later?
329 ${If} ${AtMostWin2000}
330 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)."
331 ExecShell "open" "http://windows.microsoft.com/"
335 # If on Windows XP, is the required Service Pack installed?
337 ${IfNot} ${RunningX64} # Windows XP 32-Bit, requires Service Pack 3
338 ${AndIf} ${AtMostServicePack} 2
339 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows XP with Service Pack 3 installed!"
340 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 3 for Windows XP now?" IDYES`
341 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=24"
343 ExecShell "open" "http://windowsupdate.microsoft.com/"
347 ${If} ${RunningX64} # Windows XP 64-Bit, requires Service Pack 2
348 ${AndIf} ${AtMostServicePack} 1
349 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows XP x64 Edition with Service Pack 2 installed!"
350 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 2 for Windows XP x64 Edition now?" IDYES`
351 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=17791"
353 ExecShell "open" "http://windowsupdate.microsoft.com/"
361 ${StdUtils
.GetParameter
} $R0 "Update" "?#@"
363 !insertmacro MUI_LANGDLL_DISPLAY
368 UserInfo::GetAccountType
371 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
372 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
379 File "/oname=$PLUGINSDIR\checkproc.exe" "checkproc.exe"
380 nsExec::Exec /TIMEOUT=
5000 '"$PLUGINSDIR\checkproc.exe" Softonic Brothersoft Afreecodec'
385 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
388 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the un-installer is already running!"
392 ${StdUtils
.GetParameter
} $R0 "Force" "?"
394 !insertmacro MUI_LANGDLL_DISPLAY
399 UserInfo::GetAccountType
402 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
403 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
409 ;--------------------------------
411 ;--------------------------------
414 StrCpy $0 $HWNDPARENT
415 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
419 Function un
.MyGuiInit
420 StrCpy $0 $HWNDPARENT
421 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
426 ;--------------------------------
427 ;Macros & Auxiliary Functions
428 ;--------------------------------
430 !macro PrintProgress Text
431 SetDetailsPrint textonly
432 DetailPrint '${Text}'
433 SetDetailsPrint listonly
437 !macro CreateWebLink ShortcutFile TargetURL
440 StrCpy $0 "${ShortcutFile}"
441 StrCpy $1 "${TargetURL}"
447 Function _CreateWebLink
449 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
450 DeleteINISec "$0" "DEFAULT"
451 DeleteINISec "$0" "InternetShortcut"
452 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
453 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
454 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
455 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
456 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
458 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
461 !macro GetExecutableName OutVar
462 ${StdUtils
.GetParameter
} ${OutVar} "Update" ""
463 ${StdUtils
.TrimStr
} ${OutVar}
464 ${IfThen} "${OutVar}" ==
"" ${|
} StrCpy ${OutVar} "LameXP.exe" ${|
}
467 !macro DisableNextButton TmpVar
468 GetDlgItem
${TmpVar} $HWNDPARENT 1
469 EnableWindow
${TmpVar} 0
473 ;--------------------------------
475 ;--------------------------------
478 SetShellVarContext all
479 SetOutPath "$INSTDIR"
482 Section "!Install Files"
483 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_INSTFILES)"
485 Delete "$INSTDIR\Changelog.htm"
486 Delete "$INSTDIR\Changelog.html"
487 Delete "$INSTDIR\Contributors.txt"
488 Delete "$INSTDIR\Copying.txt"
489 Delete "$INSTDIR\FAQ.html"
490 Delete "$INSTDIR\Howto.html"
491 Delete "$INSTDIR\LameEnc.sys"
492 Delete "$INSTDIR\LameXP.exe"
493 Delete "$INSTDIR\LameXP.exe.sig"
494 Delete "$INSTDIR\LameXP-Portable.exe"
495 Delete "$INSTDIR\License.txt"
496 Delete "$INSTDIR\Manual.html"
497 Delete "$INSTDIR\Readme.htm"
498 Delete "$INSTDIR\ReadMe.txt"
499 Delete "$INSTDIR\PRE_RELEASE_INFO.txt"
500 Delete "$INSTDIR\Settings.cfg"
501 Delete "$INSTDIR\Translate.html"
502 Delete "$INSTDIR\Uninstall.exe"
503 RMDir /r
"$INSTDIR\img"
505 !insertmacro GetExecutableName
$R0
509 Delete "$INSTDIR\$R0"
512 MessageBox MB_TOPMOST|
MB_ICONSTOP|
MB_RETRYCANCEL 'Could not delete old "$R0" file. Is LameXP still running?' IDRETRY DeleteOldBinary
513 Abort "Could not delete old binary!"
516 File /a
`/oname=$R0` `${LAMEXP_SOURCE_PATH}\LameXP.exe`
518 File /a
/r
`${LAMEXP_SOURCE_PATH}\*.txt`
519 File /a
/r
`${LAMEXP_SOURCE_PATH}\*.html`
520 File /a
/r
`${LAMEXP_SOURCE_PATH}\*.png`
523 Section "-Write Uinstaller"
524 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_MAKEUNINST)"
525 WriteUninstaller "$INSTDIR\Uninstall.exe"
528 Section "-Create Shortcuts"
529 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
530 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_SHORTCUTS)"
531 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
533 SetShellVarContext current
535 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
536 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
537 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
539 SetShellVarContext all
541 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
542 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
543 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
545 !insertmacro GetExecutableName
$R0
547 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
548 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_LICENSE).lnk" "$INSTDIR\License.txt"
549 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\Changelog.html"
550 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_TRANSLATE).lnk" "$INSTDIR\Translate.html"
551 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_MANUAL).lnk" "$INSTDIR\Manual.html"
552 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
554 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Official LameXP Homepage.url" "${MyWebSite}"
555 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
556 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Bug Tracker.url" "https://github.com/lordmulder/LameXP/issues"
557 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\RareWares.org.url" "http://rarewares.org/"
558 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Hydrogenaudio Forums.url" "http://www.hydrogenaudio.org/"
560 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
561 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils
.Const
.ISV_PinToTaskbar
}
562 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
564 !insertmacro MUI_STARTMENU_WRITE_END
567 Section "-Update Registry"
568 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_REGISTRY)"
570 !insertmacro GetExecutableName
$R0
571 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
572 WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
573 WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
574 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
575 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "LameXP v${LAMEXP_VERSION}"
576 WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
577 WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
578 WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
579 WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
581 WriteRegStr HKLM "${AppPaths}\LameXP.exe" "" "$INSTDIR\$R0"
582 WriteRegStr HKLM "${AppPaths}\LameXP.exe" "Path" "$INSTDIR"
586 !insertmacro PrintProgress
"$(MUI_TEXT_FINISH_TITLE)."
588 !ifdef LAMEXP_IS_PRERELEASE
589 ${If} ${FileExists} "$INSTDIR\PRE_RELEASE_INFO.txt"
590 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\PRE_RELEASE_INFO.txt" "open" ""
594 ${StdUtils
.GetParameter
} $R0 "Update" "?#@"
595 ${IfNotThen} "$R0" ==
"?#@" ${|
} SetAutoClose true
${|
}
599 ;--------------------------------
601 ;--------------------------------
605 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_UNINSTALL)"
611 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
612 ${IfNot} "$StartMenuFolder" ==
""
613 SetShellVarContext current
614 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
615 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
616 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
618 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
619 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
620 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
621 RMDir "$SMPROGRAMS\$StartMenuFolder"
624 SetShellVarContext all
625 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
626 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
627 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
629 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
630 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
631 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
632 RMDir "$SMPROGRAMS\$StartMenuFolder"
640 ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
641 ${IfThen} "$R0" ==
"" ${|
} StrCpy $R0 "LameXP.exe" ${|
}
643 Delete /REBOOTOK
"$INSTDIR\LameXP.exe"
644 Delete /REBOOTOK
"$INSTDIR\$R0"
645 Delete /REBOOTOK
"$INSTDIR\LameXP-Portable.exe"
646 Delete /REBOOTOK
"$INSTDIR\LameXP.exe.sig"
647 Delete /REBOOTOK
"$INSTDIR\LameXP*"
649 Delete /REBOOTOK
"$INSTDIR\Changelog.htm"
650 Delete /REBOOTOK
"$INSTDIR\Changelog.html"
651 Delete /REBOOTOK
"$INSTDIR\Contributors.txt"
652 Delete /REBOOTOK
"$INSTDIR\Copying.txt"
653 Delete /REBOOTOK
"$INSTDIR\FAQ.html"
654 Delete /REBOOTOK
"$INSTDIR\Howto.html"
655 Delete /REBOOTOK
"$INSTDIR\LameEnc.sys"
656 Delete /REBOOTOK
"$INSTDIR\License.txt"
657 Delete /REBOOTOK
"$INSTDIR\Manual.html"
658 Delete /REBOOTOK
"$INSTDIR\Readme.htm"
659 Delete /REBOOTOK
"$INSTDIR\ReadMe.txt"
660 Delete /REBOOTOK
"$INSTDIR\PRE_RELEASE_INFO.txt"
661 Delete /REBOOTOK
"$INSTDIR\Settings.cfg"
662 Delete /REBOOTOK
"$INSTDIR\Translate.html"
663 Delete /REBOOTOK
"$INSTDIR\Uninstall.exe"
665 RMDir /r
"$INSTDIR\img"
672 DeleteRegKey HKLM "${MyRegPath}"
673 DeleteRegKey HKCU "${MyRegPath}"
675 DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
676 DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
678 DeleteRegKey HKLM "${AppPaths}\LameXP.exe"
679 DeleteRegKey HKCU "${AppPaths}\LameXP.exe"
681 MessageBox MB_YESNO|
MB_TOPMOST "$(LAMEXP_LANG_UNINST_PERSONAL)" IDNO +3
682 Delete "$LOCALAPPDATA\LoRd_MuldeR\LameXP - Audio Encoder Front-End\config.ini"
683 Delete "$INSTDIR\*.ini"
685 !insertmacro PrintProgress
"$(MUI_UNTEXT_FINISH_TITLE)."
689 ;--------------------------------
690 ;Check For Update Mode
691 ;--------------------------------
693 Function SkipIfUpdate
694 ${StdUtils
.GetParameter
} $R0 "Update" "?#@"
695 ${IfNotThen} "$R0" ==
"?#@" ${|
} Abort ${|
}
698 Function CheckForUpdate
699 ${If} "$INSTDIR" ==
""
700 ${OrIf} "$INSTDIR" ==
"$EXEDIR"
701 ${OrIfNot} ${FileExists} "$INSTDIR\LameXP.exe"
705 FindWindow $R0 "#32770" "" $HWNDPARENT
706 GetDlgItem
$R1 $R0 1019
709 FindWindow $R0 "#32770" "" $HWNDPARENT
710 GetDlgItem
$R1 $R0 1001
714 Function un
.CheckForcedUninstall
715 ${StdUtils
.GetParameter
} $R0 "Force" "?#@"
716 ${IfNotThen} "$R0" ==
"?#@" ${|
} Abort ${|
}
720 ;--------------------------------
721 ;Check For Pre-Release
722 ;--------------------------------
724 Function CheckForPreRelease
725 !ifdef LAMEXP_IS_PRERELEASE
726 ${StdUtils
.GetParameter
} $R0 "Update" "?#@"
727 StrCmp $R0 "?#@" 0 SkipPrereleaseWarning
728 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD
IDOK IDOK +2
730 SkipPrereleaseWarning:
735 ;--------------------------------
737 ;--------------------------------
739 !macro _LockedListShow uinst
740 !insertmacro MUI_HEADER_TEXT
"$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
743 File /oname=
$PLUGINSDIR\LockedList64
.dll
`${NSISDIR}\Plugins\LockedList64.dll`
745 !insertmacro GetExecutableName
$R0
746 LockedList::AddFolder
"$INSTDIR"
747 LockedList::AddModule
"\$R0"
748 LockedList::AddModule
"\Uninstall.exe"
750 LockedList::AddModule
"\Au_.exe"
752 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)"
756 Function LockedListShow
757 !insertmacro _LockedListShow
0
760 Function un
.LockedListShow
761 !insertmacro _LockedListShow
1
765 ;--------------------------------
767 ;--------------------------------
769 Function RunAppFunction
770 !insertmacro DisableNextButton
$R0
771 !insertmacro GetExecutableName
$R0
772 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR" "explore" ""
773 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"
776 Function ShowReadmeFunction
777 !insertmacro DisableNextButton
$R0
778 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\Manual.html" "open" ""
781 Function .onInstSuccess
782 ${StdUtils
.GetParameter
} $R0 "Update" "?#@"
783 ${IfNot} "$R0" ==
"?#@"
784 !insertmacro GetExecutableName
$R0
785 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"