2010-11-29 20:36:27 +01:00
; ///////////////////////////////////////////////////////////////////////////////
; // LameXP - Audio Encoder Front-End
2017-03-12 12:12:49 +01:00
; // Copyright (C) 2004-2017 LoRd_MuldeR <MuldeR2@GMX.de>
2010-11-29 20:36:27 +01:00
; //
; // 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.
; //
; // This program is distributed in the hope that it will be useful,
; // but WITHOUT ANY WARRANTY; without even the implied warranty of
; // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; // GNU General Public License for more details.
; //
; // You should have received a copy of the GNU General Public License along
; // with this program; if not, write to the Free Software Foundation, Inc.,
; // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
; //
; // http://www.gnu.org/licenses/gpl-2.0.txt
; ///////////////////////////////////////////////////////////////////////////////
2012-11-25 14:03:33 +01:00
2010-12-11 02:05:51 +01:00
;--------------------------------
;Basic Defines
;--------------------------------
2012-11-25 14:03:33 +01:00
!ifndef NSIS_UNICODE
!error "NSIS_UNICODE is undefined, please compile with Unicode NSIS !!!"
!endif
2010-12-11 02:05:51 +01:00
!ifndef LAMEXP_VERSION
!error "LAMEXP_VERSION is not defined !!!"
!endif
!ifndef LAMEXP_BUILD
!error "LAMEXP_BUILD is not defined !!!"
!endif
2011-04-14 02:21:46 +02:00
!ifndef LAMEXP_INSTTYPE
!error "LAMEXP_INSTTYPE is not defined !!!"
!endif
!ifndef LAMEXP_PATCH
!error "LAMEXP_PATCH is not defined !!!"
2010-12-11 02:05:51 +01:00
!endif
!ifndef LAMEXP_DATE
!error "LAMEXP_DATE is not defined !!!"
!endif
!ifndef LAMEXP_OUTPUT_FILE
!error "LAMEXP_OUTPUT_FILE is not defined !!!"
!endif
!ifndef LAMEXP_SOURCE_PATH
!error "LAMEXP_SOURCE_PATH is not defined !!!"
!endif
;UUID
!define MyRegPath "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD7A67D-D700-4043-B54F-DD106D00F308}"
2015-02-26 22:25:28 +01:00
;App Paths
!define AppPaths "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
2011-02-26 21:23:10 +01:00
;Web-Site
2013-04-18 22:55:21 +02:00
!define MyWebSite "http://muldersoft.com/"
2010-12-11 02:05:51 +01:00
2011-02-27 22:28:34 +01:00
;--------------------------------
;Check for Pre-Release
;--------------------------------
!define LAMEXP_IS_PRERELEASE
!if '${LAMEXP_INSTTYPE}' == 'Final'
!undef LAMEXP_IS_PRERELEASE
!endif
!if '${LAMEXP_INSTTYPE}' == 'Hotfix'
!undef LAMEXP_IS_PRERELEASE
!endif
2015-10-10 15:56:33 +02:00
;--------------------------------
;Manifest
;--------------------------------
2015-10-15 21:20:06 +02:00
!tempfile PACKHDRTEMP
2016-12-20 20:50:20 +01:00
!packhdr "${PACKHDRTEMP}" '"..\..\..\Prerequisites\MSVC\redist\bin\mt.exe" -manifest "setup.manifest" -outputresource:"${PACKHDRTEMP};1" && "..\..\..\Prerequisites\UPX\upx.exe" --brute "${PACKHDRTEMP}"'
2015-10-10 15:56:33 +02:00
2010-12-11 02:05:51 +01:00
;--------------------------------
;Includes
;--------------------------------
!include `MUI2.nsh`
2010-12-19 00:50:22 +01:00
!include `WinVer.nsh`
2012-11-24 22:32:20 +01:00
!include `x64.nsh`
2011-10-02 22:14:09 +02:00
!include `StdUtils.nsh`
2011-10-07 16:06:48 +02:00
2010-12-11 02:05:51 +01:00
;--------------------------------
;Installer Attributes
;--------------------------------
2011-10-02 22:14:09 +02:00
RequestExecutionLevel admin
2010-11-29 20:36:27 +01:00
ShowInstDetails show
2010-12-11 02:05:51 +01:00
ShowUninstDetails show
2011-04-14 02:21:46 +02:00
Name "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
2010-12-11 02:05:51 +01:00
OutFile "${LAMEXP_OUTPUT_FILE}"
2011-02-21 13:32:37 +01:00
BrandingText "Date created: ${LAMEXP_DATE} [Build #${LAMEXP_BUILD}]"
2016-12-23 22:17:33 +01:00
InstallDir "$PROGRAMFILES\MuldeR\LameXP"
2010-12-11 02:05:51 +01:00
InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
2010-11-29 20:36:27 +01:00
2010-11-29 14:00:27 +01:00
2010-12-11 02:05:51 +01:00
;--------------------------------
;Compressor
;--------------------------------
SetCompressor /SOLID LZMA
SetCompressorDictSize 64
2010-12-12 21:43:59 +01:00
;--------------------------------
;Reserved Files
;--------------------------------
2011-10-02 22:14:09 +02:00
ReserveFile "${NSISDIR}\Plugins\Aero.dll"
2011-10-08 22:58:11 +02:00
ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
ReserveFile "${NSISDIR}\Plugins\LockedList.dll"
2015-06-24 23:44:43 +02:00
ReserveFile "${NSISDIR}\Plugins\LockedList64.dll"
2010-12-12 21:43:59 +01:00
ReserveFile "${NSISDIR}\Plugins\nsDialogs.dll"
2011-10-08 22:58:11 +02:00
ReserveFile "${NSISDIR}\Plugins\nsExec.dll"
2010-12-12 21:43:59 +01:00
ReserveFile "${NSISDIR}\Plugins\StartMenu.dll"
2011-10-08 22:58:11 +02:00
ReserveFile "${NSISDIR}\Plugins\StdUtils.dll"
ReserveFile "${NSISDIR}\Plugins\System.dll"
ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
2010-12-12 21:43:59 +01:00
2010-12-11 02:05:51 +01:00
;--------------------------------
;Variables
;--------------------------------
Var StartMenuFolder
;--------------------------------
;Version Info
;--------------------------------
2010-11-29 14:00:27 +01:00
2010-11-29 22:06:54 +01:00
!searchreplace PRODUCT_VERSION_DATE "${LAMEXP_DATE}" "-" "."
VIProductVersion "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD}"
VIAddVersionKey "Author" "LoRd_MuldeR <mulder2@gmx.de>"
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."
VIAddVersionKey "CompanyName" "Free Software Foundation"
2011-04-14 02:21:46 +02:00
VIAddVersionKey "FileDescription" "LameXP v${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
2010-11-29 22:06:54 +01:00
VIAddVersionKey "FileVersion" "${PRODUCT_VERSION_DATE}.${LAMEXP_BUILD} (${LAMEXP_VERSION})"
2017-03-12 12:12:49 +01:00
VIAddVersionKey "LegalCopyright" "Copyright 2004-2017 LoRd_MuldeR"
2010-11-29 22:06:54 +01:00
VIAddVersionKey "LegalTrademarks" "GNU"
VIAddVersionKey "OriginalFilename" "LameXP.${LAMEXP_DATE}.exe"
VIAddVersionKey "ProductName" "LameXP - Audio Encoder Frontend"
VIAddVersionKey "ProductVersion" "${LAMEXP_VERSION}, Build #${LAMEXP_BUILD} (${LAMEXP_DATE})"
2011-08-15 21:32:47 +02:00
VIAddVersionKey "Website" "${MyWebSite}"
2010-11-29 21:42:39 +01:00
2010-11-29 14:00:27 +01:00
2010-12-11 02:05:51 +01:00
;--------------------------------
;MUI2 Interface Settings
;--------------------------------
!define MUI_ABORTWARNING
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${MyRegPath}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "StartmenuFolder"
2010-12-12 19:25:06 +01:00
!define MUI_LANGDLL_REGISTRY_ROOT HKLM
!define MUI_LANGDLL_REGISTRY_KEY "${MyRegPath}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "SetupLanguage"
2010-12-11 02:05:51 +01:00
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LameXP v${LAMEXP_VERSION}"
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
2011-02-26 21:23:10 +01:00
!define MUI_FINISHPAGE_LINK ${MyWebSite}
!define MUI_FINISHPAGE_LINK_LOCATION ${MyWebSite}
2010-12-11 02:05:51 +01:00
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
2011-04-01 00:57:52 +02:00
!define MUI_WELCOMEFINISHPAGE_BITMAP "wizard.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "wizard-un.bmp"
2010-12-11 02:05:51 +01:00
!define MUI_HEADERIMAGE
2011-04-01 00:57:52 +02:00
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
!define MUI_HEADERIMAGE_UNBITMAP "header-un.bmp"
2010-12-11 02:05:51 +01:00
!define MUI_LANGDLL_ALLLANGUAGES
2011-10-02 22:14:09 +02:00
!define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
!define MUI_CUSTOMFUNCTION_UNGUIINIT un.MyGuiInit
2011-01-20 21:06:25 +01:00
!define MUI_LANGDLL_ALWAYSSHOW
2010-12-11 02:05:51 +01:00
;--------------------------------
2015-06-24 23:44:43 +02:00
;MUI2 Pages (Installer)
2010-12-11 02:05:51 +01:00
;--------------------------------
2015-06-24 23:44:43 +02:00
;Welcome
2015-06-25 23:06:50 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
2011-08-27 16:24:03 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
2010-12-12 21:43:59 +01:00
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_FINISHPAGE_TITLE_3LINES
2010-12-11 02:05:51 +01:00
!insertmacro MUI_PAGE_WELCOME
2015-06-24 23:44:43 +02:00
;License
2015-06-25 23:06:50 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
2011-02-26 21:23:10 +01:00
!insertmacro MUI_PAGE_LICENSE "license.rtf"
2015-06-24 23:44:43 +02:00
;Directory
2015-06-25 23:06:50 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
2010-12-11 02:05:51 +01:00
!define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
!insertmacro MUI_PAGE_DIRECTORY
2015-06-24 23:44:43 +02:00
;Startmenu
2015-06-25 23:06:50 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
2010-12-11 02:05:51 +01:00
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
2015-06-24 23:44:43 +02:00
;LockedList
2010-12-12 21:43:59 +01:00
Page Custom LockedListShow
2015-06-24 23:44:43 +02:00
;Install Files
2010-12-11 02:05:51 +01:00
!insertmacro MUI_PAGE_INSTFILES
2015-06-24 23:44:43 +02:00
;Finish
2015-06-25 23:06:50 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
2010-12-11 02:05:51 +01:00
!insertmacro MUI_PAGE_FINISH
2010-12-11 23:17:21 +01:00
2015-06-24 23:44:43 +02:00
;--------------------------------
;MUI2 Pages (Uninstaller)
;--------------------------------
;Welcome
2010-12-12 21:43:59 +01:00
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_FINISHPAGE_TITLE_3LINES
2011-10-07 16:06:48 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
2010-12-11 02:05:51 +01:00
!insertmacro MUI_UNPAGE_WELCOME
2015-06-24 23:44:43 +02:00
;Confirm
2011-10-07 16:06:48 +02:00
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
2010-12-11 02:05:51 +01:00
!insertmacro MUI_UNPAGE_CONFIRM
2015-06-24 23:44:43 +02:00
;LockedList
2010-12-12 21:43:59 +01:00
UninstPage Custom un.LockedListShow
2015-06-24 23:44:43 +02:00
;Uninstall
2010-12-11 02:05:51 +01:00
!insertmacro MUI_UNPAGE_INSTFILES
2015-06-24 23:44:43 +02:00
;Finish
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
2010-12-11 02:05:51 +01:00
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
;--------------------------------
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
!insertmacro MUI_LANGUAGE "German"
2011-01-15 02:28:33 +01:00
!insertmacro MUI_LANGUAGE "Spanish"
2011-02-18 21:42:32 +01:00
!insertmacro MUI_LANGUAGE "Russian"
2011-07-26 22:36:34 +02:00
!insertmacro MUI_LANGUAGE "Ukrainian"
2013-08-28 12:05:37 +02:00
!insertmacro MUI_LANGUAGE "Polish"
2015-04-13 23:35:23 +02:00
!insertmacro MUI_LANGUAGE "Hungarian"
2010-12-11 23:17:21 +01:00
; !insertmacro MUI_LANGUAGE "French"
; !insertmacro MUI_LANGUAGE "SpanishInternational"
; !insertmacro MUI_LANGUAGE "SimpChinese"
; !insertmacro MUI_LANGUAGE "TradChinese"
; !insertmacro MUI_LANGUAGE "Japanese"
; !insertmacro MUI_LANGUAGE "Italian"
; !insertmacro MUI_LANGUAGE "Dutch"
; !insertmacro MUI_LANGUAGE "Greek"
; !insertmacro MUI_LANGUAGE "Romanian"
; !insertmacro MUI_LANGUAGE "Serbian"
; !insertmacro MUI_LANGUAGE "SerbianLatin"
; !insertmacro MUI_LANGUAGE "Arabic"
; !insertmacro MUI_LANGUAGE "Portuguese"
; !insertmacro MUI_LANGUAGE "Afrikaans"
; !insertmacro MUI_LANGUAGE "Malay"
; !insertmacro MUI_LANGUAGE "Indonesian"
;--------------------------------
;Translation
;--------------------------------
;English
2011-01-13 09:23:11 +01:00
!include "..\Translation\Blank.nsh"
2010-12-11 23:17:21 +01:00
;German
2011-01-13 09:23:11 +01:00
!include "..\Translation\LameXP_DE.nsh"
2010-12-11 02:05:51 +01:00
2011-01-15 02:28:33 +01:00
;Spanish
!include "..\Translation\LameXP_ES.nsh"
2011-02-18 20:14:45 +01:00
;Russian
!include "..\Translation\LameXP_RU.nsh"
2010-12-11 02:05:51 +01:00
2011-07-26 22:36:34 +02:00
;Ukrainian
!include "..\Translation\LameXP_UK.nsh"
2013-08-28 12:05:37 +02:00
;Polish
!include "..\Translation\LameXP_PL.nsh"
2015-04-13 23:35:23 +02:00
;Hungarian
!include "..\Translation\LameXP_HU.nsh"
2011-07-26 22:36:34 +02:00
2015-06-25 23:06:50 +02:00
;--------------------------------
2015-07-01 22:47:47 +02:00
;LogicLib Extensions
2015-06-25 23:06:50 +02:00
;--------------------------------
!macro _UnattendedMode _a _b _t _f
2015-07-01 22:47:47 +02:00
!insertmacro _LOGICLIB_TEMP
${StdUtils.TestParameter} $_LOGICLIB_TEMP "Update"
StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
2015-06-25 23:06:50 +02:00
!macroend
!define UnattendedMode `"" UnattendedMode ""`
!macro _ForcedMode _a _b _t _f
2015-07-01 22:47:47 +02:00
!insertmacro _LOGICLIB_TEMP
${StdUtils.TestParameter} $_LOGICLIB_TEMP "Force"
StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
2015-06-25 23:06:50 +02:00
!macroend
!define ForcedMode `"" ForcedMode ""`
!macro _ValidFileName _a _b _t _f
2015-07-01 22:47:47 +02:00
!insertmacro _LOGICLIB_TEMP
${StdUtils.ValidFileName} $_LOGICLIB_TEMP `${_b}`
StrCmp "$_LOGICLIB_TEMP" "ok" `${_t}` `${_f}`
2015-06-25 23:06:50 +02:00
!macroend
!define ValidFileName `"" ValidFileName`
2010-12-11 02:05:51 +01:00
;--------------------------------
;Installer initialization
;--------------------------------
Function .onInit
2015-08-20 21:01:34 +02:00
InitPluginsDir
; --------
2011-10-02 22:14:09 +02:00
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
Pop $0
${If} $0 <> 0
2010-12-14 02:02:23 +01:00
MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the installer is already running!"
Quit
2011-08-15 21:32:47 +02:00
${EndIf}
2010-12-19 00:50:22 +01:00
2011-09-19 17:27:12 +02:00
; --------
2012-11-24 22:32:20 +01:00
# Running on Windows NT family?
2011-04-12 18:08:44 +02:00
${IfNot} ${IsNT}
2017-04-18 23:25:17 +02:00
MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, this application does *not* support Windows 9x/ME!"
2012-11-25 14:03:33 +01:00
ExecShell "open" "http://windows.microsoft.com/"
2010-12-19 00:50:22 +01:00
Quit
${EndIf}
2011-04-08 14:05:50 +02:00
2012-11-24 22:32:20 +01:00
# Running on Windows XP or later?
2012-11-24 16:27:38 +01:00
${If} ${AtMostWin2000}
2012-11-24 21:20:09 +01:00
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)."
ExecShell "open" "http://windows.microsoft.com/"
2012-11-24 16:27:38 +01:00
Quit
${EndIf}
2012-11-25 20:27:27 +01:00
# If on Windows XP, is the required Service Pack installed?
2012-11-24 16:27:38 +01:00
${If} ${IsWinXP}
2012-11-25 20:27:27 +01:00
${IfNot} ${RunningX64} # Windows XP 32-Bit, requires Service Pack 3
${AndIf} ${AtMostServicePack} 2
2017-04-18 23:25:17 +02:00
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION "This application requires Service Pack 3 for Windows XP.$\nPlease install the required Service Pack and retry!"
2012-11-25 20:27:27 +01:00
Quit
${EndIf}
${If} ${RunningX64} # Windows XP 64-Bit, requires Service Pack 2
${AndIf} ${AtMostServicePack} 1
2017-04-18 23:25:17 +02:00
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION "This application requires Service Pack 2 for Windows XP x64.$\nPlease install the required Service Pack and retry!"
Quit
${EndIf}
${IfNot} ${UnattendedMode}
2017-04-20 00:12:00 +02:00
${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL|MB_DEFBUTTON2 "It appears you are still running Windows XP, which reached $\"end of life$\" in April 2014. This means you are running an outdated operating system that is no longer receiving any updates. There are many known security vulnerabilities which are never going to be fixed! We highly recommend updating to a contemporary operating system." IDCANCEL`
2017-04-18 23:25:17 +02:00
Quit
2012-11-25 20:27:27 +01:00
${EndIf}
2017-04-18 23:25:17 +02:00
${EndIf}
${EndIf}
# Running on Windows Vista?
${If} ${IsWinVista}
${If} ${AtMostServicePack} 1
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION "This application requires Service Pack 2 for Windows Vista.$\nPlease install the required Service Pack and retry!"
2012-11-25 20:27:27 +01:00
Quit
2012-11-25 14:03:33 +01:00
${EndIf}
2017-04-18 23:25:17 +02:00
${IfNot} ${UnattendedMode}
2017-04-20 00:12:00 +02:00
${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL|MB_DEFBUTTON2 "It appears you are still running Windows Vista, which reached $\"end of life$\" in April 2017. This means you are running an outdated operating system that is no longer receiving any updates. There are many known security vulnerabilities which are never going to be fixed! We highly recommend updating to a contemporary operating system." IDCANCEL`
2017-04-18 23:25:17 +02:00
Quit
${EndIf}
${EndIf}
2011-04-08 14:05:50 +02:00
${EndIf}
2012-11-25 14:03:33 +01:00
2011-10-02 22:14:09 +02:00
; --------
2011-08-27 14:33:35 +02:00
2015-06-25 23:06:50 +02:00
${IfNot} ${UnattendedMode}
2012-11-24 22:32:20 +01:00
!insertmacro MUI_LANGDLL_DISPLAY
${EndIf}
; --------
2011-10-02 22:14:09 +02:00
UserInfo::GetAccountType
Pop $0
${If} $0 != "Admin"
MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
2013-01-14 00:36:22 +01:00
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
2011-10-02 22:14:09 +02:00
Quit
${EndIf}
2010-12-11 02:05:51 +01:00
FunctionEnd
Function un.onInit
2011-10-02 22:14:09 +02:00
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
Pop $0
${If} $0 <> 0
MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the un-installer is already running!"
Quit
2011-09-19 17:27:12 +02:00
${EndIf}
2015-06-25 23:06:50 +02:00
${IfNot} ${ForcedMode}
2011-10-07 16:06:48 +02:00
!insertmacro MUI_LANGDLL_DISPLAY
${EndIf}
2011-10-02 22:14:09 +02:00
; --------
UserInfo::GetAccountType
Pop $0
${If} $0 != "Admin"
MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
2013-01-14 00:36:22 +01:00
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
2010-12-14 02:02:23 +01:00
Quit
2011-10-02 22:14:09 +02:00
${EndIf}
2010-12-11 02:05:51 +01:00
FunctionEnd
;--------------------------------
2011-10-07 16:06:48 +02:00
;GUI initialization
2010-12-11 02:05:51 +01:00
;--------------------------------
2011-10-02 22:14:09 +02:00
Function MyGuiInit
2011-09-19 17:27:12 +02:00
StrCpy $0 $HWNDPARENT
System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
2011-07-07 19:40:49 +02:00
Aero::Apply
2010-11-29 14:00:27 +01:00
FunctionEnd
2011-10-02 22:14:09 +02:00
Function un.MyGuiInit
2011-09-19 17:27:12 +02:00
StrCpy $0 $HWNDPARENT
System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
2011-07-07 19:40:49 +02:00
Aero::Apply
2010-12-11 02:05:51 +01:00
FunctionEnd
;--------------------------------
2011-01-25 00:11:28 +01:00
;Macros & Auxiliary Functions
2010-12-11 02:05:51 +01:00
;--------------------------------
!macro PrintProgress Text
2011-01-25 00:11:28 +01:00
SetDetailsPrint textonly
DetailPrint '${Text}'
SetDetailsPrint listonly
Sleep 1000
2010-12-11 02:05:51 +01:00
!macroend
2010-12-11 23:17:21 +01:00
!macro CreateWebLink ShortcutFile TargetURL
2011-01-25 00:11:28 +01:00
Push $0
Push $1
StrCpy $0 "${ShortcutFile}"
StrCpy $1 "${TargetURL}"
Call _CreateWebLink
Pop $1
Pop $0
2010-12-11 23:17:21 +01:00
!macroend
Function _CreateWebLink
2011-01-25 00:11:28 +01:00
FlushINI "$0"
SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
DeleteINISec "$0" "DEFAULT"
DeleteINISec "$0" "InternetShortcut"
WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
WriteINIStr "$0" "InternetShortcut" "URL" "$1"
WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
FlushINI "$0"
SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
2010-12-11 23:17:21 +01:00
FunctionEnd
2011-01-25 00:11:28 +01:00
!macro GetExecutableName OutVar
2011-10-08 18:20:20 +02:00
${StdUtils.GetParameter} ${OutVar} "Update" ""
2011-10-08 19:34:24 +02:00
${StdUtils.TrimStr} ${OutVar}
2015-06-25 23:06:50 +02:00
${If} "${OutVar}" == ""
${OrIfNot} ${ValidFileName} "${OutVar}"
StrCpy ${OutVar} "LameXP.exe"
${EndIf}
2011-01-25 00:11:28 +01:00
!macroend
2011-10-02 22:14:09 +02:00
!macro DisableNextButton TmpVar
GetDlgItem ${TmpVar} $HWNDPARENT 1
EnableWindow ${TmpVar} 0
!macroend
2015-06-25 23:06:50 +02:00
!macro DisableBackButton TmpVar
GetDlgItem ${TmpVar} $HWNDPARENT 3
EnableWindow ${TmpVar} 0
!macroend
2015-08-20 21:01:34 +02:00
!macro CleanUpFiles options
Delete ${options} "$INSTDIR\Changelog.htm"
Delete ${options} "$INSTDIR\Changelog.html"
Delete ${options} "$INSTDIR\Contributors.txt"
Delete ${options} "$INSTDIR\Copying.txt"
Delete ${options} "$INSTDIR\FAQ.html"
Delete ${options} "$INSTDIR\Howto.html"
Delete ${options} "$INSTDIR\LameEnc.sys"
Delete ${options} "$INSTDIR\LameXP.exe"
Delete ${options} "$INSTDIR\LameXP.exe.sig"
Delete ${options} "$INSTDIR\LameXP-Portable.exe"
Delete ${options} "$INSTDIR\License.txt"
Delete ${options} "$INSTDIR\Manual.html"
Delete ${options} "$INSTDIR\Readme.htm"
Delete ${options} "$INSTDIR\ReadMe.txt"
Delete ${options} "$INSTDIR\PRE_RELEASE_INFO.txt"
Delete ${options} "$INSTDIR\Settings.cfg"
Delete ${options} "$INSTDIR\Translate.html"
Delete ${options} "$INSTDIR\Uninstall.exe"
Delete ${options} "$INSTDIR\Qt*.dll"
2015-10-23 18:17:26 +02:00
Delete ${options} "$INSTDIR\MUtils*.dll"
2015-08-20 21:01:34 +02:00
Delete ${options} "$INSTDIR\msvcr*.dll"
Delete ${options} "$INSTDIR\msvcp*.dll"
Delete ${options} "$INSTDIR\concrt*.dll"
Delete ${options} "$INSTDIR\vcruntime*.dll"
Delete ${options} "$INSTDIR\vccorlib*.dll"
2015-10-28 21:35:03 +01:00
Delete ${options} "$INSTDIR\api-ms-*.dll"
Delete ${options} "$INSTDIR\ucrtbase.dll"
2015-08-20 21:01:34 +02:00
2015-08-30 13:47:08 +02:00
RMDir /r ${options} "$INSTDIR\cache"
2015-08-20 21:01:34 +02:00
RMDir /r ${options} "$INSTDIR\img"
RMDir /r ${options} "$INSTDIR\imageformats"
RMDir /r ${options} "$INSTDIR\redist"
!macroend
2010-12-11 02:05:51 +01:00
;--------------------------------
;Install Files
;--------------------------------
2011-02-16 00:11:59 +01:00
Section "-PreInit"
2011-08-08 20:26:30 +02:00
SetShellVarContext all
2011-02-16 00:11:59 +01:00
SetOutPath "$INSTDIR"
SectionEnd
2015-10-17 13:22:29 +02:00
Section "-Clean Up Old Cruft"
2015-08-11 22:21:26 +02:00
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_CLEANUP)"
2015-08-20 21:01:34 +02:00
!insertmacro CleanUpFiles ""
2015-08-11 22:21:26 +02:00
SectionEnd
2011-02-15 01:56:48 +01:00
2015-08-11 22:21:26 +02:00
Section "!Install Files"
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_INSTFILES)"
2011-10-16 19:15:40 +02:00
DeleteOldBinary:
2015-08-11 22:21:26 +02:00
!insertmacro GetExecutableName $R0
2011-10-16 19:15:40 +02:00
ClearErrors
Delete "$INSTDIR\$R0"
${If} ${Errors}
MessageBox MB_TOPMOST|MB_ICONSTOP|MB_RETRYCANCEL 'Could not delete old "$R0" file. Is LameXP still running?' IDRETRY DeleteOldBinary
Abort "Could not delete old binary!"
${EndIf}
2012-07-02 01:19:32 +02:00
File /a `/oname=$R0` `${LAMEXP_SOURCE_PATH}\LameXP.exe`
2015-08-11 22:10:00 +02:00
File /nonfatal /a /r `${LAMEXP_SOURCE_PATH}\*.dll`
2015-01-01 22:32:45 +01:00
File /a /r `${LAMEXP_SOURCE_PATH}\*.txt`
File /a /r `${LAMEXP_SOURCE_PATH}\*.html`
File /a /r `${LAMEXP_SOURCE_PATH}\*.png`
2010-12-11 02:05:51 +01:00
SectionEnd
2015-10-25 20:39:31 +01:00
# Section "-Install VCRedist"
# !insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_VCREDIST)"
# File /a `/oname=$PLUGINSDIR\vcredist_x86.exe` `${LAMEXP_SOURCE_PATH}\redist\vcredist_x86.exe`
# ExecWait '"$PLUGINSDIR\vcredist_x86.exe" /install /passive /norestart'
# SectionEnd
2015-08-11 22:10:00 +02:00
Section "-Write Uninstaller"
2010-12-11 23:17:21 +01:00
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_MAKEUNINST)"
2010-12-11 02:05:51 +01:00
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
Section "-Create Shortcuts"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
2010-12-11 23:17:21 +01:00
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_SHORTCUTS)"
2010-12-11 02:05:51 +01:00
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
2010-12-11 23:17:21 +01:00
2011-08-08 20:26:30 +02:00
SetShellVarContext current
2010-12-11 02:05:51 +01:00
Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
2010-12-11 23:17:21 +01:00
2011-08-08 20:26:30 +02:00
SetShellVarContext all
Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
2012-10-21 20:28:44 +02:00
!insertmacro GetExecutableName $R0
2014-06-27 21:06:33 +02:00
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_LICENSE).lnk" "$INSTDIR\License.txt"
2011-02-14 20:10:26 +01:00
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\Changelog.html"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_TRANSLATE).lnk" "$INSTDIR\Translate.html"
2014-06-27 21:06:33 +02:00
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_MANUAL).lnk" "$INSTDIR\Manual.html"
2011-02-14 20:10:26 +01:00
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(LAMEXP_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
2010-12-11 23:17:21 +01:00
2013-12-16 18:04:00 +01:00
!insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Official LameXP Homepage.url" "${MyWebSite}"
2014-06-27 21:06:33 +02:00
!insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
!insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Bug Tracker.url" "https://github.com/lordmulder/LameXP/issues"
!insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\RareWares.org.url" "http://rarewares.org/"
!insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Hydrogenaudio Forums.url" "http://www.hydrogenaudio.org/"
2012-10-24 22:45:58 +02:00
${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
2016-10-10 20:36:06 +02:00
${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils.Const.ShellVerb.PinToTaskbar}
2012-10-24 22:45:58 +02:00
DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
${EndIf}
2010-12-11 02:05:51 +01:00
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section "-Update Registry"
2010-12-11 23:17:21 +01:00
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_REGISTRY)"
2012-10-24 22:45:58 +02:00
2012-10-21 20:28:44 +02:00
!insertmacro GetExecutableName $R0
2010-12-11 02:05:51 +01:00
WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
2012-10-21 20:28:44 +02:00
WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
2013-03-05 23:10:13 +01:00
WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
2010-12-11 02:05:51 +01:00
WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
2013-03-05 23:10:13 +01:00
WriteRegStr HKLM "${MyRegPath}" "DisplayName" "LameXP v${LAMEXP_VERSION}"
WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "${LAMEXP_VERSION} ${LAMEXP_INSTTYPE}-${LAMEXP_PATCH} [Build #${LAMEXP_BUILD}]"
WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
2015-02-26 22:25:28 +01:00
2016-12-15 00:27:48 +01:00
DeleteRegKey HKCU "${AppPaths}\LameXP.exe"
2015-02-26 22:25:28 +01:00
WriteRegStr HKLM "${AppPaths}\LameXP.exe" "" "$INSTDIR\$R0"
WriteRegStr HKLM "${AppPaths}\LameXP.exe" "Path" "$INSTDIR"
2010-12-11 02:05:51 +01:00
SectionEnd
2011-01-25 00:11:28 +01:00
Section "-Finished"
2010-12-11 02:05:51 +01:00
!insertmacro PrintProgress "$(MUI_TEXT_FINISH_TITLE)."
2015-10-28 21:35:03 +01:00
2012-08-21 21:41:34 +02:00
!ifdef LAMEXP_IS_PRERELEASE
2012-07-01 21:33:04 +02:00
${If} ${FileExists} "$INSTDIR\PRE_RELEASE_INFO.txt"
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\PRE_RELEASE_INFO.txt" "open" ""
${EndIf}
2012-08-21 21:41:34 +02:00
!endif
2015-06-24 23:44:43 +02:00
2015-11-01 12:51:29 +01:00
${IfThen} ${UnattendedMode} ${|} SetAutoClose true ${|}
2010-12-11 02:05:51 +01:00
SectionEnd
;--------------------------------
;Uninstaller
;--------------------------------
Section "Uninstall"
2015-02-26 22:25:28 +01:00
SetOutPath "$EXEDIR"
2010-12-11 23:17:21 +01:00
!insertmacro PrintProgress "$(LAMEXP_LANG_STATUS_UNINSTALL)"
2010-12-11 02:05:51 +01:00
2012-10-24 22:45:58 +02:00
; --------------
; Startmenu
; --------------
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
${IfNot} "$StartMenuFolder" == ""
SetShellVarContext current
${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
2016-10-10 20:36:06 +02:00
${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils.Const.ShellVerb.UnpinFromTaskbar}
2012-10-24 22:45:58 +02:00
DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
${EndIf}
${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
RMDir "$SMPROGRAMS\$StartMenuFolder"
${EndIf}
SetShellVarContext all
${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk"
2016-10-10 20:36:06 +02:00
${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "LameXP.lnk" ${StdUtils.Const.ShellVerb.UnpinFromTaskbar}
2012-10-24 22:45:58 +02:00
DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\LameXP.lnk" -> $R1'
${EndIf}
${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
RMDir "$SMPROGRAMS\$StartMenuFolder"
${EndIf}
${EndIf}
; --------------
; Files
; --------------
2012-10-21 20:28:44 +02:00
ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
${IfThen} "$R0" == "" ${|} StrCpy $R0 "LameXP.exe" ${|}
2015-10-20 22:01:39 +02:00
ExecWait '"$INSTDIR\$R0" --uninstall'
2012-10-24 22:45:58 +02:00
2012-10-21 20:28:44 +02:00
Delete /REBOOTOK "$INSTDIR\$R0"
2015-08-20 21:01:34 +02:00
!insertmacro CleanUpFiles /REBOOTOK
2010-12-11 02:05:51 +01:00
RMDir "$INSTDIR"
2015-10-20 22:01:39 +02:00
2012-10-24 22:45:58 +02:00
; --------------
; Registry
; --------------
2013-03-05 23:10:13 +01:00
DeleteRegKey HKLM "${MyRegPath}"
DeleteRegKey HKCU "${MyRegPath}"
DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
2010-12-11 02:05:51 +01:00
2015-02-26 22:25:28 +01:00
DeleteRegKey HKLM "${AppPaths}\LameXP.exe"
DeleteRegKey HKCU "${AppPaths}\LameXP.exe"
2011-02-14 20:10:26 +01:00
MessageBox MB_YESNO|MB_TOPMOST "$(LAMEXP_LANG_UNINST_PERSONAL)" IDNO +3
2010-12-19 00:50:22 +01:00
Delete "$LOCALAPPDATA\LoRd_MuldeR\LameXP - Audio Encoder Front-End\config.ini"
2011-02-14 20:10:26 +01:00
Delete "$INSTDIR\*.ini"
2010-12-19 00:50:22 +01:00
2010-12-11 02:05:51 +01:00
!insertmacro PrintProgress "$(MUI_UNTEXT_FINISH_TITLE)."
SectionEnd
;--------------------------------
;Check For Update Mode
;--------------------------------
2010-11-29 14:00:27 +01:00
2015-06-25 23:06:50 +02:00
Function SkipIfUnattended
${IfThen} ${UnattendedMode} ${|} Abort ${|}
2015-06-24 23:44:43 +02:00
FunctionEnd
2011-01-14 19:45:14 +01:00
2015-06-24 23:44:43 +02:00
Function CheckForUpdate
${If} "$INSTDIR" == ""
${OrIf} "$INSTDIR" == "$EXEDIR"
${OrIfNot} ${FileExists} "$INSTDIR\LameXP.exe"
Return
${EndIf}
2010-12-11 02:05:51 +01:00
2010-11-29 14:00:27 +01:00
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1019
2010-12-11 02:05:51 +01:00
EnableWindow $R1 0
2010-11-29 14:00:27 +01:00
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $R0 1001
EnableWindow $R1 0
FunctionEnd
2010-11-29 21:42:39 +01:00
2011-10-07 16:06:48 +02:00
Function un.CheckForcedUninstall
2015-06-25 23:06:50 +02:00
${IfThen} ${ForcedMode} ${|} Abort ${|}
2011-10-07 16:06:48 +02:00
FunctionEnd
2010-12-11 02:05:51 +01:00
2011-08-27 16:24:03 +02:00
;--------------------------------
;Check For Pre-Release
;--------------------------------
Function CheckForPreRelease
!ifdef LAMEXP_IS_PRERELEASE
2015-06-25 23:06:50 +02:00
${IfNot} ${UnattendedMode}
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
Quit
${EndIf}
2011-08-27 16:24:03 +02:00
!endif
FunctionEnd
2010-12-11 02:05:51 +01:00
;--------------------------------
2010-12-12 21:43:59 +01:00
;Locked List
2010-12-11 02:05:51 +01:00
;--------------------------------
2015-06-24 23:44:43 +02:00
!macro _LockedListShow uinst
2010-12-22 21:09:33 +01:00
!insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
2015-06-25 23:06:50 +02:00
${If} ${UnattendedMode}
!insertmacro DisableBackButton $R0
${EndIf}
${If} ${RunningX64}
InitPluginsDir
2015-06-24 23:44:43 +02:00
File /oname=$PLUGINSDIR\LockedList64.dll `${NSISDIR}\Plugins\LockedList64.dll`
${EndIf}
2011-02-07 22:07:24 +01:00
!insertmacro GetExecutableName $R0
LockedList::AddModule "\$R0"
2015-06-25 23:06:50 +02:00
${If} "$R0" != "LameXP.exe"
LockedList::AddModule "\LameXP.exe"
${EndIf}
2011-02-07 22:07:24 +01:00
LockedList::AddModule "\Uninstall.exe"
2015-06-24 23:44:43 +02:00
!if ${uinst} < 1
LockedList::AddModule "\Au_.exe"
!endif
2016-10-10 23:32:29 +02:00
#LockedList::AddFolder "$INSTDIR"
2010-12-27 01:50:22 +01:00
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)"
2010-12-22 21:09:33 +01:00
Pop $R0
2015-06-24 23:44:43 +02:00
!macroend
Function LockedListShow
!insertmacro _LockedListShow 0
2010-11-29 21:42:39 +01:00
FunctionEnd
2010-12-11 02:05:51 +01:00
2010-12-12 21:43:59 +01:00
Function un.LockedListShow
2015-06-24 23:44:43 +02:00
!insertmacro _LockedListShow 1
2010-12-11 23:17:21 +01:00
FunctionEnd
;--------------------------------
2010-12-12 21:43:59 +01:00
;Install Success
2010-12-11 23:17:21 +01:00
;--------------------------------
2010-12-12 21:43:59 +01:00
Function RunAppFunction
2011-10-02 22:14:09 +02:00
!insertmacro DisableNextButton $R0
2011-01-25 00:11:28 +01:00
!insertmacro GetExecutableName $R0
2011-10-02 22:14:09 +02:00
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR" "explore" ""
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\$R0" "open" "--first-run"
2010-12-11 23:17:21 +01:00
FunctionEnd
2010-12-12 19:25:06 +01:00
2010-12-12 21:43:59 +01:00
Function ShowReadmeFunction
2011-10-02 22:14:09 +02:00
!insertmacro DisableNextButton $R0
2014-12-27 05:50:25 +01:00
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\Manual.html" "open" ""
2010-12-12 19:25:06 +01:00
FunctionEnd
2015-06-24 23:44:43 +02:00
Function .onInstSuccess
2015-06-25 23:06:50 +02:00
${If} ${UnattendedMode}
2015-06-24 23:44:43 +02:00
!insertmacro GetExecutableName $R0
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\$R0" "open" "--first-run"
${EndIf}
FunctionEnd