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 !!!"
56 !error "LAMEXP_REDIST is not defined !!!"
60 !define MyRegPath
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}"
63 !define AppPaths
"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
66 !define MyWebSite
"http://muldersoft.com/"
69 ;--------------------------------
70 ;Check for Pre-Release
71 ;--------------------------------
73 !define LAMEXP_IS_PRERELEASE
75 !if '${LAMEXP_INSTTYPE}' ==
'Final'
76 !undef LAMEXP_IS_PRERELEASE
78 !if '${LAMEXP_INSTTYPE}' ==
'Hotfix'
79 !undef LAMEXP_IS_PRERELEASE
83 ;--------------------------------
85 ;--------------------------------
88 !packhdr "${PACKHDRTEMP}" '"..\Utilities\MT.exe" -manifest "setup.manifest" -outputresource:"${PACKHDRTEMP};1"'
91 ;--------------------------------
93 ;--------------------------------
98 !include `StdUtils.nsh`
101 ;--------------------------------
102 ;Installer Attributes
103 ;--------------------------------
105 RequestExecutionLevel admin
107 ShowUninstDetails show
108 Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
109 OutFile "${LAMEXP_OUTPUT_FILE}"
110 BrandingText "Date created: ${LAMEXP_DATE} [Build #${LAMEXP_BUILD}]"
111 InstallDir "$PROGRAMFILES\MuldeR\LameXP v${LAMEXP_VERSION}"
112 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
115 ;--------------------------------
117 ;--------------------------------
119 SetCompressor
/SOLID LZMA
120 SetCompressorDictSize
64
122 #!packhdr "$%TEMP%\exehead.tmp" '"${LAMEXP_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
125 ;--------------------------------
127 ;--------------------------------
129 ReserveFile
"${NSISDIR}\Plugins\Aero.dll"
130 ReserveFile
"${NSISDIR}\Plugins\LangDLL.dll"
131 ReserveFile
"${NSISDIR}\Plugins\LockedList.dll"
132 ReserveFile
"${NSISDIR}\Plugins\LockedList64.dll"
133 ReserveFile
"${NSISDIR}\Plugins\nsDialogs.dll"
134 ReserveFile
"${NSISDIR}\Plugins\nsExec.dll"
135 ReserveFile
"${NSISDIR}\Plugins\StartMenu.dll"
136 ReserveFile
"${NSISDIR}\Plugins\StdUtils.dll"
137 ReserveFile
"${NSISDIR}\Plugins\System.dll"
138 ReserveFile
"${NSISDIR}\Plugins\UserInfo.dll"
141 ;--------------------------------
143 ;--------------------------------
148 ;--------------------------------
150 ;--------------------------------
152 !searchreplace PRODUCT_VERSION_DATE
"${LAMEXP_DATE}" "-" "."
153 VIProductVersion
"${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD}"
155 VIAddVersionKey
"Author" "LoRd_MuldeR <mulder2@gmx.de>"
156 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."
157 VIAddVersionKey
"CompanyName" "Free Software Foundation"
158 VIAddVersionKey
"FileDescription" "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
159 VIAddVersionKey
"FileVersion" "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD} (${LAMEXP_VERSION})"
160 VIAddVersionKey
"LegalCopyright" "Copyright 2004-2015 LoRd_MuldeR"
161 VIAddVersionKey
"LegalTrademarks" "GNU"
162 VIAddVersionKey
"OriginalFilename" "LameXP.${LAMEXP_DATE}.exe"
163 VIAddVersionKey
"ProductName" "LameXP - Audio Encoder Frontend"
164 VIAddVersionKey
"ProductVersion" "${LAMEXP_VERSION}, Build #${LAMEXP_BUILD} (${LAMEXP_DATE})"
165 VIAddVersionKey
"Website" "${MyWebSite}"
168 ;--------------------------------
169 ;MUI2 Interface Settings
170 ;--------------------------------
172 !define MUI_ABORTWARNING
173 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
174 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"${MyRegPath}"
175 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"StartmenuFolder"
176 !define MUI_LANGDLL_REGISTRY_ROOT
HKLM
177 !define MUI_LANGDLL_REGISTRY_KEY
"${MyRegPath}"
178 !define MUI_LANGDLL_REGISTRY_VALUENAME
"SetupLanguage"
179 !define MUI_STARTMENUPAGE_DEFAULTFOLDER
"LameXP v${LAMEXP_VERSION}"
180 !define MUI_FINISHPAGE_NOAUTOCLOSE
181 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
182 !define MUI_FINISHPAGE_RUN
183 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
184 !define MUI_FINISHPAGE_SHOWREADME
185 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
186 !define MUI_FINISHPAGE_LINK
${MyWebSite}
187 !define MUI_FINISHPAGE_LINK_LOCATION
${MyWebSite}
188 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
189 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
190 !define MUI_WELCOMEFINISHPAGE_BITMAP
"wizard.bmp"
191 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"wizard-un.bmp"
192 !define MUI_HEADERIMAGE
193 !define MUI_HEADERIMAGE_BITMAP
"header.bmp"
194 !define MUI_HEADERIMAGE_UNBITMAP
"header-un.bmp"
195 !define MUI_LANGDLL_ALLLANGUAGES
196 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
197 !define MUI_CUSTOMFUNCTION_UNGUIINIT un
.MyGuiInit
198 !define MUI_LANGDLL_ALWAYSSHOW
201 ;--------------------------------
202 ;MUI2 Pages (Installer)
203 ;--------------------------------
206 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
207 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
208 !define MUI_WELCOMEPAGE_TITLE_3LINES
209 !define MUI_FINISHPAGE_TITLE_3LINES
210 !insertmacro MUI_PAGE_WELCOME
213 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
214 !insertmacro MUI_PAGE_LICENSE
"license.rtf"
217 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
218 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
219 !insertmacro MUI_PAGE_DIRECTORY
222 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
223 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
226 Page Custom LockedListShow
229 !insertmacro MUI_PAGE_INSTFILES
232 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
233 !insertmacro MUI_PAGE_FINISH
236 ;--------------------------------
237 ;MUI2 Pages (Uninstaller)
238 ;--------------------------------
241 !define MUI_WELCOMEPAGE_TITLE_3LINES
242 !define MUI_FINISHPAGE_TITLE_3LINES
243 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
244 !insertmacro MUI_UNPAGE_WELCOME
247 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
248 !insertmacro MUI_UNPAGE_CONFIRM
251 UninstPage Custom un
.LockedListShow
254 !insertmacro MUI_UNPAGE_INSTFILES
257 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
258 !insertmacro MUI_UNPAGE_FINISH
261 ;--------------------------------
263 ;--------------------------------
265 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
266 !insertmacro MUI_LANGUAGE
"German"
267 !insertmacro MUI_LANGUAGE
"Spanish"
268 !insertmacro MUI_LANGUAGE
"Russian"
269 !insertmacro MUI_LANGUAGE
"Ukrainian"
270 !insertmacro MUI_LANGUAGE
"Polish"
271 !insertmacro MUI_LANGUAGE
"Hungarian"
273 ; !insertmacro MUI_LANGUAGE "French"
274 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
275 ; !insertmacro MUI_LANGUAGE "SimpChinese"
276 ; !insertmacro MUI_LANGUAGE "TradChinese"
277 ; !insertmacro MUI_LANGUAGE "Japanese"
278 ; !insertmacro MUI_LANGUAGE "Italian"
279 ; !insertmacro MUI_LANGUAGE "Dutch"
280 ; !insertmacro MUI_LANGUAGE "Greek"
281 ; !insertmacro MUI_LANGUAGE "Romanian"
282 ; !insertmacro MUI_LANGUAGE "Serbian"
283 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
284 ; !insertmacro MUI_LANGUAGE "Arabic"
285 ; !insertmacro MUI_LANGUAGE "Portuguese"
286 ; !insertmacro MUI_LANGUAGE "Afrikaans"
287 ; !insertmacro MUI_LANGUAGE "Malay"
288 ; !insertmacro MUI_LANGUAGE "Indonesian"
291 ;--------------------------------
293 ;--------------------------------
296 !include "..\Translation\Blank.nsh"
299 !include "..\Translation\LameXP_DE.nsh"
302 !include "..\Translation\LameXP_ES.nsh"
305 !include "..\Translation\LameXP_RU.nsh"
308 !include "..\Translation\LameXP_UK.nsh"
311 !include "..\Translation\LameXP_PL.nsh"
314 !include "..\Translation\LameXP_HU.nsh"
317 ;--------------------------------
319 ;--------------------------------
321 !macro _UnattendedMode _a _b _t _f
322 !insertmacro _LOGICLIB_TEMP
323 ${StdUtils
.TestParameter
} $_LOGICLIB_TEMP "Update"
324 StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
326 !define UnattendedMode
`"" UnattendedMode ""`
328 !macro _ForcedMode _a _b _t _f
329 !insertmacro _LOGICLIB_TEMP
330 ${StdUtils
.TestParameter
} $_LOGICLIB_TEMP "Force"
331 StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
333 !define ForcedMode
`"" ForcedMode ""`
335 !macro _ValidFileName _a _b _t _f
336 !insertmacro _LOGICLIB_TEMP
337 ${StdUtils
.ValidFileName
} $_LOGICLIB_TEMP `${_b}`
338 StrCmp "$_LOGICLIB_TEMP" "ok" `${_t}` `${_f}`
340 !define ValidFileName
`"" ValidFileName`
343 ;--------------------------------
344 ;Installer initialization
345 ;--------------------------------
352 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
355 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the installer is already running!"
361 # Running on Windows NT family?
363 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
364 ExecShell "open" "http://windows.microsoft.com/"
368 # Running on Windows XP or later?
369 ${If} ${AtMostWin2000}
370 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)."
371 ExecShell "open" "http://windows.microsoft.com/"
375 # If on Windows XP, is the required Service Pack installed?
377 ${IfNot} ${RunningX64} # Windows XP 32-Bit, requires Service Pack 3
378 ${AndIf} ${AtMostServicePack} 2
379 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows XP with Service Pack 3 installed!"
380 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 3 for Windows XP now?" IDYES`
381 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=24"
383 ExecShell "open" "http://windowsupdate.microsoft.com/"
387 ${If} ${RunningX64} # Windows XP 64-Bit, requires Service Pack 2
388 ${AndIf} ${AtMostServicePack} 1
389 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows XP x64 Edition with Service Pack 2 installed!"
390 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 2 for Windows XP x64 Edition now?" IDYES`
391 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=17791"
393 ExecShell "open" "http://windowsupdate.microsoft.com/"
401 ${IfNot} ${UnattendedMode}
402 !insertmacro MUI_LANGDLL_DISPLAY
407 UserInfo::GetAccountType
410 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
411 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
417 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
420 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the un-installer is already running!"
424 ${IfNot} ${ForcedMode}
425 !insertmacro MUI_LANGDLL_DISPLAY
430 UserInfo::GetAccountType
433 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
434 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
440 ;--------------------------------
442 ;--------------------------------
445 StrCpy $0 $HWNDPARENT
446 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
450 Function un
.MyGuiInit
451 StrCpy $0 $HWNDPARENT
452 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
457 ;--------------------------------
458 ;Macros & Auxiliary Functions
459 ;--------------------------------
461 !macro PrintProgress Text
462 SetDetailsPrint textonly
463 DetailPrint '${Text}'
464 SetDetailsPrint listonly
468 !macro CreateWebLink ShortcutFile TargetURL
471 StrCpy $0 "${ShortcutFile}"
472 StrCpy $1 "${TargetURL}"
478 Function _CreateWebLink
480 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
481 DeleteINISec "$0" "DEFAULT"
482 DeleteINISec "$0" "InternetShortcut"
483 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
484 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
485 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
486 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
487 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
489 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
492 !macro GetExecutableName OutVar
493 ${StdUtils
.GetParameter
} ${OutVar} "Update" ""
494 ${StdUtils
.TrimStr
} ${OutVar}
495 ${If} "${OutVar}" ==
""
496 ${OrIfNot} ${ValidFileName} "${OutVar}"
497 StrCpy ${OutVar} "LameXP.exe"
501 !macro DisableNextButton TmpVar
502 GetDlgItem
${TmpVar} $HWNDPARENT 1
503 EnableWindow
${TmpVar} 0
506 !macro DisableBackButton TmpVar
507 GetDlgItem
${TmpVar} $HWNDPARENT 3
508 EnableWindow
${TmpVar} 0
511 !macro CleanUpFiles options
512 Delete ${options} "$INSTDIR\Changelog.htm"
513 Delete ${options} "$INSTDIR\Changelog.html"
514 Delete ${options} "$INSTDIR\Contributors.txt"
515 Delete ${options} "$INSTDIR\Copying.txt"
516 Delete ${options} "$INSTDIR\FAQ.html"
517 Delete ${options} "$INSTDIR\Howto.html"
518 Delete ${options} "$INSTDIR\LameEnc.sys"
519 Delete ${options} "$INSTDIR\LameXP.exe"
520 Delete ${options} "$INSTDIR\LameXP.exe.sig"
521 Delete ${options} "$INSTDIR\LameXP-Portable.exe"
522 Delete ${options} "$INSTDIR\License.txt"
523 Delete ${options} "$INSTDIR\Manual.html"
524 Delete ${options} "$INSTDIR\Readme.htm"
525 Delete ${options} "$INSTDIR\ReadMe.txt"
526 Delete ${options} "$INSTDIR\PRE_RELEASE_INFO.txt"
527 Delete ${options} "$INSTDIR\Settings.cfg"
528 Delete ${options} "$INSTDIR\Translate.html"
529 Delete ${options} "$INSTDIR\Uninstall.exe"
530 Delete ${options} "$INSTDIR\Qt*.dll"
531 Delete ${options} "$INSTDIR\msvcr*.dll"
532 Delete ${options} "$INSTDIR\msvcp*.dll"
533 Delete ${options} "$INSTDIR\concrt*.dll"
534 Delete ${options} "$INSTDIR\vcruntime*.dll"
535 Delete ${options} "$INSTDIR\vccorlib*.dll"
537 RMDir /r
${options} "$INSTDIR\cache"
538 RMDir /r
${options} "$INSTDIR\img"
539 RMDir /r
${options} "$INSTDIR\imageformats"
540 RMDir /r
${options} "$INSTDIR\redist"
543 ;--------------------------------
545 ;--------------------------------
548 SetShellVarContext all
549 SetOutPath "$INSTDIR"
552 Section "!Clean Up Old Cruft"
553 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_CLEANUP)"
554 !insertmacro CleanUpFiles
""
557 Section "!Install Files"
558 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_INSTFILES)"
561 !insertmacro GetExecutableName
$R0
563 Delete "$INSTDIR\$R0"
566 MessageBox MB_TOPMOST|
MB_ICONSTOP|
MB_RETRYCANCEL 'Could not delete old "$R0" file. Is LameXP still running?' IDRETRY DeleteOldBinary
567 Abort "Could not delete old binary!"
570 File /a
`/oname=$R0` `${LAMEXP_SOURCE_PATH}\LameXP.exe`
571 File /nonfatal
/a
/r
`${LAMEXP_SOURCE_PATH}\*.dll`
573 File /a
/r
`${LAMEXP_SOURCE_PATH}\*.txt`
574 File /a
/r
`${LAMEXP_SOURCE_PATH}\*.html`
575 File /a
/r
`${LAMEXP_SOURCE_PATH}\*.png`
578 !if ${LAMEXP_REDIST} !=
0
579 Section "-Install VCRedist"
580 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_VCREDIST)"
581 File /a
`/oname=$PLUGINSDIR\vcredist_x86.exe` `${LAMEXP_SOURCE_PATH}\redist\vcredist_x86.exe`
582 ExecWait '"$PLUGINSDIR\vcredist_x86.exe" /install /passive /norestart'
586 Section "-Write Uninstaller"
587 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_MAKEUNINST)"
588 WriteUninstaller "$INSTDIR\Uninstall.exe"
591 Section "-Create Shortcuts"
592 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
593 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_SHORTCUTS)"
594 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
596 SetShellVarContext current
598 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
599 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
600 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
602 SetShellVarContext all
604 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
605 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
606 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
608 !insertmacro GetExecutableName
$R0
610 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
611 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_LICENSE).lnk" "$INSTDIR\License.txt"
612 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\Changelog.html"
613 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_TRANSLATE).lnk" "$INSTDIR\Translate.html"
614 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_MANUAL).lnk" "$INSTDIR\Manual.html"
615 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
617 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Official LameXP Homepage.url" "${MyWebSite}"
618 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
619 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Bug Tracker.url" "https://github.com/lordmulder/LameXP/issues"
620 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\RareWares.org.url" "http://rarewares.org/"
621 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Hydrogenaudio Forums.url" "http://www.hydrogenaudio.org/"
623 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
624 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils
.Const
.ISV_PinToTaskbar
}
625 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
627 !insertmacro MUI_STARTMENU_WRITE_END
630 Section "-Update Registry"
631 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_REGISTRY)"
633 !insertmacro GetExecutableName
$R0
634 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
635 WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
636 WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
637 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
638 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "LameXP v${LAMEXP_VERSION}"
639 WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
640 WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
641 WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
642 WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
644 WriteRegStr HKLM "${AppPaths}\LameXP.exe" "" "$INSTDIR\$R0"
645 WriteRegStr HKLM "${AppPaths}\LameXP.exe" "Path" "$INSTDIR"
649 !insertmacro PrintProgress
"$(MUI_TEXT_FINISH_TITLE)."
651 !ifdef LAMEXP_IS_PRERELEASE
652 ${If} ${FileExists} "$INSTDIR\PRE_RELEASE_INFO.txt"
653 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\PRE_RELEASE_INFO.txt" "open" ""
657 ${IfThen} ${UnattendedMode} ${|
} SetAutoClose true
${|
}
661 ;--------------------------------
663 ;--------------------------------
667 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_UNINSTALL)"
673 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
674 ${IfNot} "$StartMenuFolder" ==
""
675 SetShellVarContext current
676 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
677 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
678 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
680 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
681 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
682 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
683 RMDir "$SMPROGRAMS\$StartMenuFolder"
686 SetShellVarContext all
687 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
688 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
689 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
691 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
692 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
693 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
694 RMDir "$SMPROGRAMS\$StartMenuFolder"
702 ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
703 ${IfThen} "$R0" ==
"" ${|
} StrCpy $R0 "LameXP.exe" ${|
}
705 Delete /REBOOTOK
"$INSTDIR\$R0"
706 !insertmacro CleanUpFiles
/REBOOTOK
713 DeleteRegKey HKLM "${MyRegPath}"
714 DeleteRegKey HKCU "${MyRegPath}"
716 DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
717 DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
719 DeleteRegKey HKLM "${AppPaths}\LameXP.exe"
720 DeleteRegKey HKCU "${AppPaths}\LameXP.exe"
722 MessageBox MB_YESNO|
MB_TOPMOST "$(LAMEXP_LANG_UNINST_PERSONAL)" IDNO +3
723 Delete "$LOCALAPPDATA\LoRd_MuldeR\LameXP - Audio Encoder Front-End\config.ini"
724 Delete "$INSTDIR\*.ini"
726 !insertmacro PrintProgress
"$(MUI_UNTEXT_FINISH_TITLE)."
730 ;--------------------------------
731 ;Check For Update Mode
732 ;--------------------------------
734 Function SkipIfUnattended
735 ${IfThen} ${UnattendedMode} ${|
} Abort ${|
}
738 Function CheckForUpdate
739 ${If} "$INSTDIR" ==
""
740 ${OrIf} "$INSTDIR" ==
"$EXEDIR"
741 ${OrIfNot} ${FileExists} "$INSTDIR\LameXP.exe"
745 FindWindow $R0 "#32770" "" $HWNDPARENT
746 GetDlgItem
$R1 $R0 1019
749 FindWindow $R0 "#32770" "" $HWNDPARENT
750 GetDlgItem
$R1 $R0 1001
754 Function un
.CheckForcedUninstall
755 ${IfThen} ${ForcedMode} ${|
} Abort ${|
}
759 ;--------------------------------
760 ;Check For Pre-Release
761 ;--------------------------------
763 Function CheckForPreRelease
764 !ifdef LAMEXP_IS_PRERELEASE
765 ${IfNot} ${UnattendedMode}
766 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD
IDOK IDOK +2
773 ;--------------------------------
775 ;--------------------------------
777 !macro _LockedListShow uinst
778 !insertmacro MUI_HEADER_TEXT
"$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
779 ${If} ${UnattendedMode}
780 !insertmacro DisableBackButton
$R0
784 File /oname=
$PLUGINSDIR\LockedList64
.dll
`${NSISDIR}\Plugins\LockedList64.dll`
786 !insertmacro GetExecutableName
$R0
787 LockedList::AddModule
"\$R0"
788 ${If} "$R0" !=
"LameXP.exe"
789 LockedList::AddModule
"\LameXP.exe"
791 LockedList::AddModule
"\Uninstall.exe"
793 LockedList::AddModule
"\Au_.exe"
795 LockedList::AddFolder
"$INSTDIR"
796 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)"
800 Function LockedListShow
801 !insertmacro _LockedListShow
0
804 Function un
.LockedListShow
805 !insertmacro _LockedListShow
1
809 ;--------------------------------
811 ;--------------------------------
813 Function RunAppFunction
814 !insertmacro DisableNextButton
$R0
815 !insertmacro GetExecutableName
$R0
816 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR" "explore" ""
817 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"
820 Function ShowReadmeFunction
821 !insertmacro DisableNextButton
$R0
822 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\Manual.html" "open" ""
825 Function .onInstSuccess
826 ${If} ${UnattendedMode}
827 !insertmacro GetExecutableName
$R0
828 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"