1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // LameXP - Audio Encoder Front-End
3 ; // Copyright (C) 2004-2012 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 ; ///////////////////////////////////////////////////////////////////////////////
22 ;--------------------------------
24 ;--------------------------------
26 !ifndef LAMEXP_VERSION
27 !error "LAMEXP_VERSION is not defined !!!"
30 !error "LAMEXP_BUILD is not defined !!!"
32 !ifndef LAMEXP_INSTTYPE
33 !error "LAMEXP_INSTTYPE is not defined !!!"
36 !error "LAMEXP_PATCH is not defined !!!"
39 !error "LAMEXP_DATE is not defined !!!"
41 !ifndef LAMEXP_OUTPUT_FILE
42 !error "LAMEXP_OUTPUT_FILE is not defined !!!"
44 !ifndef LAMEXP_SOURCE_PATH
45 !error "LAMEXP_SOURCE_PATH is not defined !!!"
47 !ifndef LAMEXP_UPX_PATH
48 !error "LAMEXP_UPX_PATH is not defined !!!"
52 !define MyRegPath
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}"
55 !define MyWebSite
"http://mulder.at.gg/"
58 ;--------------------------------
59 ;Check for Pre-Release
60 ;--------------------------------
62 !define LAMEXP_IS_PRERELEASE
64 !if '${LAMEXP_INSTTYPE}' ==
'Final'
65 !undef LAMEXP_IS_PRERELEASE
67 !if '${LAMEXP_INSTTYPE}' ==
'Hotfix'
68 !undef LAMEXP_IS_PRERELEASE
72 ;--------------------------------
74 ;--------------------------------
78 !include `StdUtils.nsh`
81 ;--------------------------------
83 ;--------------------------------
85 RequestExecutionLevel admin
87 ShowUninstDetails show
88 Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
89 OutFile "${LAMEXP_OUTPUT_FILE}"
90 BrandingText "Date created: ${LAMEXP_DATE} [Build #${LAMEXP_BUILD}]"
91 InstallDir "$PROGRAMFILES\MuldeR\LameXP v${LAMEXP_VERSION}"
92 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
95 ;--------------------------------
97 ;--------------------------------
99 SetCompressor
/SOLID LZMA
100 SetCompressorDictSize
64
102 !packhdr "$%TEMP%\exehead.tmp" '"${LAMEXP_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
105 ;--------------------------------
107 ;--------------------------------
109 ReserveFile
"${NSISDIR}\Plugins\Aero.dll"
110 ReserveFile
"${NSISDIR}\Plugins\LangDLL.dll"
111 ReserveFile
"${NSISDIR}\Plugins\LockedList.dll"
112 ReserveFile
"${NSISDIR}\Plugins\nsDialogs.dll"
113 ReserveFile
"${NSISDIR}\Plugins\nsExec.dll"
114 ReserveFile
"${NSISDIR}\Plugins\StartMenu.dll"
115 ReserveFile
"${NSISDIR}\Plugins\StdUtils.dll"
116 ReserveFile
"${NSISDIR}\Plugins\System.dll"
117 ReserveFile
"${NSISDIR}\Plugins\UserInfo.dll"
118 ReserveFile
"checkproc.exe"
121 ;--------------------------------
123 ;--------------------------------
128 ;--------------------------------
130 ;--------------------------------
132 !searchreplace PRODUCT_VERSION_DATE
"${LAMEXP_DATE}" "-" "."
133 VIProductVersion
"${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD}"
135 VIAddVersionKey
"Author" "LoRd_MuldeR <mulder2@gmx.de>"
136 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."
137 VIAddVersionKey
"CompanyName" "Free Software Foundation"
138 VIAddVersionKey
"FileDescription" "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
139 VIAddVersionKey
"FileVersion" "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD} (${LAMEXP_VERSION})"
140 VIAddVersionKey
"LegalCopyright" "Copyright 2004-2012 LoRd_MuldeR"
141 VIAddVersionKey
"LegalTrademarks" "GNU"
142 VIAddVersionKey
"OriginalFilename" "LameXP.${LAMEXP_DATE}.exe"
143 VIAddVersionKey
"ProductName" "LameXP - Audio Encoder Frontend"
144 VIAddVersionKey
"ProductVersion" "${LAMEXP_VERSION}, Build #${LAMEXP_BUILD} (${LAMEXP_DATE})"
145 VIAddVersionKey
"Website" "${MyWebSite}"
148 ;--------------------------------
149 ;MUI2 Interface Settings
150 ;--------------------------------
152 !define MUI_ABORTWARNING
153 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
154 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"${MyRegPath}"
155 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"StartmenuFolder"
156 !define MUI_LANGDLL_REGISTRY_ROOT
HKLM
157 !define MUI_LANGDLL_REGISTRY_KEY
"${MyRegPath}"
158 !define MUI_LANGDLL_REGISTRY_VALUENAME
"SetupLanguage"
159 !define MUI_STARTMENUPAGE_DEFAULTFOLDER
"LameXP v${LAMEXP_VERSION}"
160 !define MUI_FINISHPAGE_NOAUTOCLOSE
161 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
162 !define MUI_FINISHPAGE_RUN
163 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
164 !define MUI_FINISHPAGE_SHOWREADME
165 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
166 !define MUI_FINISHPAGE_LINK
${MyWebSite}
167 !define MUI_FINISHPAGE_LINK_LOCATION
${MyWebSite}
168 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
169 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
170 !define MUI_WELCOMEFINISHPAGE_BITMAP
"wizard.bmp"
171 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"wizard-un.bmp"
172 !define MUI_HEADERIMAGE
173 !define MUI_HEADERIMAGE_BITMAP
"header.bmp"
174 !define MUI_HEADERIMAGE_UNBITMAP
"header-un.bmp"
175 !define MUI_LANGDLL_ALLLANGUAGES
176 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
177 !define MUI_CUSTOMFUNCTION_UNGUIINIT un
.MyGuiInit
178 !define MUI_LANGDLL_ALWAYSSHOW
181 ;--------------------------------
183 ;--------------------------------
186 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
187 !define MUI_WELCOMEPAGE_TITLE_3LINES
188 !define MUI_FINISHPAGE_TITLE_3LINES
189 !insertmacro MUI_PAGE_WELCOME
190 !insertmacro MUI_PAGE_LICENSE
"license.rtf"
191 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
192 !insertmacro MUI_PAGE_DIRECTORY
193 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
194 Page Custom LockedListShow
195 !insertmacro MUI_PAGE_INSTFILES
196 !insertmacro MUI_PAGE_FINISH
199 !define MUI_WELCOMEPAGE_TITLE_3LINES
200 !define MUI_FINISHPAGE_TITLE_3LINES
201 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
202 !insertmacro MUI_UNPAGE_WELCOME
203 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
204 !insertmacro MUI_UNPAGE_CONFIRM
205 UninstPage Custom un
.LockedListShow
206 !insertmacro MUI_UNPAGE_INSTFILES
207 !insertmacro MUI_UNPAGE_FINISH
210 ;--------------------------------
212 ;--------------------------------
214 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
215 !insertmacro MUI_LANGUAGE
"German"
216 !insertmacro MUI_LANGUAGE
"Spanish"
217 !insertmacro MUI_LANGUAGE
"Russian"
218 !insertmacro MUI_LANGUAGE
"Ukrainian"
220 ; !insertmacro MUI_LANGUAGE "French"
221 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
222 ; !insertmacro MUI_LANGUAGE "SimpChinese"
223 ; !insertmacro MUI_LANGUAGE "TradChinese"
224 ; !insertmacro MUI_LANGUAGE "Japanese"
225 ; !insertmacro MUI_LANGUAGE "Italian"
226 ; !insertmacro MUI_LANGUAGE "Dutch"
227 ; !insertmacro MUI_LANGUAGE "Greek"
228 ; !insertmacro MUI_LANGUAGE "Polish"
229 ; !insertmacro MUI_LANGUAGE "Hungarian"
230 ; !insertmacro MUI_LANGUAGE "Romanian"
231 ; !insertmacro MUI_LANGUAGE "Serbian"
232 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
233 ; !insertmacro MUI_LANGUAGE "Arabic"
234 ; !insertmacro MUI_LANGUAGE "Portuguese"
235 ; !insertmacro MUI_LANGUAGE "Afrikaans"
236 ; !insertmacro MUI_LANGUAGE "Malay"
237 ; !insertmacro MUI_LANGUAGE "Indonesian"
240 ;--------------------------------
242 ;--------------------------------
245 !include "..\Translation\Blank.nsh"
248 !include "..\Translation\LameXP_DE.nsh"
251 !include "..\Translation\LameXP_ES.nsh"
254 !include "..\Translation\LameXP_RU.nsh"
257 !include "..\Translation\LameXP_UK.nsh"
260 ;--------------------------------
261 ;Installer initialization
262 ;--------------------------------
265 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
268 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the installer is already running!"
272 ${StdUtils
.GetParameter
} $R0 "Update" "?"
274 !insertmacro MUI_LANGDLL_DISPLAY
280 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, this application does NOT support Windows 9x or Windows ME!"
284 ${If} ${AtMostWinNT4}
285 ${StdUtils
.GetParameter
} $R0 "Update" "?"
287 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, your platform is not supported anymore. Installation aborted!$\nThe minimum required platform is Windows 2000."
289 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, your platform is not supported anymore. Update not possible!$\nThe minimum required platform is Windows 2000."
296 UserInfo::GetAccountType
299 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
306 File "/oname=$PLUGINSDIR\checkproc.exe" "checkproc.exe"
307 nsExec::Exec /TIMEOUT=
5000 '"$PLUGINSDIR\checkproc.exe" Softonic Brothersoft Afreecodec'
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 un-installer is already running!"
319 ${StdUtils
.GetParameter
} $R0 "Force" "?"
321 !insertmacro MUI_LANGDLL_DISPLAY
326 UserInfo::GetAccountType
329 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
335 ;--------------------------------
337 ;--------------------------------
340 StrCpy $0 $HWNDPARENT
341 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
345 Function un
.MyGuiInit
346 StrCpy $0 $HWNDPARENT
347 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
352 ;--------------------------------
353 ;Macros & Auxiliary Functions
354 ;--------------------------------
356 !macro PrintProgress Text
357 SetDetailsPrint textonly
358 DetailPrint '${Text}'
359 SetDetailsPrint listonly
363 !macro CreateWebLink ShortcutFile TargetURL
366 StrCpy $0 "${ShortcutFile}"
367 StrCpy $1 "${TargetURL}"
373 Function _CreateWebLink
375 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
376 DeleteINISec "$0" "DEFAULT"
377 DeleteINISec "$0" "InternetShortcut"
378 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
379 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
380 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
381 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
382 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
384 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
387 !macro GetExecutableName OutVar
388 ${StdUtils
.GetParameter
} ${OutVar} "Update" ""
389 ${StdUtils
.TrimStr
} ${OutVar}
390 ${IfThen} "${OutVar}" ==
"" ${|
} StrCpy ${OutVar} "LameXP.exe" ${|
}
393 !macro DisableNextButton TmpVar
394 GetDlgItem
${TmpVar} $HWNDPARENT 1
395 EnableWindow
${TmpVar} 0
399 ;--------------------------------
401 ;--------------------------------
404 SetShellVarContext all
405 SetOutPath "$INSTDIR"
408 Section "!Install Files"
409 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_INSTFILES)"
411 Delete "$INSTDIR\Changelog.htm"
412 Delete "$INSTDIR\Changelog.html"
413 Delete "$INSTDIR\Contributors.txt"
414 Delete "$INSTDIR\Copying.txt"
415 Delete "$INSTDIR\FAQ.html"
416 Delete "$INSTDIR\Howto.html"
417 Delete "$INSTDIR\LameEnc.sys"
418 Delete "$INSTDIR\LameXP.exe"
419 Delete "$INSTDIR\LameXP.exe.sig"
420 Delete "$INSTDIR\License.txt"
421 Delete "$INSTDIR\Readme.htm"
422 Delete "$INSTDIR\ReadMe.txt"
423 Delete "$INSTDIR\PRE_RELEASE_INFO.txt"
424 Delete "$INSTDIR\Settings.cfg"
425 Delete "$INSTDIR\Translate.html"
426 Delete "$INSTDIR\Uninstall.exe"
428 !insertmacro GetExecutableName
$R0
432 Delete "$INSTDIR\$R0"
435 MessageBox MB_TOPMOST|
MB_ICONSTOP|
MB_RETRYCANCEL 'Could not delete old "$R0" file. Is LameXP still running?' IDRETRY DeleteOldBinary
436 Abort "Could not delete old binary!"
439 File /a
`/oname=$R0` `${LAMEXP_SOURCE_PATH}\LameXP.exe`
440 File /a
`${LAMEXP_SOURCE_PATH}\*.txt`
441 File /a
`${LAMEXP_SOURCE_PATH}\*.html`
444 Section "-Write Uinstaller"
445 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_MAKEUNINST)"
446 WriteUninstaller "$INSTDIR\Uninstall.exe"
449 Section "-Create Shortcuts"
450 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
451 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_SHORTCUTS)"
452 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
454 SetShellVarContext current
456 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
457 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
458 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
460 SetShellVarContext all
462 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
463 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
464 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
466 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" "$INSTDIR\LameXP.exe" "" "$INSTDIR\LameXP.exe" 0
467 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_LICENSE).lnk" "$INSTDIR\License.txt"
468 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\Changelog.html"
469 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_TRANSLATE).lnk" "$INSTDIR\Translate.html"
470 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_FAQ).lnk" "$INSTDIR\FAQ.html"
471 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_MANUAL).lnk" "$INSTDIR\Manual.html"
472 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
474 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Official LameXP Homepage.url" "http://mulder.dummwiedeutsch.de/"
475 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
476 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\RareWares.org.url" "http://rarewares.org/"
477 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Hydrogenaudio Forums.url" "http://www.hydrogenaudio.org/"
478 !insertmacro MUI_STARTMENU_WRITE_END
481 Section "-Update Registry"
482 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_REGISTRY)"
483 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
484 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
485 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "LameXP"
489 !insertmacro PrintProgress
"$(MUI_TEXT_FINISH_TITLE)."
491 ${If} ${FileExists} "$INSTDIR\PRE_RELEASE_INFO.txt"
492 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\PRE_RELEASE_INFO.txt" "open" ""
496 ; !insertmacro UAC_AsUser_ExecShell "" "http://mulder.brhack.net/temp/style_poll/" "" "" SW_SHOWNORMAL
501 ;--------------------------------
503 ;--------------------------------
506 SetOutPath "$INSTDIR"
507 !insertmacro PrintProgress
"$(LAMEXP_LANG_STATUS_UNINSTALL)"
509 Delete /REBOOTOK
"$INSTDIR\LameXP.exe"
510 Delete /REBOOTOK
"$INSTDIR\LameXP-Portable.exe"
511 Delete /REBOOTOK
"$INSTDIR\LameXP.exe.sig"
512 Delete /REBOOTOK
"$INSTDIR\LameXP*"
514 Delete /REBOOTOK
"$INSTDIR\Changelog.htm"
515 Delete /REBOOTOK
"$INSTDIR\Changelog.html"
516 Delete /REBOOTOK
"$INSTDIR\Contributors.txt"
517 Delete /REBOOTOK
"$INSTDIR\Copying.txt"
518 Delete /REBOOTOK
"$INSTDIR\FAQ.html"
519 Delete /REBOOTOK
"$INSTDIR\Howto.html"
520 Delete /REBOOTOK
"$INSTDIR\LameEnc.sys"
521 Delete /REBOOTOK
"$INSTDIR\License.txt"
522 Delete /REBOOTOK
"$INSTDIR\Readme.htm"
523 Delete /REBOOTOK
"$INSTDIR\ReadMe.txt"
524 Delete /REBOOTOK
"$INSTDIR\PRE_RELEASE_INFO.txt"
525 Delete /REBOOTOK
"$INSTDIR\Settings.cfg"
526 Delete /REBOOTOK
"$INSTDIR\Translate.html"
527 Delete /REBOOTOK
"$INSTDIR\Uninstall.exe"
531 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
532 StrCmp "$StartMenuFolder" "" NoStartmenuFolder
533 IfFileExists "$SMPROGRAMS\$StartMenuFolder\*.*" 0 NoStartmenuFolder
534 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
535 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
536 RMDir "$SMPROGRAMS\$StartMenuFolder"
540 DeleteRegValue HKLM "${MyRegPath}" "InstallLocation"
541 DeleteRegValue HKLM "${MyRegPath}" "UninstallString"
542 DeleteRegValue HKLM "${MyRegPath}" "DisplayName"
543 DeleteRegValue HKLM "${MyRegPath}" "StartmenuFolder"
544 DeleteRegValue HKLM "${MyRegPath}" "SetupLanguage"
546 MessageBox MB_YESNO|
MB_TOPMOST "$(LAMEXP_LANG_UNINST_PERSONAL)" IDNO +3
547 Delete "$LOCALAPPDATA\LoRd_MuldeR\LameXP - Audio Encoder Front-End\config.ini"
548 Delete "$INSTDIR\*.ini"
550 !insertmacro PrintProgress
"$(MUI_UNTEXT_FINISH_TITLE)."
554 ;--------------------------------
555 ;Check For Update Mode
556 ;--------------------------------
558 Function CheckForUpdate
559 ${StdUtils
.GetParameter
} $R0 "Update" "?"
560 ${IfNotThen} "$R0" ==
"?" ${|
} Goto EnableUpdateMode
${|
}
562 ${IfThen} "$INSTDIR" ==
"" ${|
} Return ${|
}
563 ${IfThen} "$INSTDIR" ==
"$EXEDIR" ${|
} Return ${|
}
564 ${IfNotThen} ${FileExists} "$INSTDIR\LameXP.exe" ${|
} Return ${|
}
568 FindWindow $R0 "#32770" "" $HWNDPARENT
569 GetDlgItem
$R1 $R0 1019
572 FindWindow $R0 "#32770" "" $HWNDPARENT
573 GetDlgItem
$R1 $R0 1001
577 Function un
.CheckForcedUninstall
578 ${StdUtils
.GetParameter
} $R0 "Force" "?"
579 ${IfNotThen} "$R0" ==
"?" ${|
} Abort ${|
}
583 ;--------------------------------
584 ;Check For Pre-Release
585 ;--------------------------------
587 Function CheckForPreRelease
588 !ifdef LAMEXP_IS_PRERELEASE
589 ${StdUtils
.GetParameter
} $R0 "Update" "?"
590 StrCmp $R0 "?" 0 SkipPrereleaseWarning
591 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION|
MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD
IDOK IDOK +2
593 SkipPrereleaseWarning:
598 ;--------------------------------
600 ;--------------------------------
602 Function LockedListShow
603 !insertmacro MUI_HEADER_TEXT
"$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
604 !insertmacro GetExecutableName
$R0
605 LockedList::AddModule
"\$R0"
606 LockedList::AddModule
"\Uninstall.exe"
607 LockedList::AddModule
"\Au_.exe"
608 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)"
612 Function un
.LockedListShow
613 !insertmacro MUI_HEADER_TEXT
"$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
614 LockedList::AddModule
"\LameXP.exe"
615 LockedList::AddModule
"\Uninstall.exe"
616 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)"
621 ;--------------------------------
623 ;--------------------------------
625 Function RunAppFunction
626 !insertmacro DisableNextButton
$R0
627 !insertmacro GetExecutableName
$R0
628 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR" "explore" ""
629 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"
632 Function ShowReadmeFunction
633 !insertmacro DisableNextButton
$R0
634 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\FAQ.html" "open" ""