From 1383974c3e6bd7f46e79f1efb8a9748ace913e25 Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Fri, 14 Jul 2006 08:16:52 +0000 Subject: [PATCH] Bug 339135 - Convert Thunderbird to use the NSIS Installer (partial landing - new files only - NPOB). r=mscott, sr=mscott --- .../windows/nsis/SetProgramAccess.nsi | 127 ++ mail/installer/windows/nsis/branding.nsi | 50 + mail/installer/windows/nsis/defines.nsi.in | 10 + mail/installer/windows/nsis/installer.nsi | 1216 +++++++++++++++++ .../locales/en-US/installer/custom.properties | 83 ++ mail/locales/en-US/installer/mui.properties | 96 ++ .../en-US/installer/override.properties | 118 ++ .../branding/thunderbird/branding.nsi | 50 + 8 files changed, 1750 insertions(+) create mode 100755 mail/installer/windows/nsis/SetProgramAccess.nsi create mode 100755 mail/installer/windows/nsis/branding.nsi create mode 100755 mail/installer/windows/nsis/defines.nsi.in create mode 100755 mail/installer/windows/nsis/installer.nsi create mode 100755 mail/locales/en-US/installer/custom.properties create mode 100755 mail/locales/en-US/installer/mui.properties create mode 100755 mail/locales/en-US/installer/override.properties create mode 100755 other-licenses/branding/thunderbird/branding.nsi diff --git a/mail/installer/windows/nsis/SetProgramAccess.nsi b/mail/installer/windows/nsis/SetProgramAccess.nsi new file mode 100755 index 000000000000..edeaa87a583e --- /dev/null +++ b/mail/installer/windows/nsis/SetProgramAccess.nsi @@ -0,0 +1,127 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +; Provides the Set Access portion of the "Set Program Access and Defaults" that +; is available with Win2K Pro SP3 and WinXP SP1 (this does not specifically call +; out Windows Vista which has not been released at the time of this comment or +; any other future versions of Windows). + +; This is fairly evil. We have a reg key of +; Software\Clients\Mail\Mozilla Thunderbird\InstallInfo +; yet we can have multiple installations of the program. +; this key provides info as to whether shortcuts are displayed and can hide +; and unhide these same shortcuts. This just seems wrong and prone to problems. +; For example, one instance installed in c:\thunderbird1 has set this key. Another +; instance is then installed in c:\thunderbird2. Under what specific circumstances +; do we set this key? What if the other instance is not the default mail client, +; which shortcuts should be displayed on the desktop and quicklaunch as well as +; which ones affect the "set program access and defaults", etc. + +; We probably need to have some verification of whether we are installing as the +; new default mail client, etc. +; When installing with defaults we should always install into the previous location +; ReadRegStr $0 HKCR "http\shell\open\command" "" + +; Sets program access and defaults - hide / show shortcuts on the Desktop and in +; QuickLaunch. This is a royal PITA since the application version can change out +; from under us and there may also be more than one version of the application +; installed. This also needs to respect whether the shortcuts have been modified +; since their initial creation and take into account whether the shortcut is +; located in all users or the current user desktop. +; To remove a shortcut it must point to this installation main executable and it +; must not have additional arguments. +; To create a shortcut a shortcut must not already exist with the same name. +Function un.SetAccess + Call un.GetParameters + Pop $R0 + + StrCpy $R1 "Software\Clients\Mail\${BrandFullNameInternal}\InstallInfo" + SetShellVarContext all ; Set $DESKTOP to All Users + + ; Hide icons - initiated from Set Program Access and Defaults + ${If} $R0 == '/ua "${AppVersion} (${AB_CD})" /hs mail' + WriteRegDWORD HKLM $R1 "IconsVisible" 0 + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + SetShellVarContext current ; Set $DESKTOP to the current user's desktop + ${EndUnless} + + ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "" + ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "$INSTDIR\${FileMainEXE}" + Delete "$DESKTOP\${BrandFullName}.lnk" + ${EndIf} + ${EndIf} + ${EndIf} + + ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" + ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "" + ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "$INSTDIR\${FileMainEXE}" + Delete "$QUICKLAUNCH\${BrandFullName}.lnk" + ${EndIf} + ${EndIf} + ${EndIf} + Abort + ${EndIf} + + ; Show icons - initiated from Set Program Access and Defaults + ${If} $R0 == '/ua "${AppVersion} (${AB_CD})" /ss mail' + WriteRegDWORD HKLM $R1 "IconsVisible" 1 + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + SetShellVarContext current ; Set $DESKTOP to the current user's desktop + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" + ${EndUnless} + ${EndUnless} + ${EndUnless} + ${Unless} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" + CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR" + ${EndUnless} + Abort + ${EndIf} +FunctionEnd diff --git a/mail/installer/windows/nsis/branding.nsi b/mail/installer/windows/nsis/branding.nsi new file mode 100755 index 000000000000..902e116fa88d --- /dev/null +++ b/mail/installer/windows/nsis/branding.nsi @@ -0,0 +1,50 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# NSIS defines for nightly builds. +# The release build branding.nsi is located in other-license/branding/firefox/ +!define BrandShortName "Thunderbird" +!define BrandFullName "Mozilla Thunderbird" +# BrandFullNameInternal is used for some registry and file system values that +# should not contain release that may be in the BrandFullName (e.g. Beta 1, etc.) +!define BrandFullNameInternal "Mozilla Thunderbird" +!define CompanyName "Mozilla" +!define URLInfoAbout "http://www.mozilla.org/" +!define URLUpdateInfo "http://www.mozilla.org/products/thunderbird/" +!define SurveyURL "https://survey.mozilla.com/1/Mozilla%20Thunderbird/${AppVersion}/${AB_CD}/exit.html" + +# Percentage of new "Standard" installs to enable talkback for +!define RandomPercent "100" diff --git a/mail/installer/windows/nsis/defines.nsi.in b/mail/installer/windows/nsis/defines.nsi.in new file mode 100755 index 000000000000..0ee992f7b674 --- /dev/null +++ b/mail/installer/windows/nsis/defines.nsi.in @@ -0,0 +1,10 @@ +#filter substitution +!define AppVersion "@MOZ_APP_VERSION@" +!define GREVersion @MOZILLA_VERSION@ +!define AB_CD "@AB_CD@" +!define FileInstallerEXE "@PKG_BASENAME@.installer.exe" +!define FileInstallerMSI "@PKG_BASENAME@.installer.msi" +!define FileInstallerNETRoot "@PKG_BASENAME@.net-installer" + +!define FileMainEXE "thunderbird.exe" +!define WindowClass "ThunderbirdMessageWindow" diff --git a/mail/installer/windows/nsis/installer.nsi b/mail/installer/windows/nsis/installer.nsi new file mode 100755 index 000000000000..e52345f5ad79 --- /dev/null +++ b/mail/installer/windows/nsis/installer.nsi @@ -0,0 +1,1216 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# Scott MacGregor +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# Also requires: +# ShellLink plugin http://nsis.sourceforge.net/ShellLink_plug-in + +; NOTES +; Size matters! Try different methods to accomplish the same result and use the +; one that results in the smallest size. Every KB counts! +; LogicLib.nsh must be included in all installers to ease script creation and +; readability. It adds a couple of KB to the size but it is worth it. + +; 7-Zip provides better compression than the lzma from NSIS so we add the files +; uncompressed and use 7-Zip to create a SFX archive of it +SetDatablockOptimize on +SetCompress off +CRCCheck on + +; empty files - except for the comment line - for generating custom pages. +!system 'echo ; > options.ini' +!system 'echo ; > shortcuts.ini' + +!addplugindir ./ + +; Other files may depend upon these includes! +!include FileFunc.nsh +!include LogicLib.nsh +!include TextFunc.nsh +!include WinMessages.nsh +!include WordFunc.nsh +!include MUI.nsh + +!insertmacro FileJoin +!insertmacro GetTime +!insertmacro LineFind +!insertmacro un.LineFind +!insertmacro TrimNewLines +!insertmacro un.TrimNewLines +!insertmacro WordFind +!insertmacro WordReplace +!insertmacro GetSize + +; Use the pre-processor where ever possible +; Remember that !define's create smaller packages than Var's! +Var TmpVal +Var StartMenuDir +Var InstallType +Var AddStartMenuSC +Var AddQuickLaunchSC +Var AddDesktopSC +Var fhInstallLog +Var fhUninstallLog + +!include branding.nsi +!include defines.nsi +!include SetProgramAccess.nsi +!include common.nsh +!include locales.nsi +!include version.nsh + +!insertmacro RegCleanMain +!insertmacro un.RegCleanMain +!insertmacro RegCleanUninstall +!insertmacro un.RegCleanUninstall +!insertmacro CloseApp +!insertmacro un.CloseApp +!insertmacro WriteRegStr2 +!insertmacro WriteRegDWORD2 +!insertmacro un.GetSecondInstallPath + +!include overrides.nsh +!insertmacro LocateNoDetails +!insertmacro TextCompareNoDetails + +Name "${BrandFullName}" +OutFile "setup.exe" +InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" "InstallLocation" +InstallDir "$PROGRAMFILES\${BrandFullName}" + +ShowInstDetails nevershow +ShowUnInstDetails nevershow + +################################################################################ +# Modern User Interface - MUI + +ReserveFile options.ini +ReserveFile shortcuts.ini + +!define MUI_ABORTWARNING +!define MUI_COMPONENTSPAGE_SMALLDESC + +!define MUI_ICON setup.ico +!define MUI_UNICON setup.ico + +!define MUI_WELCOMEPAGE_TITLE_3LINES +!define MUI_WELCOMEFINISHPAGE_BITMAP wizWatermark.bmp +!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT + +; Use a right to left header image when the language is right to left +!ifdef ${AB_CD}_rtl +!define MUI_HEADERIMAGE_BITMAP_RTL wizHeaderRTL.bmp +!else +!define MUI_HEADERIMAGE_BITMAP wizHeader.bmp +!endif + +/** + * Installation Pages + */ +; Welcome Page +!insertmacro MUI_PAGE_WELCOME + +; License Page +!define MUI_LICENSEPAGE_RADIOBUTTONS +!insertmacro MUI_PAGE_LICENSE license.txt + +; Custom Options Page +Page custom preOptions ChangeOptions + +; Select Install Components Page +!define MUI_PAGE_CUSTOMFUNCTION_PRE preComponents +!insertmacro MUI_PAGE_COMPONENTS + +; Select Install Directory Page +!define MUI_PAGE_CUSTOMFUNCTION_PRE CheckCustom +!insertmacro MUI_PAGE_DIRECTORY + +; Custom Shortcuts Page - CheckCustom is Called in Shortcuts +Page custom preShortcuts ChangeShortcuts + +; Start Menu Folder Page Configuration +!define MUI_PAGE_CUSTOMFUNCTION_PRE preCheckStartMenu +!define MUI_STARTMENUPAGE_NODISABLE +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Main" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" +!insertmacro MUI_PAGE_STARTMENU Application $StartMenuDir + +; Install Files Page +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FinishInstall +!insertmacro MUI_PAGE_INSTFILES + +; Finish Page +!define MUI_FINISHPAGE_NOREBOOTSUPPORT +!define MUI_FINISHPAGE_TITLE_3LINES +!define MUI_FINISHPAGE_RUN +!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApp +!define MUI_FINISHPAGE_RUN_TEXT $(LAUNCH_TEXT) +!define MUI_PAGE_CUSTOMFUNCTION_PRE disableCancel +!insertmacro MUI_PAGE_FINISH + +/** + * Uninstall Pages + */ +; Welcome Page +!insertmacro MUI_UNPAGE_WELCOME + +; Uninstall Confirm Page +!insertmacro MUI_UNPAGE_CONFIRM + +; Remove Files Page +!define MUI_PAGE_CUSTOMFUNCTION_PRE un.checkIfAppIsLoaded +!insertmacro MUI_UNPAGE_INSTFILES + +; Finish Page +!define MUI_PAGE_CUSTOMFUNCTION_PRE un.disableCancel +!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +!define MUI_FINISHPAGE_SHOWREADME "" + +; Setup the survey controls, functions, etc. except when the application has +; defined NO_UNINSTALL_SURVEY +!ifndef NO_UNINSTALL_SURVEY +!define MUI_FINISHPAGE_SHOWREADME_TEXT $(SURVEY_TEXT) +!define MUI_FINISHPAGE_SHOWREADME_FUNCTION un.survey +!endif + +!insertmacro MUI_UNPAGE_FINISH\ + +/** + * Adds a section divider to the human readable log. + */ +Function WriteLogSeparator + FileWrite $fhInstallLog "$\r$\n-------------------------------------------------------------------------------$\r$\n" +FunctionEnd + +; Callback used to check if the app being uninstalled is running. +Function un.checkIfAppIsLoaded + ; Try to delete the app executable and if we can't delete it try to close the + ; app. This allows running an instance that is located in another directory. + ClearErrors + ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" + ${DeleteFile} "$INSTDIR\${FileMainEXE}" + ${EndIf} + ${If} ${Errors} + ClearErrors + ${un.CloseApp} $(WARN_APP_RUNNING_UNINSTALL) + ; Try to delete it again to prevent launching the app while we are + ; installing. + ${DeleteFile} "$INSTDIR\${FileMainEXE}" + ClearErrors + ${EndIf} +FunctionEnd + +Function un.GetParameters + Push $R0 + Push $R1 + Push $R2 + Push $R3 + + StrCpy $R2 1 + StrLen $R3 $CMDLINE + + ;Check for quote or space + StrCpy $R0 $CMDLINE $R2 + StrCmp $R0 '"' 0 +3 + StrCpy $R1 '"' + Goto loop + StrCpy $R1 " " + + loop: + IntOp $R2 $R2 + 1 + StrCpy $R0 $CMDLINE 1 $R2 + StrCmp $R0 $R1 get + StrCmp $R2 $R3 get + Goto loop + + get: + IntOp $R2 $R2 + 1 + StrCpy $R0 $CMDLINE 1 $R2 + StrCmp $R0 " " get + StrCpy $R0 $CMDLINE "" $R2 + + Pop $R3 + Pop $R2 + Pop $R1 + Exch $R0 +FunctionEnd + +; Setup the survey controls, functions, etc. except when the application has +; defined NO_UNINSTALL_SURVEY +!ifndef NO_UNINSTALL_SURVEY +Function un.survey + ExecShell "open" "${SurveyURL}" +FunctionEnd +!endif + +; Check whether to display the current page (e.g. if we aren't performing a +; custom install don't display the custom pages). +Function CheckCustom + ${If} $InstallType != 4 + Abort + ${EndIf} +FunctionEnd + +Function preCheckStartMenu + Call CheckCustom + ${If} $AddStartMenuSC != 1 + Abort + ${EndIf} +FunctionEnd + +Function onInstallDeleteFile + ${TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 5 + ${If} $R1 == "File:" + StrCpy $R9 "$R9" "" 6 + ${If} ${FileExists} "$INSTDIR$R9" + ClearErrors + Delete "$INSTDIR$R9" + ${If} ${Errors} + ${LogMsg} "** ERROR Deleting File: $INSTDIR$R9 **" + ${Else} + ${LogMsg} "Deleted File: $INSTDIR$R9" + ${EndIf} + ${EndIf} + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +; The previous installer removed directories even when they aren't empty so this +; funtion does as well. +Function onInstallRemoveDir + ${TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 4 + ${If} $R1 == "Dir:" + StrCpy $R9 "$R9" "" 5 + StrCpy $R1 "$R9" "" -1 + ${If} $R1 == "\" + StrCpy $R9 "$R9" -1 + ${EndIf} + ${If} ${FileExists} "$INSTDIR$R9" + ClearErrors + RmDir /r "$INSTDIR$R9" + ${If} ${Errors} + ${LogMsg} "** ERROR Removing Directory: $INSTDIR$R9 **" + ${Else} + ${LogMsg} "Removed Directory: $INSTDIR$R9" + ${EndIf} + ${EndIf} + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +Function FinishInstall + FileClose $fhUninstallLog + ; Diff and add missing entries from the previous file log if it exists + ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.bak" + SetDetailsPrint textonly + DetailPrint $(STATUS_CLEANUP) + SetDetailsPrint none + ${LogHeader} "Updating Uninstall Log With Previous Uninstall Log" + StrCpy $R0 "$INSTDIR\uninstall\uninstall.log" + StrCpy $R1 "$INSTDIR\uninstall\uninstall.bak" + GetTempFileName $R2 + FileOpen $R3 $R2 w + ${TextCompareNoDetails} "$R1" "$R0" "SlowDiff" "GetDiff" + FileClose $R3 + ${Unless} ${Errors} + ${FileJoin} "$INSTDIR\uninstall\uninstall.log" "$R2" "$INSTDIR\uninstall\uninstall.log" + ${EndUnless} + ${DeleteFile} "$INSTDIR\uninstall\uninstall.bak" + ${DeleteFile} "$R2" + ${EndIf} + + Call WriteLogSeparator + ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + FileWrite $fhInstallLog "${BrandFullName} Installation Finished: $2-$1-$0 $4:$5:$6$\r$\n" + FileClose $fhInstallLog +FunctionEnd + +Section "-Application" Section1 + SectionIn 1 RO + SetDetailsPrint textonly + DetailPrint $(STATUS_CLEANUP) + SetDetailsPrint none + SetOutPath $INSTDIR + ; For a "Standard" upgrade without talkback installed add the InstallDisabled + ; file to the talkback source files so it will be disabled by the extension + ; manager. This is done at the start of the installation since we check for + ; the existence of a directory to determine if this is an upgrade. + ${If} $InstallType == 1 + ${AndIf} ${FileExists} "$INSTDIR\greprefs" + ${AndIf} ${FileExists} "$EXEDIR\optional\extensions\talkback@mozilla.org" + ${Unless} ${FileExists} "$INSTDIR\extensions\talkback@mozilla.org" + ${Unless} ${FileExists} "$INSTDIR\extensions" + CreateDirectory "$INSTDIR\extensions" + ${EndUnless} + CreateDirectory "$INSTDIR\extensions\talkback@mozilla.org" + FileOpen $2 "$EXEDIR\optional\extensions\talkback@mozilla.org\InstallDisabled" w + FileWrite $2 "$\r$\n" + FileClose $2 + ${EndUnless} + ${EndIf} + + ; Try to delete the app executable and if we can't delete it try to close the + ; app. This allows running an instance that is located in another directory. + ClearErrors + ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" + ${DeleteFile} "$INSTDIR\${FileMainEXE}" + ${EndIf} + ${If} ${Errors} + ClearErrors + ${CloseApp} $(WARN_APP_RUNNING_INSTALL) + ; Try to delete it again to prevent launching the app while we are + ; installing. + ${DeleteFile} "$INSTDIR\${FileMainEXE}" + ClearErrors + ${EndIf} + + Call CleanupOldLogs + + ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.log" + ; Diff cleanup.log with uninstall.bak + ${LogHeader} "Updating Uninstall Log With XPInstall Wizard Logs" + StrCpy $R0 "$INSTDIR\uninstall\uninstall.log" + StrCpy $R1 "$INSTDIR\uninstall\cleanup.log" + GetTempFileName $R2 + FileOpen $R3 $R2 w + ${TextCompareNoDetails} "$R1" "$R0" "SlowDiff" "GetDiff" + FileClose $R3 + + ${Unless} ${Errors} + ${FileJoin} "$INSTDIR\uninstall\uninstall.log" "$R2" "$INSTDIR\uninstall\uninstall.log" + ${EndUnless} + ${DeleteFile} "$INSTDIR\uninstall\cleanup.log" + ${DeleteFile} "$R2" + ${DeleteFile} "$INSTDIR\uninstall\uninstall.bak" + Rename "$INSTDIR\uninstall\uninstall.log" "$INSTDIR\uninstall\uninstall.bak" + ${EndIf} + + ${Unless} ${FileExists} "$INSTDIR\uninstall" + CreateDirectory "$INSTDIR\uninstall" + ${EndUnless} + + FileOpen $fhUninstallLog "$INSTDIR\uninstall\uninstall.log" w + FileOpen $fhInstallLog "$INSTDIR\install.log" w + + ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + FileWrite $fhInstallLog "${BrandFullName} Installation Started: $2-$1-$0 $4:$5:$6" + Call WriteLogSeparator + + ${LogHeader} "Installation Details" + ${LogMsg} "Install Dir: $INSTDIR" + ${LogMsg} "Locale : ${AB_CD}" + ${LogMsg} "App Version: ${AppVersion}" + ${LogMsg} "GRE Version: ${GREVersion}" + + ${If} ${FileExists} "$EXEDIR\removed-files.log" + ${LogHeader} "Removing Obsolete Files and Directories" + ${LineFind} "$EXEDIR\removed-files.log" "/NUL" "1:-1" "onInstallDeleteFile" + ${LineFind} "$EXEDIR\removed-files.log" "/NUL" "1:-1" "onInstallRemoveDir" + ${EndIf} + + ${DeleteFile} "$INSTDIR\install_wizard.log" + ${DeleteFile} "$INSTDIR\install_status.log" + + SetDetailsPrint textonly + DetailPrint $(STATUS_INSTALL_APP) + SetDetailsPrint none + ${LogHeader} "Installing Main Files" + StrCpy $R0 "$EXEDIR\nonlocalized" + StrCpy $R1 "$INSTDIR" + Call DoCopyFiles + + ; Register DLLs + ; XXXrstrong - AccessibleMarshal.dll can be used by multiple applications but + ; is only registered for the last application installed. When the last + ; application installed is uninstalled AccessibleMarshal.dll will no longer be + ; registered. bug 338878 + ${LogHeader} "DLL Registration" + ClearErrors + RegDLL "$INSTDIR\AccessibleMarshal.dll" + ${If} ${Errors} + ${LogMsg} "** ERROR Registering: $INSTDIR\AccessibleMarshal.dll **" + ${Else} + ${LogUninstall} "DLLReg: \AccessibleMarshal.dll" + ${LogMsg} "Registered: $INSTDIR\AccessibleMarshal.dll" + ${EndIf} + + ; Write extra files created by the application to the uninstall.log so they + ; will be removed when the application is uninstalled. To remove an empty + ; directory write a bogus filename to the deepest directory and all empty + ; parent directories will be removed. + ${LogUninstall} "File: \components\compreg.dat" + ${LogUninstall} "File: \components\xpti.dat" + ${LogUninstall} "File: \.autoreg" + ${LogUninstall} "File: \active-update.xml" + ${LogUninstall} "File: \install.log" + ${LogUninstall} "File: \install_status.log" + ${LogUninstall} "File: \install_wizard.log" + ${LogUninstall} "File: \updates.xml" + + SetDetailsPrint textonly + DetailPrint $(STATUS_INSTALL_LANG) + SetDetailsPrint none + ${LogHeader} "Installing Localized Files" + StrCpy $R0 "$EXEDIR\localized" + StrCpy $R1 "$INSTDIR" + Call DoCopyFiles + + ${If} $InstallType != 4 + Call install_talkback + ${EndIf} + + ; Default for creating Start Menu folder and shortcuts + ; (1 = create, 0 = don't create) + ${If} $AddStartMenuSC == "" + StrCpy $AddStartMenuSC "1" + ${EndIf} + + ; Default for creating Quick Launch shortcut (1 = create, 0 = don't create) + ${If} $AddQuickLaunchSC == "" + StrCpy $AddQuickLaunchSC "1" + ${EndIf} + + ; Default for creating Desktop shortcut (1 = create, 0 = don't create) + ${If} $AddDesktopSC == "" + StrCpy $AddDesktopSC "1" + ${EndIf} + + ; Remove registry entries for non-existent apps and for apps that point to our + ; install location in the Software\Mozilla key. + SetShellVarContext current ; Set SHCTX to HKCU + ${RegCleanMain} "Software\Mozilla" + SetShellVarContext all ; Set SHCTX to HKLM + ${RegCleanMain} "Software\Mozilla" + + ; Remove uninstall entries that point to our install location + ${RegCleanUninstall} + + ${LogHeader} "Adding Registry Entries" + ClearErrors + WriteRegStr HKLM "Software\Mozilla\InstallerTest" "InstallerTest" "Test" + ${If} ${Errors} + SetShellVarContext current ; Set SHCTX to HKCU + StrCpy $TmpVal "HKCU" ; used primarily for logging + ${Else} + SetShellVarContext all ; Set SHCTX to HKLM + DeleteRegKey HKLM "Software\Mozilla\InstallerTest" + StrCpy $TmpVal "HKLM" ; used primarily for logging + ${EndIf} + + ; The previous installer adds several regsitry values to both HKLM and HKCU. + ; We now try to add to HKLM and if that fails to HKCU + + ; The order that reg keys and values are added is important if you use the + ; uninstall log to remove them on uninstall. When using the uninstall log you + ; MUST add children first so they will be removed first on uninstall so they + ; will be empty when the key is deleted. This allows the uninstaller to + ; specify that only empty keys will be deleted. + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Main" + ${WriteRegStr2} $TmpVal "$0" "Install Directory" "$INSTDIR" 0 + ${WriteRegStr2} $TmpVal "$0" "PathToExe" "$INSTDIR\${FileMainEXE}" 0 + ${WriteRegStr2} $TmpVal "$0" "Program Folder Path" "$SMPROGRAMS\$StartMenuDir" 0 + ${WriteRegDWORD2} $TmpVal "$0" "Create Quick Launch Shortcut" $AddQuickLaunchSC 0 + ${WriteRegDWORD2} $TmpVal "$0" "Create Desktop Shortcut" $AddDesktopSC 0 + ${WriteRegDWORD2} $TmpVal "$0" "Create Start Menu Shortcut" $AddStartMenuSC 0 + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Uninstall" + ${WriteRegStr2} $TmpVal "$0" "Uninstall Log Folder" "$INSTDIR\uninstall" 0 + ${WriteRegStr2} $TmpVal "$0" "Description" "${BrandFullNameInternal} (${AppVersion})" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})" + ${WriteRegStr2} $TmpVal "$0" "" "${AppVersion} (${AB_CD})" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}\bin" + ${WriteRegStr2} $TmpVal "$0" "PathToExe" "$INSTDIR\${FileMainEXE}" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}\extensions" + ${WriteRegStr2} $TmpVal "$0" "Components" "$INSTDIR\components" 0 + ${WriteRegStr2} $TmpVal "$0" "Plugins" "$INSTDIR\plugins" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}" + ${WriteRegStr2} $TmpVal "$0" "GeckoVer" "${GREVersion}" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}" + ${WriteRegStr2} $TmpVal "$0" "" "${GREVersion}" 0 + ${WriteRegStr2} $TmpVal "$0" "CurrentVersion" "${AppVersion} (${AB_CD})" 0 + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ; Add the Mail registry keys + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}" + ${WriteRegStr2} $TmpVal "$0" "" "${BrandFullNameInternal}" 0 + + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\DefaultIcon" + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\",0" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + + ; The Reinstall Command is defined at + ; http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\InstallInfo" + ; the old installer didn't pass in 'mail' here... + StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" /ua $\"${AppVersion} (${AB_CD})$\" /hs mail" + ${WriteRegStr2} $TmpVal "$0" "HideIconsCommand" "$1" 0 + ${WriteRegDWORD2} $TmpVal "$0" "IconsVisible" 1 0 + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\" -silent -setDefaultMail" + ${WriteRegStr2} $TmpVal "$0" "ReinstallCommand" "$1" 0 + StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" /ua $\"${AppVersion} (${AB_CD})$\" /ss mail" + ${WriteRegStr2} $TmpVal "$0" "ShowIconsCommand" "$1" 0 + + ; shell/open/command + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\shell\open\command" + ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 + + ; shell/properties/command + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\shell\properties" + ${WriteRegStr2} $TmpVal "$0" "" "Thunderbird &Options" 0 + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\shell\properties\command" + ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE} -options" 0 + + ; protocols/mailto + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\protocols\mailto" + ${WriteRegStr2} $TmpVal "$0" "" "URL:MailTo Protocol" 0 + ${WriteRegStr2} $TmpVal "$0" "URL Protocol" "" 0 + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\protocols\mailto\DefaultIcon" + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\",0" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\protocols\mailto\shell\open\command" + StrCpy $1 "$INSTDIR\${FileMainEXE} -compose $\"%1$\"" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ; Add the News registry keys + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}" + ${WriteRegStr2} $TmpVal "$0" "" "${BrandFullNameInternal}" 0 + + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\DefaultIcon" + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\",0" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + + ; shell/open/command + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\shell\open\command" + ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 + + ; protocols/news + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\news" + ${WriteRegStr2} $TmpVal "$0" "" "URL:News Protocol" 0 + ${WriteRegStr2} $TmpVal "$0" "URL Protocol" "" 0 + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\news\DefaultIcon" + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\",0" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\news\shell\open\command" + StrCpy $1 "$INSTDIR\${FileMainEXE} -mail $\"%1$\"" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + + ; protocols/nntp + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\nntp" + ${WriteRegStr2} $TmpVal "$0" "" "URL:NNTP Protocol" 0 + ${WriteRegStr2} $TmpVal "$0" "URL Protocol" "" 0 + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\nntp\DefaultIcon" + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\",0" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\nntp\shell\open\command" + StrCpy $1 "$INSTDIR\${FileMainEXE} -mail $\"%1$\"" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + + ; protocols/nntp + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\snews" + ${WriteRegStr2} $TmpVal "$0" "" "URL:Snews Protocol" 0 + ${WriteRegStr2} $TmpVal "$0" "URL Protocol" "" 0 + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\snews\DefaultIcon" + StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\",0" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + StrCpy $0 "Software\Clients\News\${BrandFullNameInternal}\protocols\snews\shell\open\command" + StrCpy $1 "$INSTDIR\${FileMainEXE} -mail $\"%1$\"" + ${WriteRegStr2} $TmpVal "$0" "" "$1" 0 + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ; End of protocol registration + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + ; Write the uninstall registry keys + StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" + StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" $\"/ua ${AppVersion} (${AB_CD})$\"" + + ${WriteRegStr2} $TmpVal "$0" "Comments" "${BrandFullNameInternal}" 0 + ${WriteRegStr2} $TmpVal "$0" "DisplayIcon" "$INSTDIR\${FileMainEXE},0" 0 + ${WriteRegStr2} $TmpVal "$0" "DisplayName" "${BrandFullName} (${AppVersion})" 0 + ${WriteRegStr2} $TmpVal "$0" "DisplayVersion" "${AppVersion} (${AB_CD})" 0 + ${WriteRegStr2} $TmpVal "$0" "InstallLocation" "$INSTDIR" 0 + ${WriteRegStr2} $TmpVal "$0" "Publisher" "Mozilla" 0 + ${WriteRegStr2} $TmpVal "$0" "UninstallString" "$1" 0 + ${WriteRegStr2} $TmpVal "$0" "URLInfoAbout" "${URLInfoAbout}" 0 + ${WriteRegStr2} $TmpVal "$0" "URLUpdateInfo" "${URLUpdateInfo}" 0 + ${WriteRegDWORD2} $TmpVal "$0" "NoModify" 1 0 + ${WriteRegDWORD2} $TmpVal "$0" "NoRepair" 1 0 + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + + ; Create Start Menu shortcuts + ${LogHeader} "Adding Shortcuts" + ${If} $AddStartMenuSC == 1 + CreateDirectory "$SMPROGRAMS\$StartMenuDir" + CreateShortCut "$SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ${LogUninstall} "File: $SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal}.lnk" + CreateShortCut "$SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal} ($(SAFE_MODE)).lnk" "$INSTDIR\${FileMainEXE}" "-safe-mode" "$INSTDIR\${FileMainEXE}" 0 + ${LogUninstall} "File: $SMPROGRAMS\$StartMenuDir\${BrandFullNameInternal} ($(SAFE_MODE)).lnk" + ${EndIf} + + ; perhaps use the uninstall keys + ${If} $AddQuickLaunchSC == 1 + CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ${LogUninstall} "File: $QUICKLAUNCH\${BrandFullName}.lnk" + ${EndIf} + + ${LogHeader} "Updating Quick Launch Shortcuts" + ${If} $AddDesktopSC == 1 + CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ${LogUninstall} "File: $DESKTOP\${BrandFullName}.lnk" + ${EndIf} + + !insertmacro MUI_STARTMENU_WRITE_END + + ; Refresh destop icons + System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)" + + WriteUninstaller "$INSTDIR\uninstall\uninstaller.exe" + +SectionEnd + +Section /o "Quality Feedback Agent" Section3 + Call install_talkback +SectionEnd + +Function install_talkback + StrCpy $R0 "$EXEDIR\optional\extensions\talkback@mozilla.org" + ${If} ${FileExists} "$R0" + SetDetailsPrint textonly + DetailPrint $(STATUS_INSTALL_OPTIONAL) + SetDetailsPrint none + StrCpy $R1 "$INSTDIR\extensions\talkback@mozilla.org" + ${If} ${FileExists} "$R1" + ; If there is an existing InstallDisabled file copy it to the source dir. + ; This will add it during install to the uninstall.log and retains the + ; original disabled state from the installation. + ${If} ${FileExists} "$R1\InstallDisabled" + CopyFiles "$R1\InstallDisabled" "$R0" + ${EndIf} + ; Remove the existing install of talkback + RmDir /r "$R1" + ${ElseIf} $InstallType == 1 + ; For standard installations only enable talkback for the x percent as + ; defined by the application. We use QueryPerformanceCounter for the seed + ; since it returns a 64bit integer which should improve the accuracy. + System::Call "kernel32::QueryPerformanceCounter(*l.r1)" + System::Int64Op $1 % 100 + Pop $0 + ; The percentage provided by the application refers to the percentage to + ; include so all numbers equal or greater than should be disabled. + ${If} $0 >= ${RandomPercent} + FileOpen $2 "$R0\InstallDisabled" w + FileWrite $2 "$\r$\n" + FileClose $2 + ${EndIf} + ${EndIf} + ClearErrors + ${LogHeader} "Installing Quality Feedback Agent" + Call DoCopyFiles + ${EndIf} +FunctionEnd + +Section "Uninstall" + SetDetailsPrint textonly + DetailPrint $(STATUS_UNINSTALL_MAIN) + SetDetailsPrint none + ; Remove registry entries for non-existent apps and for apps that point to our + ; install location in the Software\Mozilla key. + SetShellVarContext current ; Sets SHCTX to HKCU + ${un.RegCleanMain} "Software\Mozilla" + SetShellVarContext all ; Sets SHCTX to HKLM + ${un.RegCleanMain} "Software\Mozilla" + + ; Remove uninstall entries that point to our install location + ${un.RegCleanUninstall} + + SetShellVarContext all ; Set SHCTX to HKLM + ${un.GetSecondInstallPath} "Software\Mozilla" $R9 + ${If} $R9 == "false" + SetShellVarContext current ; Set SHCTX to HKCU + ${un.GetSecondInstallPath} "Software\Mozilla" $R9 + ${EndIf} + + StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\shell\open\command" + ReadRegStr $1 HKLM "$0" "" + Push $1 + ${GetPathFromRegStr} + Pop $R0 + Push $R0 + ${GetParentDir} + Pop $R1 + + ; Only remove the Clients\Mail key if it refers to this install location. + ; The Clients\Mail registry key is independent of the default app for the OS + ; settings. The XPInstall base un-installer always removes this key if it is + ; uninstalling the default app and it will always replace the keys when + ; installing even if there is another install of Firefox that is set as the + ; default app. Now the key is always updated on install but it is only + ; removed if it refers to this install location. + ${If} $INSTDIR == $R1 + ; XXXrstrong - if there is another installation of the same app ideally we + ; would just modify these values. The GetSecondInstallPath macro could be + ; made to provide enough information to do this. + DeleteRegKey HKLM "Software\Clients\Mail\${BrandFullNameInternal}" + ${EndIf} + + StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}" + ${If} $R9 == "false" + DeleteRegKey HKLM "$0" + DeleteRegKey HKCU "$0" + ${Else} + ReadRegStr $1 HKLM "$0" "" + Push $1 + ${GetPathFromRegStr} + Pop $R0 + Push $R0 + ${GetParentDir} + Pop $R1 + ${If} $INSTDIR == $R1 + WriteRegStr HKLM "$0" "" "$R9" + Push $R9 + ${GetParentDir} + Pop $R1 + WriteRegStr HKLM "$0" "Path" "$R1" + ${EndIf} + ${EndIf} + + ; Remove files. If we don't have a log file skip + ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.log" + ; Copy the uninstall log file to a temporary file + GetTempFileName $TmpVal + CopyFiles "$INSTDIR\uninstall\uninstall.log" "$TmpVal" + + ; Unregister DLL's + ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.UnRegDLLsCallback" + + ; Delete files + ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.RemoveFilesCallback" + + ; Remove directories we always control + RmDir /r "$INSTDIR\uninstall" + RmDir /r "$INSTDIR\updates" + RmDir /r "$INSTDIR\defaults\shortcuts" + + ; Remove empty directories + ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.RemoveDirsCallback" + + ; Delete the temporary uninstall log file + ${DeleteFile} "$TmpVal" + + ; Remove the installation directory if it is empty + ${RemoveDir} "$INSTDIR" + ${EndIf} + + ; Refresh destop icons otherwise the start menu internet item won't be removed + ; and other ugly things will happen like recreation of the registry key by the + ; OS under some conditions. + System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)" +SectionEnd + +; When we add an optional action to the finish page the cancel button is +; enabled. The next two function disable it for install and uninstall and leave +; the finish button as the only choice. +Function disableCancel + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" +FunctionEnd + +Function un.disableCancel + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" + + ; Setup the survey controls, functions, etc. except when the application has + ; defined NO_UNINSTALL_SURVEY + !ifdef NO_UNINSTALL_SURVEY + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" + !endif +FunctionEnd + +Function ChangeShortcuts + ${MUI_INSTALLOPTIONS_READ} $0 "shortcuts.ini" "Settings" "State" + ${If} $0 != 0 + Abort + ${EndIf} + ${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State" + ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" + ${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State" +FunctionEnd + +Function GetDiff + ${TrimNewLines} "$9" "$9" + ${If} $9 != "" + FileWrite $R3 "$9$\r$\n" + ${LogMsg} "Added To Uninstall Log: $9" + ${EndIf} + Push 0 +FunctionEnd + +Function DoCopyFiles + StrLen $R2 $R0 + ${LocateNoDetails} "$R0" "/L=FD" "CopyFile" +FunctionEnd + +Function CopyFile + StrCpy $R3 $R8 "" $R2 + ${If} $R6 == "" + ${Unless} ${FileExists} "$R1$R3\$R7" + ClearErrors + CreateDirectory "$R1$R3\$R7" + ${If} ${Errors} + ${LogMsg} "** ERROR Creating Directory: $R1$R3\$R7 **" + ${Else} + ${LogMsg} "Created Directory: $R1$R3\$R7" + ${EndIf} + ${EndUnless} + ${Else} + ${Unless} ${FileExists} "$R1$R3" + ClearErrors + CreateDirectory "$R1$R3" + ${If} ${Errors} + ${LogMsg} "** ERROR Creating Directory: $R1$R3 **" + ${Else} + ${LogMsg} "Created Directory: $R1$R3" + ${EndIf} + ${EndUnless} + ${If} ${FileExists} "$R1$R3\$R7" + Delete "$R1$R3\$R7" + ${EndIf} + ClearErrors + CopyFiles /SILENT $R9 "$R1$R3" + ${If} ${Errors} + ; XXXrstrong - what should we do if there is an error installing a file? + ${LogMsg} "** ERROR Installing File: $R1$R3\$R7 **" + ${Else} + ${LogMsg} "Installed File: $R1$R3\$R7" + ${EndIf} + ; If the file is installed into the installation directory remove the + ; installation directory's path from the file path when writing to the + ; uninstall.log so it will be a relative path. This allows the same + ; uninstaller.exe to be used with zip builds if we supply an uninstall.log. + ${WordReplace} "$R1$R3\$R7" "$INSTDIR" "" "+" $R3 + ${LogUninstall} "File: $R3" + ${EndIf} + Push 0 +FunctionEnd + +Function un.RemoveFilesCallback + ${un.TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 5 + ${If} $R1 == "File:" + StrCpy $R9 "$R9" "" 6 + StrCpy $R0 "$R9" 1 + ; If the path is relative prepend the install directory + ${If} $R0 == "\" + StrCpy $R0 "$INSTDIR$R9" + ${Else} + StrCpy $R0 "$R9" + ${EndIf} + ${If} ${FileExists} "$R0" + ${DeleteFile} "$R0" + ${EndIf} + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +; Using locate will leave file handles open to some of the directories which +; will prevent the deletion of these directories. This parses the uninstall.log +; and uses the file entries to find / remove empty directories. +Function un.RemoveDirsCallback + ${un.TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 5 + ${If} $R1 == "File:" + StrCpy $R9 "$R9" "" 6 + StrCpy $R1 "$R9" 1 + ${If} $R1 == "\" + StrCpy $R2 "INSTDIR" + StrCpy $R1 "$INSTDIR$R9" + ${Else} + StrCpy $R2 " " + StrCpy $R1 "$R9" + ${EndIf} + loop: + Push $R1 + Call un.GetParentDir + Pop $R0 + GetFullPathName $R1 "$R0" + ; We only try to remove empty directories but the Desktop, StartMenu, and + ; QuickLaunch directories can be empty so guard against removing them. + SetShellVarContext all + ${If} $R1 == "$DESKTOP" + ${OrIf} $R1 == "$STARTMENU" + GoTo end + ${EndIf} + SetShellVarContext current + ${If} $R1 == "$QUICKLAUNCH" + ${OrIf} $R1 == "$DESKTOP" + ${OrIf} $R1 == "$STARTMENU" + GoTo end + ${EndIf} + ${If} ${FileExists} "$R1" + RmDir "$R1" + ${EndIf} + ${If} ${Errors} + ${OrIf} $R1 != "$INSTDIR" + GoTo end + ${EndIf} + GoTo loop + ${EndIf} + + end: + ClearErrors + Push 0 +FunctionEnd + +Function un.UnRegDLLsCallback + ${un.TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 7 + ${If} $R1 == "DLLReg:" + StrCpy $R9 "$R9" "" 8 + StrCpy $R1 "$R9" 1 + ${If} $R1 == "\" + StrCpy $R1 "$INSTDIR$R9" + ${Else} + StrCpy $R1 "$R9" + ${EndIf} + UnRegDLL $R1 + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +Function un.GetParentDir + Exch $R0 ; old $R0 is on top of stack + Push $R1 + Push $R2 + Push $R3 + StrLen $R3 $R0 + loop: + IntOp $R1 $R1 - 1 + IntCmp $R1 -$R3 exit exit + StrCpy $R2 $R0 1 $R1 + StrCmp $R2 "\" exit + Goto loop + exit: + StrCpy $R0 $R0 $R1 + Pop $R3 + Pop $R2 + Pop $R1 + Exch $R0 ; put $R0 on top of stack, restore $R0 to original value + FunctionEnd + +; Clean up the old log files. We only diff the first two found since it is +; possible for there to be several MB and comparing that many would take a very +; long time to diff. +Function CleanupOldLogs + FindFirst $0 $TmpVal "$INSTDIR\uninstall\*wizard*" + StrCmp $TmpVal "" done + StrCpy $TmpVal "$INSTDIR\uninstall\$TmpVal" + + FindNext $0 $1 + StrCmp $1 "" cleanup + StrCpy $1 "$INSTDIR\uninstall\$1" + Push $1 + Call DiffOldLogFiles + FindClose $0 + ${DeleteFile} "$1" + + cleanup: + StrCpy $2 "$INSTDIR\uninstall\cleanup.log" + ${DeleteFile} "$2" + FileOpen $R2 $2 w + Push $TmpVal + ${LineFind} "$INSTDIR\uninstall\$TmpVal" "/NUL" "1:-1" "CleanOldLogFilesCallback" + ${DeleteFile} "$INSTDIR\uninstall\$TmpVal" + done: + FindClose $0 + FileClose $R2 + FileClose $R3 +FunctionEnd + +Function DiffOldLogFiles + StrCpy $R1 "$1" + GetTempFileName $R2 + FileOpen $R3 $R2 w + ${TextCompareNoDetails} "$R1" "$TmpVal" "SlowDiff" "GetDiff" + FileClose $R3 + ${FileJoin} "$TmpVal" "$R2" "$TmpVal" + ${DeleteFile} "$R2" +FunctionEnd + +Function CleanOldLogFilesCallback + ${TrimNewLines} "$R9" $R9 + ${WordReplace} "$R9" "$INSTDIR" "" "+" $R3 + ${WordFind} "$R9" " " "E+1}" $R0 + IfErrors updater 0 + + ${WordFind} "$R0" "Installing: " "E+1}" $R1 + ${Unless} ${Errors} + FileWrite $R2 "File: $R1$\r$\n" + GoTo done + ${EndUnless} + + ${WordFind} "$R0" "Replacing: " "E+1}" $R1 + ${Unless} ${Errors} + FileWrite $R2 "File: $R1$\r$\n" + GoTo done + ${EndUnless} + + ${WordFind} "$R0" "Windows Shortcut: " "E+1}" $R1 + ${Unless} ${Errors} + FileWrite $R2 "File: $R1.lnk$\r$\n" + GoTo done + ${EndUnless} + + ${WordFind} "$R0" "Create Folder: " "E+1}" $R1 + ${Unless} ${Errors} + FileWrite $R2 "Dir: $R1$\r$\n" + GoTo done + ${EndUnless} + + updater: + ${WordFind} "$R9" "installing: " "E+1}" $R0 + ${Unless} ${Errors} + FileWrite $R2 "File: $R0$\r$\n" + ${EndUnless} + + done: + Push 0 +FunctionEnd + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(APP_DESC) + !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(QFA_DESC) +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +!insertmacro MOZ_MUI_LANGUAGE 'baseLocale' +!verbose push +!verbose 3 +!include "overrideLocale.nsh" +!include "customLocale.nsh" +!verbose pop + +; Set this after the locale files to override it if it is in the locale +; using " " for BrandingText will hide the "Nullsoft Install System..." branding +BrandingText " " + +Function preShortcuts + Call CheckCustom + !insertmacro MUI_HEADER_TEXT "$(SHORTCUTS_PAGE_TITLE)" "$(SHORTCUTS_PAGE_SUBTITLE)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "shortcuts.ini" +FunctionEnd + +Function preOptions + !insertmacro MUI_HEADER_TEXT "$(OPTIONS_PAGE_TITLE)" "$(OPTIONS_PAGE_SUBTITLE)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "options.ini" +FunctionEnd + +Function ChangeOptions + ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Settings" "State" + ${If} $0 != 0 + Abort + ${EndIf} + ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 2" "State" + StrCmp $R0 "1" +1 +2 + StrCpy $InstallType "1" + ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 3" "State" + StrCmp $R0 "1" +1 +2 + StrCpy $InstallType "4" +FunctionEnd + +Function preComponents + Call CheckCustom + ; If DOMi isn't available skip the options page + ${Unless} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org" + ; If talkback exists always install it enabled. + ${If} ${FileExists} "$EXEDIR\optional\extensions\talkback@mozilla.org" + SectionSetFlags 2 1 + ${EndIf} + Abort + ${EndUnless} +FunctionEnd + +Function LaunchApp + ${CloseApp} $(WARN_APP_RUNNING_INSTALL) + Exec "$INSTDIR\${FileMainEXE}" +FunctionEnd + +Function .onInit + StrCpy $LANGUAGE 0 + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "options.ini" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "shortcuts.ini" + !insertmacro createShortcutsINI + !insertmacro createBasicCustomOptionsINI + + ; There must always be nonlocalized and localized directories. + ${GetSize} "$EXEDIR\nonlocalized\" "/S=0K" $1 $8 $9 + ${GetSize} "$EXEDIR\localized\" "/S=0K" $2 $8 $9 + IntOp $0 $1 + $2 + SectionSetSize 0 $0 + + ; Set the section size for Talkback only if it exists. + ${If} ${FileExists} "$EXEDIR\optional\extensions\talkback@mozilla.org" + ${GetSize} "$EXEDIR\optional\extensions\talkback@mozilla.org" "/S=0K" $0 $8 $9 + SectionSetSize 2 $0 + ${Else} + ; Hide Talkback in the components page if it isn't available. + SectionSetText 2 "" + ${EndIf} +FunctionEnd + +Function un.onInit + GetFullPathName $INSTDIR "$INSTDIR\.." + StrCpy $LANGUAGE 0 +; XXXrstrong - should we quit when the app exe is not present? + Call un.SetAccess +FunctionEnd + diff --git a/mail/locales/en-US/installer/custom.properties b/mail/locales/en-US/installer/custom.properties new file mode 100755 index 000000000000..13841ef89aa8 --- /dev/null +++ b/mail/locales/en-US/installer/custom.properties @@ -0,0 +1,83 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# LOCALIZATION NOTE: + +# This file must be saved as UTF8 + +# Accesskeys are defined by prefixing the letter that is to be used for the +# accesskey with an ampersand (e.g. &). + +# Do not replace ${BrandShortName} or $(^Name) with a custom string. + +# You can use \n to create a newline in the string but only when the string +# from en-US contains a \n. + +APP_DESC=Required files for the ${BrandShortName} application +DEV_TOOLS_DESC=A tool for inspecting the DOM of HTML, XUL, and XML pages, including the application's chrome. +QFA_DESC=A tool for submitting crash reports to Mozilla.org. +SAFE_MODE=Safe Mode +OPTIONS_PAGE_TITLE=Setup Type +OPTIONS_PAGE_SUBTITLE=Choose setup options +SHORTCUTS_PAGE_TITLE=Set Up Shortcuts +SHORTCUTS_PAGE_SUBTITLE=Create Program Icons +SURVEY_TEXT=&Tell us what you thought of ${BrandShortName} +LAUNCH_TEXT=&Launch $(^Name) now +WARN_APP_RUNNING_INSTALL=$(^Name) must be closed to proceed with the installation.\n\nClick "OK" to exit $(^Name) automatically and continue. +WARN_APP_RUNNING_UNINSTALL=$(^Name) must be closed to proceed with the uninstall.\n\nClick "OK" to exit $(^Name) automatically and continue. +CREATE_ICONS_DESC=Create icons for ${BrandShortName}: +ICONS_DESKTOP=On my &Desktop +ICONS_STARTMENU=In my &Start Menu Programs folder +ICONS_QUICKLAUNCH=In my &Quick Launch bar + +STATUS_INSTALL_APP=Installing ${BrandShortName}... +STATUS_INSTALL_LANG=Installing Language Files (${AB_CD})... +STATUS_INSTALL_OPTIONAL=Installing Optional Components... +STATUS_UNINSTALL_MAIN=Uninstalling ${BrandShortName}... +STATUS_CLEANUP=Cleaning up the birdcage... + +# _DESC strings support approximately 65 characters per line. +# One line +OPTIONS_SUMMARY=Choose the type of setup you prefer, then click Next. +# One line +OPTION_STANDARD_DESC=${BrandShortName} will be installed with the most common options. +OPTION_STANDARD_RADIO=&Standard +# One line +OPTION_COMPLETE_DESC=${BrandShortName} will be installed with all available options. +OPTION_COMPLETE_RADIO=C&omplete +# Two lines +OPTION_CUSTOM_DESC=You may choose individual options to be installed. Recommended for experienced users. +OPTION_CUSTOM_RADIO=&Custom diff --git a/mail/locales/en-US/installer/mui.properties b/mail/locales/en-US/installer/mui.properties new file mode 100755 index 000000000000..6cec468fc079 --- /dev/null +++ b/mail/locales/en-US/installer/mui.properties @@ -0,0 +1,96 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# To make the l10n tinderboxen see changes to this file you can change a value +# name by adding - to the end of the name followed by chars (e.g. Branding-2). + +# LOCALIZATION NOTE: + +# This file must be saved as UTF8 + +# Accesskeys are defined by prefixing the letter that is to be used for the +# accesskey with an ampersand (e.g. &). + +# Do not replace $(^NameDA) or $(^Name) with a custom string. + +# Do not change $(^NameDA) to $(^Name) or $(^Name) to $(^NameDA). NameDA allows +# Name to contain an ampersand (e.g. DA stands for double ampersand) and +# prevents the letter following the ampersand being used as an accesskey. + +# You can use \n to create a newline in the string but only when the string +# from en-US contains a \n. +MUI_TEXT_WELCOME_INFO_TITLE=Welcome to the $(^NameDA) Setup Wizard +MUI_TEXT_WELCOME_INFO_TEXT=This wizard will guide you through the installation of $(^NameDA).\n\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.\n\n$_CLICK +MUI_TEXT_LICENSE_TITLE=License Agreement +MUI_TEXT_LICENSE_SUBTITLE=Please review the license terms before installing $(^NameDA). +MUI_INNERTEXT_LICENSE_TOP=Press Page Down to see the rest of the agreement. +MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS=If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK +MUI_TEXT_COMPONENTS_TITLE=Choose Components +MUI_TEXT_COMPONENTS_SUBTITLE=Choose which features of $(^NameDA) you want to install. +MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE=Description +MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO=Position your mouse over a component to see its description. +MUI_TEXT_DIRECTORY_TITLE=Choose Install Location +MUI_TEXT_DIRECTORY_SUBTITLE=Choose the folder in which to install $(^NameDA). +MUI_TEXT_INSTALLING_TITLE=Installing +MUI_TEXT_INSTALLING_SUBTITLE=Please wait while $(^NameDA) is being installed. +MUI_TEXT_FINISH_TITLE=Installation Complete +MUI_TEXT_FINISH_SUBTITLE=Setup was completed successfully. +MUI_TEXT_ABORT_TITLE=Installation Aborted +MUI_TEXT_ABORT_SUBTITLE=Setup was not completed successfully. +MUI_BUTTONTEXT_FINISH=&Finish +MUI_TEXT_FINISH_INFO_TITLE=Completing the $(^NameDA) Setup Wizard +MUI_TEXT_FINISH_INFO_TEXT=$(^NameDA) has been installed on your computer.\n\nClick Finish to close this wizard. +MUI_TEXT_FINISH_INFO_REBOOT=Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now? +MUI_TEXT_FINISH_REBOOTNOW=Reboot now +MUI_TEXT_FINISH_REBOOTLATER=I want to manually reboot later +MUI_TEXT_STARTMENU_TITLE=Choose Start Menu Folder +MUI_TEXT_STARTMENU_SUBTITLE=Choose a Start Menu folder for the $(^NameDA) shortcuts. +MUI_INNERTEXT_STARTMENU_TOP=Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder. +MUI_TEXT_ABORTWARNING=Are you sure you want to quit $(^Name) Setup? +MUI_UNTEXT_WELCOME_INFO_TITLE=Welcome to the $(^NameDA) Uninstall Wizard +MUI_UNTEXT_WELCOME_INFO_TEXT=This wizard will guide you through the uninstallation of $(^NameDA).\n\nBefore starting the uninstallation, make sure $(^NameDA) is not running.\n\n$_CLICK +MUI_UNTEXT_CONFIRM_TITLE=Uninstall $(^NameDA) +MUI_UNTEXT_CONFIRM_SUBTITLE=Remove $(^NameDA) from your computer. +MUI_UNTEXT_UNINSTALLING_TITLE=Uninstalling +MUI_UNTEXT_UNINSTALLING_SUBTITLE=Please wait while $(^NameDA) is being uninstalled. +MUI_UNTEXT_FINISH_TITLE=Uninstallation Complete +MUI_UNTEXT_FINISH_SUBTITLE=Uninstall was completed successfully. +MUI_UNTEXT_ABORT_TITLE=Uninstallation Aborted +MUI_UNTEXT_ABORT_SUBTITLE=Uninstall was not completed successfully. +MUI_UNTEXT_FINISH_INFO_TITLE=Completing the $(^NameDA) Uninstall Wizard +MUI_UNTEXT_FINISH_INFO_TEXT=$(^NameDA) has been uninstalled from your computer.\n\nClick Finish to close this wizard. +MUI_UNTEXT_FINISH_INFO_REBOOT=Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now? +MUI_UNTEXT_ABORTWARNING=Are you sure you want to quit $(^Name) Uninstall? diff --git a/mail/locales/en-US/installer/override.properties b/mail/locales/en-US/installer/override.properties new file mode 100755 index 000000000000..e785bf42b5f2 --- /dev/null +++ b/mail/locales/en-US/installer/override.properties @@ -0,0 +1,118 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# LOCALIZATION NOTE: + +# This file must be saved as UTF8 + +# Accesskeys are defined by prefixing the letter that is to be used for the +# accesskey with an ampersand (e.g. &). + +# Do not replace $(^NameDA) or $(^Name) with a custom string. + +# Do not change $(^NameDA) to $(^Name) or $(^Name) to $(^NameDA). NameDA allows +# Name to contain an ampersand (e.g. DA stands for double ampersand) and +# prevents the letter following the ampersand being used as an accesskey. + +# You can use \n to create a newline in the string but only when the string +# from en-US contains a \n. + +# Strings that require a space at the end should be enclosed with double +# quotes and the double quotes will be removed. To add quotes to the beginning +# and end of a string enclose the strin with an additional double quote +# (e.g. ""This will include quotes""). + +SetupCaption=$(^Name) Setup +UninstallCaption=$(^Name) Uninstall +BackBtn=< &Back +NextBtn=&Next > +AcceptBtn=I &accept the terms in the License Agreement +DontAcceptBtn=I &do not accept the terms in the License Agreement +InstallBtn=&Install +UninstallBtn=&Uninstall +CancelBtn=Cancel +CloseBtn=&Close +BrowseBtn=B&rowse... +ShowDetailsBtn=Show &details +ClickNext=Click Next to continue. +ClickInstall=Click Install to start the installation. +ClickUninstall=Click Uninstall to start the uninstallation. +Completed=Completed +LicenseTextRB=Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK +ComponentsText=Check the components you want to install and uncheck the components you don't want to install. $_CLICK +ComponentsSubText2_NoInstTypes=Select components to install: +DirText=Setup will install $(^NameDA) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK +DirSubText=Destination Folder +DirBrowseText=Select the folder to install $(^NameDA) in: +SpaceAvailable="Space available: " +SpaceRequired="Space required: " +UninstallingText=$(^NameDA) will be uninstalled from the following folder. $_CLICK +UninstallingSubText=Uninstalling from: +FileError=Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file. +FileError_NoIgnore=Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation. +CantWrite="Can't write: " +CopyFailed=Copy failed +CopyTo="Copy to " +Registering="Registering: " +Unregistering="Unregistering: " +SymbolNotFound="Could not find symbol: " +CouldNotLoad="Could not load: " +CreateFolder="Create folder: " +CreateShortcut="Create shortcut: " +CreatedUninstaller="Created uninstaller: " +Delete="Delete file: " +DeleteOnReboot="Delete on reboot: " +ErrorCreatingShortcut="Error creating shortcut: " +ErrorCreating="Error creating: " +ErrorDecompressing=Error decompressing data! Corrupted installer? +ErrorRegistering=Error registering DLL +ExecShell="ExecShell: " +Exec="Execute: " +Extract="Extract: " +ErrorWriting="Extract: error writing to file " +InvalidOpcode=Installer corrupted: invalid opcode +NoOLE="No OLE for: " +OutputFolder="Output folder: " +RemoveFolder="Remove folder: " +RenameOnReboot="Rename on reboot: " +Rename="Rename: " +Skipped="Skipped: " +CopyDetails=Copy Details To Clipboard +LogInstall=Log install process +Byte=B +Kilo=K +Mega=M +Giga=G diff --git a/other-licenses/branding/thunderbird/branding.nsi b/other-licenses/branding/thunderbird/branding.nsi new file mode 100755 index 000000000000..902e116fa88d --- /dev/null +++ b/other-licenses/branding/thunderbird/branding.nsi @@ -0,0 +1,50 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# NSIS defines for nightly builds. +# The release build branding.nsi is located in other-license/branding/firefox/ +!define BrandShortName "Thunderbird" +!define BrandFullName "Mozilla Thunderbird" +# BrandFullNameInternal is used for some registry and file system values that +# should not contain release that may be in the BrandFullName (e.g. Beta 1, etc.) +!define BrandFullNameInternal "Mozilla Thunderbird" +!define CompanyName "Mozilla" +!define URLInfoAbout "http://www.mozilla.org/" +!define URLUpdateInfo "http://www.mozilla.org/products/thunderbird/" +!define SurveyURL "https://survey.mozilla.com/1/Mozilla%20Thunderbird/${AppVersion}/${AB_CD}/exit.html" + +# Percentage of new "Standard" installs to enable talkback for +!define RandomPercent "100"