From f12a489c5a16e6ac2616c2dd550179688372119e Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Mon, 26 Jun 2006 20:54:03 +0000 Subject: [PATCH] Bug 342407 - Freshen installer to new NSIS code - calendar only. r=lilmatt --- calendar/EULA.txt | 16 + calendar/installer/Makefile.in | 8 +- calendar/installer/windows/Makefile.in | 63 +- .../installer/windows/nsis/defines.nsi.in | 20 + calendar/installer/windows/nsis/installer.nsi | 1215 +++++++++++++++++ calendar/installer/windows/packages-static | 244 ++-- .../locales/en-US/installer/custom.properties | 77 ++ .../locales/en-US/installer/mui.properties | 96 ++ .../en-US/installer/override.properties | 118 ++ other-licenses/branding/sunbird/Makefile.in | 3 + 10 files changed, 1723 insertions(+), 137 deletions(-) create mode 100644 calendar/EULA.txt create mode 100644 calendar/installer/windows/nsis/defines.nsi.in create mode 100644 calendar/installer/windows/nsis/installer.nsi create mode 100644 calendar/locales/en-US/installer/custom.properties create mode 100644 calendar/locales/en-US/installer/mui.properties create mode 100644 calendar/locales/en-US/installer/override.properties diff --git a/calendar/EULA.txt b/calendar/EULA.txt new file mode 100644 index 00000000000..14e852e3cea --- /dev/null +++ b/calendar/EULA.txt @@ -0,0 +1,16 @@ +FOR TRANSLATIONS OF THIS LICENSE INTO SELECTED LANGUAGES, PLEASE VISIT WWW.MOZILLA.ORG/LICENSING. + +MOZILLA SUNBIRD CALENDAR APPLICATION END-USER SOFTWARE LICENSE AGREEMENT +Version 1.0 + +A SOURCE CODE VERSION OF CERTAIN SUNBIRD CALENDAR APPLICATION FUNCTIONALITY THAT YOU MAY USE, MODIFY AND DISTRIBUTE IS AVAILABLE TO YOU FREE-OF-CHARGE FROM WWW.MOZILLA.ORG UNDER THE MOZILLA PUBLIC LICENSE and other open source software licenses. +The accompanying executable code version of Mozilla Sunbird and related documentation (the "Product") is made available to you under the terms of this MOZILLA SUNBIRD CALENDAR APPLICATION END-USER SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT"). BY CLICKING THE "ACCEPT" BUTTON, OR BY INSTALLING OR USING THE MOZILLA SUNBIRD CALENDAR APPLICATION, YOU ARE CONSENTING TO BE BOUND BY THE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT CLICK THE "ACCEPT" BUTTON, AND DO NOT INSTALL OR USE ANY PART OF THE MOZILLA SUNBIRD CALENDAR APPLICATION. +DURING THE MOZILLA SUNBIRD CALENDAR APPLICATION PROCESS, AND AT LATER TIMES, YOU MAY BE GIVEN THE OPTION OF INSTALLING ADDITIONAL COMPONENTS FROM THIRD-PARTY SOFTWARE PROVIDERS. THE INSTALLATION AND USE OF THOSE THIRD-PARTY COMPONENTS MAY BE GOVERNED BY ADDITIONAL LICENSE AGREEMENTS. +1. LICENSE GRANT. The Mozilla Corporation grants you a non-exclusive license to use the executable code version of the Product. This Agreement will also govern any software upgrades provided by Mozilla that replace and/or supplement the original Product, unless such upgrades are accompanied by a separate license, in which case the terms of that license will govern. +2. TERMINATION. If you breach this Agreement your right to use the Product will terminate immediately and without notice, but all provisions of this Agreement except the License Grant (Paragraph 1) will survive termination and continue in effect. Upon termination, you must destroy all copies of the Product. +3. PROPRIETARY RIGHTS. Portions of the Product are available in source code form under the terms of the Mozilla Public License and other open source licenses (collectively, "Open Source Licenses") at http://www.mozilla.org. Nothing in this Agreement will be construed to limit any rights granted under the Open Source Licenses. Subject to the foregoing, Mozilla, for itself and on behalf of its licensors, hereby reserves all intellectual property rights in the Product, except for the rights expressly granted in this Agreement. You may not remove or alter any trademark, logo, copyright or other proprietary notice in or on the Product. This license does not grant you any right to use the trademarks, service marks or logos of Mozilla or its licensors. +4. DISCLAIMER OF WARRANTY. THE PRODUCT IS PROVIDED "AS IS" WITH ALL FAULTS. TO THE EXTENT PERMITTED BY LAW, MOZILLA AND MOZILLA'S DISTRIBUTORS, LICENSORS HEREBY DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES THAT THE PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE AND NON-INFRINGING. YOU BEAR ENTIRE RISK AS TO SELECTING THE PRODUCT FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT. THIS LIMITATION WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. +5. LIMITATION OF LIABILITY. EXCEPT AS REQUIRED BY LAW, MOZILLA AND ITS DISTRIBUTORS, DIRECTORS, LICENSORS, CONTRIBUTORS AND AGENTS (COLLECTIVELY, THE "MOZILLA GROUP") WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN ANY WAY RELATING TO THIS AGREEMENT OR THE USE OF OR INABILITY TO USE THE PRODUCT, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOST PROFITS, LOSS OF DATA, AND COMPUTER FAILURE OR MALFUNCTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH SUCH CLAIM IS BASED. THE MOZILLA GROUP'S COLLECTIVE LIABILITY UNDER THIS AGREEMENT WILL NOT EXCEED THE GREATER OF $500 (FIVE HUNDRED DOLLARS) AND THE FEES PAID BY YOU UNDER THIS LICENSE (IF ANY). SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. +6. EXPORT CONTROLS. This license is subject to all applicable export restrictions. You must comply with all export and import laws and restrictions and regulations of any United States or foreign agency or authority relating to the Product and its use. +7. U.S. GOVERNMENT END-USERS. The Product is a "commercial item," as that term is defined in 48 C.F.R. 2.101, consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995) and 48 C.F.R. 227.7202 (June 1995). Consistent with 48 C.F.R. 12.212, 48 C.F.R. 27.405(b)(2) (June 1998) and 48 C.F.R. 227.7202, all U.S. Government End Users acquire the Product with only those rights as set forth herein. +8. MISCELLANEOUS. (a) This Agreement constitutes the entire agreement between Mozilla and you concerning the subject matter hereof, and it may only be modified by a written amendment signed by an authorized executive of Mozilla. (b) Except to the extent applicable law, if any, provides otherwise, this Agreement will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions. (c) This Agreement will not be governed by the United Nations Convention on Contracts for the International Sale of Goods. (d) If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the parties' original intent, and the remaining portions will remain in full force and effect. (e) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. (f) Except as required by law, the controlling language of this Agreement is English. (g) You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms; the Mozilla Corporation may assign its rights under this Agreement without condition. (h) This Agreement will be binding upon and will inure to the benefit of the parties, their successors and permitted assigns. diff --git a/calendar/installer/Makefile.in b/calendar/installer/Makefile.in index 5abb34064f8..546e598a60e 100644 --- a/calendar/installer/Makefile.in +++ b/calendar/installer/Makefile.in @@ -78,11 +78,9 @@ MOZ_NONLOCALIZED_PKG_LIST = \ MOZ_LOCALIZED_PKG_LIST = $(AB_CD) MOZ_OPTIONAL_PKG_LIST = \ -# adt = Additional Developer Tools (inspector) -# adt \ -# XXX Re-enable when we enable talkback for Sunbird -# talkback \ - $(NULL) + adt \ + talkback \ + $(NULL) DEFINES += -DAB_CD=$(AB_CD) diff --git a/calendar/installer/windows/Makefile.in b/calendar/installer/windows/Makefile.in index 025cfa6f326..dbbc5a49c03 100644 --- a/calendar/installer/windows/Makefile.in +++ b/calendar/installer/windows/Makefile.in @@ -42,24 +42,65 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -CONFIG_DIR=$(shell cd $(srcdir) && pwd) -OBJ_DIR=$(shell cd $(DEPTH) && pwd) -SRC_DIR=$(shell cd $(topsrcdir) && pwd) +include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk -installer: sunbird.manifest - cd $(topsrcdir)/toolkit/mozapps/installer && perl build_static.pl -config "$(CONFIG_DIR)" -srcDir "$(SRC_DIR)" -objDir "$(OBJ_DIR)" +CONFIG_DIR := $(shell pwd)/instgen +SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/sunbird/7zSD.sfx + +PP_LOCALIZED_FILES = \ + packages-static \ + installer.cfg \ + $(NULL) + +INSTALLER_FILES = \ + app.tag \ + nsis/installer.nsi \ + $(NULL) + +BRANDING_FILES = \ + wizHeader.bmp \ + wizHeaderRTL.bmp \ + wizWatermark.bmp \ + $(NULL) + +DEFINES += \ + -DAB_CD=$(AB_CD) \ + -DPKG_BASENAME=$(PKG_BASENAME) \ + -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \ + -DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \ + -DMOZILLA_VERSION=${MOZILLA_VERSION} \ + $(NULL) + +include $(topsrcdir)/config/config.mk +include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk + +installer:: + $(MAKE) -C .. installer-stage + $(RM) -rf instgen && mkdir instgen + $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) instgen + $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) instgen + cp $(topsrcdir)/calendar/EULA.txt instgen/license.txt + $(EXIT_ON_ERROR) \ + for i in $(PP_LOCALIZED_FILES); do \ + $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > instgen/$$i; \ + done + $(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \ + ../removed-files > instgen/removed-files.log + $(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \ + $(srcdir)/nsis/defines.nsi.in > instgen/defines.nsi + $(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \ + $(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,calendar/locales)/installer $(AB_CD) \ + $(WIN_INSTALLER_CHARSET) include $(topsrcdir)/config/rules.mk +include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk export:: ifndef MOZ_USE_OFFICIAL_BRANDING $(NSINSTALL) -D $(DIST)/branding cp $(srcdir)/Header.bmp $(DIST)/branding/Header.bmp cp $(srcdir)/Watermrk.bmp $(DIST)/branding/Watermrk.bmp + cp $(srcdir)/wizHeader.bmp $(DIST)/branding/wizHeader.bmp + cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp + cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp endif - -# Create a manifest for use with codesighs, by stripping "bin/" off of the -# beginning of lines in the packages file. - -sunbird.manifest: packages-static - grep "^bin\\\\" $^ | sed "s?^bin\\\\??" > $@ diff --git a/calendar/installer/windows/nsis/defines.nsi.in b/calendar/installer/windows/nsis/defines.nsi.in new file mode 100644 index 00000000000..47b026f8916 --- /dev/null +++ b/calendar/installer/windows/nsis/defines.nsi.in @@ -0,0 +1,20 @@ +#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 BrandShortName "Sunbird" +!define BrandFullName "Mozilla Sunbird" +!define FileMainEXE "sunbird.exe" +!define CompanyName "Mozilla" +!define URLInfoAbout "http://www.mozilla.org/" +!define URLUpdateInfo "http://www.mozilla.org/projects/calendar/sunbird/" +!define NO_UNINSTALL_SURVEY +!define WindowClass "SunbirdMessageWindow" +!define SurveyURL "https://survey.mozilla.com/1/Mozilla%20Sunbird/${AppVersion}%20(${AB_CD})/exit.html" +# Percentage of new "Standard" installs to enable talkback for +# Change me for release builds! +!define RandomPercent "100" diff --git a/calendar/installer/windows/nsis/installer.nsi b/calendar/installer/windows/nsis/installer.nsi new file mode 100644 index 00000000000..d7ddd96ba78 --- /dev/null +++ b/calendar/installer/windows/nsis/installer.nsi @@ -0,0 +1,1215 @@ +# ***** 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 ***** + +# 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 Locate +!insertmacro StrFilter +!insertmacro TextCompare +!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 defines.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 WriteRegStrHKCR +!insertmacro CreateRegKey +!insertmacro un.GetSecondInstallPath + +Name "${BrandFullName}" +OutFile "setup.exe" +InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullName} (${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\${BrandFullName}\${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 $INSTDIR\${FileMainEXE} +!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 + Exec "$\"$TmpVal$\" $\"${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" + ${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 + ${TextCompare} "$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 + 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 + ${TextCompare} "$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" + + ${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" + + ${LogHeader} "Installing Localized Files" + StrCpy $R0 "$EXEDIR\localized" + StrCpy $R1 "$INSTDIR" + Call DoCopyFiles + + ${If} $InstallType != 4 + Call install_talkback + ${If} ${FileExists} "$INSTDIR\extensions\inspector@mozilla.org" + Call install_inspector + ${EndIf} + ${EndIf} + + ${LogHeader} "Adding Additional Files" + ; Only for Firefox and only if they don't already exist + ; Check if QuickTime is installed and copy the contents of its plugins + ; directory into the app's plugins directory. Previously only the + ; nsIQTScriptablePlugin.xpt files was copied which is not enough to enable + ; QuickTime as a plugin. + ClearErrors + ReadRegStr $R0 HKLM "Software\Apple Computer, Inc.\QuickTime" "InstallDir" + ${Unless} ${Errors} + Push $R0 + ${GetPathFromRegStr} + Pop $R0 + ${Unless} ${Errors} + GetFullPathName $R0 "$R0\Plugins" + ${Unless} ${Errors} + ${LogHeader} "Copying QuickTime Plugin Files" + ${LogMsg} "Source Directory: $R0\Plugins" + StrCpy $R1 "$INSTDIR\plugins" + Call DoCopyFiles + ${EndUnless} + ${EndUnless} + ${EndUnless} + ClearErrors + + ; 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\${BrandFullName}\${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\${BrandFullName}\${AppVersion} (${AB_CD})\Uninstall" + ${WriteRegStr2} $TmpVal "$0" "Uninstall Log Folder" "$INSTDIR\uninstall" 0 + ${WriteRegStr2} $TmpVal "$0" "Description" "${BrandFullName} (${AppVersion})" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullName}\${AppVersion} (${AB_CD})" + ${WriteRegStr2} $TmpVal "$0" "" "${AppVersion} (${AB_CD})" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullName} ${AppVersion}\bin" + ${WriteRegStr2} $TmpVal "$0" "PathToExe" "$INSTDIR\${FileMainEXE}" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullName} ${AppVersion}\extensions" + ${WriteRegStr2} $TmpVal "$0" "Components" "$INSTDIR\components" 0 + ${WriteRegStr2} $TmpVal "$0" "Plugins" "$INSTDIR\plugins" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullName} ${AppVersion}" + ${WriteRegStr2} $TmpVal "$0" "GeckoVer" "${GREVersion}" 0 + + StrCpy $0 "Software\Mozilla\${BrandFullName}" + ${WriteRegStr2} $TmpVal "$0" "" "${GREVersion}" 0 + ${WriteRegStr2} $TmpVal "$0" "CurrentVersion" "${AppVersion} (${AB_CD})" 0 + + ; XXXrstrong - there are several values that will be overwritten by and + ; overwrite other installs of the same application. + + ; XXXrstrong - the Calendar registry key unlike the one for StartMenuInternet + ; can be the full brand name and version but software update could change this + ; value and the uninstaller wouldn't find it then. To fix this the uninstaller + ; would need to enumerate the keys under Calendar, find any keys that point to + ; this install location, and remove that key on uninstall. This is also needed + ; to support side by side installs of different versions. +; ${StrFilter} "${FileMainEXE}" "+" "" "" $R9 +; StrCpy $0 "Software\Clients\Calendar\$R9" +; ${WriteRegStr2} $TmpVal "$0" "" "${BrandFullName}" 0 + +; StrCpy $0 "Software\Clients\Calendar\$R9" +; ${WriteRegStr2} $TmpVal "$0" "" "${BrandFullName}" 0 + +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\.ics" +; ${WriteRegStr2} $TmpVal "$0" "" "icsfile" 0 +; ${WriteRegStr2} $TmpVal "$0" "Content Type" "text/calendar" 0 + +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\.vcs" +; ${WriteRegStr2} $TmpVal "$0" "" "vcsfile" 0 + + ; XXXrstrong - iCalendar File needs localization? +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\icsfile" +; ${WriteRegStr2} $TmpVal "$0" "" "iCalendar File" 0 +; ${WriteRegDWORD2} $TmpVal "$0" "EditFlags" 0 0 + + ; XXXrstrong - no default icon for icsfile? +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\icsfile\DefaultIcon" +; ${WriteRegStr2} $TmpVal "$0" "" "path to default icon,0" 0 + + ; XXXrstrong - does Sunbird have a command line handler for opening files? +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\icsfile\shell\open\command" +; ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 + + ; XXXrstrong - vCalendar File needs localization? +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\vcsfile" +; ${WriteRegStr2} $TmpVal "$0" "" "vCalendar File" 0 +; ${WriteRegDWORD2} $TmpVal "$0" "EditFlags" 0 0 + + ; XXXrstrong - no default icon for vcsfile? +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\vcsfile\DefaultIcon" +; ${WriteRegStr2} $TmpVal "$0" "" "path to default icon,0" 0 + + ; XXXrstrong - does Sunbird have a command line handler for opening files? +; StrCpy $0 "Software\Clients\Calendar\$R9\Protocols\vcsfile\shell\open\command" +; ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 + +; StrCpy $0 "Software\Clients\Calendar\$R9\shell\open\command" +; ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 + + ; These need special handling on uninstall since they may be overwritten by + ; an install into a different location. + StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}" + ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0 + ${WriteRegStr2} $TmpVal "$0" "Path" "$INSTDIR" 0 + + ; Write the uninstall registry keys + StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullName} (${AppVersion})" + StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" $\"/ua ${AppVersion} (${AB_CD})$\"" + + ${WriteRegStr2} $TmpVal "$0" "Comments" "${BrandFullName}" 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\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ${LogUninstall} "File: $SMPROGRAMS\$StartMenuDir\${BrandFullName}.lnk" + CreateShortCut "$SMPROGRAMS\$StartMenuDir\${BrandFullName} ($(SAFE_MODE)).lnk" "$INSTDIR\${FileMainEXE}" "-safe-mode" "$INSTDIR\${FileMainEXE}" 0 + ${LogUninstall} "File: $SMPROGRAMS\$StartMenuDir\${BrandFullName} ($(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 "Developer Tools" Section2 + Call install_inspector +SectionEnd + +Section /o "Quality Feedback Agent" Section3 + Call install_talkback +SectionEnd + +Function install_inspector + ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org" + ${RemoveDir} "$INSTDIR\extensions\extensions\inspector@mozilla.org" + ClearErrors + ${LogHeader} "Installing Developer Tools" + StrCpy $R0 "$EXEDIR\optional\extensions\inspector@mozilla.org" + StrCpy $R1 "$INSTDIR\extensions\inspector@mozilla.org" + Call DoCopyFiles + ${EndIf} +FunctionEnd + +Function install_talkback + StrCpy $R0 "$EXEDIR\optional\extensions\talkback@mozilla.org" + ${If} ${FileExists} "$R0" + 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" + ; 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} + + ; XXXrstrong - the Calendar registry key unlike the one for StartMenuInternet + ; can be the full brand name and version but software update could change this + ; value and the uninstaller wouldn't find it then. To fix this the uninstaller + ; would need to enumerate the keys under Calendar, find any keys that point to + ; this install location, and remove that key on uninstall. This is also needed + ; to support side by side installs of different versions. +; StrCpy $0 "Software\Clients\Calendar\${FileMainEXE}\shell\open\command" +; ReadRegStr $1 HKLM "$0" "" +; Push $1 +; ${GetPathFromRegStr} +; Pop $R0 +; Push $R0 +; ${GetParentDir} +; Pop $R1 + + ; Only remove the registry key under Clients if it refers to this install + ; location. The Clients registry key is independent of the default application + ; 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 the app 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\Calendar\${FileMainEXE}" +; ${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" + !else + StrCpy $TmpVal "SOFTWARE\Microsoft\IE Setup\Setup" + ClearErrors + ReadRegStr $0 HKLM $TmpVal "Path" + ${If} ${Errors} + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" + ${Else} + ExpandEnvStrings $0 "$0" ; this value will usually contain %programfiles% + ${If} $0 != "\" + StrCpy $0 "$0\" + ${EndIf} + StrCpy $0 "$0\iexplore.exe" + ClearErrors + GetFullPathName $TmpVal $0 + ${If} ${Errors} + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" + ${EndIf} + ${EndIf} + !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 + ${Locate} "$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" + ${If} ${FileExists} "$R1" + RmDir "$R1" + ${EndIf} + ${If} ${Errors} + ${OrIf} $R2 != "INSTDIR" + GoTo end + ${Else} + GoTo loop + ${EndIf} + ${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 + ${TextCompare} "$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 ${Section2} $(DEV_TOOLS_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 .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 + + ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org" + ; Set the section size for DOMi. + ${GetSize} "$EXEDIR\optional\extensions\inspector@mozilla.org" "/S=0K" $0 $8 $9 + SectionSetSize 1 $0 + ${Else} + ; Hide DOMi in the components page if it isn't available. + SectionSetText 1 "" + ${EndIf} + + ; 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? +FunctionEnd + diff --git a/calendar/installer/windows/packages-static b/calendar/installer/windows/packages-static index 3b429368be6..b819714b498 100644 --- a/calendar/installer/windows/packages-static +++ b/calendar/installer/windows/packages-static @@ -8,29 +8,20 @@ ; ; file comment ; +#filter substitution + bin/.autoreg -[langenus] -; en-US -bin\chrome\en-US.jar -bin\chrome\en-win.jar +[@AB_CD@] +bin\chrome\@AB_CD@.jar +bin\chrome\@AB_CD@.manifest +bin\chrome\calendar-@AB_CD@.jar +bin\chrome\calendar-@AB_CD@.manifest +bin\defaults\pref\sunbird-l10n.js +bin\defaults\profile\prefs.js +bin\defaults\profile\chrome\* +bin\updater.ini -[regus] -; US -; If you add a new directory you must explicitly call addDirectory in regus.jst -bin\chrome\US.jar -bin\defaults\profile\US\* -bin\searchplugins\* - -[deflenus] -; Default files for US -bin\defaults\profile\bookmarks.html -bin\defaults\profile\localstore.rdf -;!4sunbird bin\defaults\profile\prefs.js -bin\defaults\profile\search.rdf -bin\defaults\profile\mimeTypes.rdf -;!4sunbird bin\defaults\profile\extensions\{641d8d09-7dda-4850-8228-ac0ab65e2ac9}\install.rdf -bin\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}\install.rdf [xpcom] bin\js3250.dll @@ -42,128 +33,135 @@ bin\xpistub.dll bin\nspr4.dll bin\components\xpinstal.dll bin\components\jar50.dll -bin\xpcom_compat.dll +bin\Microsoft.VC80.CRT.manifest +bin\msvcm80.dll +bin\msvcp80.dll +bin\msvcr80.dll -[browser] +[calendar] ; [Base Calendar Files] bin\sunbird.exe -bin\plugins\npnul32.dll bin\res\cmessage.txt bin\xpicleanup.exe bin\LICENSE bin\README.txt ; [Components] -bin\components\alerts.xpt -bin\components\accessibility.xpt +bin\AccessibleMarshal.dll bin\components\accessibility-msaa.xpt +bin\components\accessibility.xpt +bin\components\alerts.xpt bin\components\appshell.xpt bin\components\appstartup.xpt bin\components\autocomplete.xpt bin\components\autoconfig.xpt bin\components\bookmarks.xpt -bin\components\calendar.xpt +bin\components\calbase.xpt +bin\components\calbaseinternal.xpt bin\components\caps.xpt bin\components\chardet.xpt -;!4sunbird bin\components\chrome.xpt +bin\components\chrome.xpt bin\components\commandhandler.xpt +bin\components\commandlines.xpt +bin\components\composer.xpt bin\components\content_base.xpt bin\components\content_html.xpt bin\components\content_htmldoc.xpt bin\components\content_xmldoc.xpt bin\components\content_xslt.xpt -;!4sunbird bin\components\cookie.xpt -;!4sunbird bin\components\directory.xpt +bin\components\content_xtf.xpt +bin\components\cookie.xpt bin\components\docshell_base.xpt bin\components\dom.xpt bin\components\dom_base.xpt +bin\components\dom_canvas.xpt bin\components\dom_core.xpt bin\components\dom_css.xpt bin\components\dom_events.xpt bin\components\dom_html.xpt +bin\components\dom_loadsave.xpt bin\components\dom_range.xpt +bin\components\dom_sidebar.xpt +bin\components\dom_storage.xpt bin\components\dom_stylesheets.xpt +bin\components\dom_svg.xpt bin\components\dom_traversal.xpt bin\components\dom_views.xpt bin\components\dom_xbl.xpt bin\components\dom_xpath.xpt bin\components\dom_xul.xpt -;!4sunbird bin\components\downloads.xpt +bin\components\downloads.xpt bin\components\editor.xpt bin\components\embed_base.xpt +bin\components\extensions.xpt bin\components\exthandler.xpt +bin\components\fastfind.xpt +bin\components\feeds.xpt bin\components\find.xpt bin\components\gfx.xpt -bin\components\helperAppDlg.xpt +bin\components\gksvgrenderer.xpt bin\components\history.xpt bin\components\htmlparser.xpt -bin\components\imglib2.xpt bin\components\imgicon.xpt +bin\components\imglib2.xpt +bin\components\inspector.xpt bin\components\intl.xpt bin\components\intlcmpt.xpt bin\components\jar.xpt bin\components\jsconsole.xpt -bin\components\jsconsole-clhandler.js -;!4sunbird bin\components\jsd3250.dll -;!4sunbird bin\components\jsdservice.xpt +bin\components\jsd3250.dll +bin\components\jsdservice.xpt bin\components\layout_base.xpt bin\components\layout_printing.xpt bin\components\layout_xul.xpt bin\components\layout_xul_tree.xpt bin\components\locale.xpt bin\components\lwbrk.xpt -;!4sunbird bin\components\migration.xpt bin\components\mimetype.xpt -bin\components\mozbrwsr.xpt bin\components\mozfind.xpt bin\components\necko.xpt +bin\components\necko_about.xpt bin\components\necko_cache.xpt bin\components\necko_cookie.xpt -bin\components\necko_strconv.xpt -bin\components\necko_about.xpt bin\components\necko_dns.xpt bin\components\necko_file.xpt bin\components\necko_ftp.xpt bin\components\necko_http.xpt bin\components\necko_res.xpt +bin\components\necko_socket.xpt +bin\components\necko_strconv.xpt bin\components\necko_viewsource.xpt -;!4sunbird bin\components\oji.xpt bin\components\passwordmgr.xpt -bin\components\plugin.xpt +bin\components\pipboot.xpt +bin\components\pipnss.xpt +bin\components\pippki.xpt bin\components\pref.xpt bin\components\prefetch.xpt -bin\components\prefmigr.xpt bin\components\profile.xpt bin\components\progressDlg.xpt bin\components\proxyObject.xpt bin\components\rdf.xpt -;!4sunbird bin\components\related.xpt -;!4sunbird bin\components\satchel.xpt -;!4sunbird bin\components\search.xpt +bin\components\satchel.xpt +bin\components\saxparser.xpt bin\components\shistory.xpt -bin\components\sidebar.xpt -;!4sunbird bin\components\signonviewer.xpt -bin\components\txtsvc.xpt +bin\components\storage.xpt +bin\components\toolkitprofile.xpt bin\components\txmgr.xpt -;!4sunbird bin\components\typeaheadfind.xpt -;!4sunbird bin\components\ucnative.xpt +bin\components\txtsvc.xpt bin\components\uconv.xpt bin\components\unicharutil.xpt +bin\components\update.xpt bin\components\uriloader.xpt -;!4sunbird bin\components\util.xpt -;!4sunbird bin\components\wallet.xpt -;!4sunbird bin\components\walleteditor.xpt -;!4sunbird bin\components\walletpreview.xpt bin\components\webBrowser_core.xpt bin\components\webbrowserpersist.xpt +bin\components\webdav.xpt bin\components\webshell_idls.xpt -;!4sunbird bin\components\websrvcs.xpt +bin\components\websrvcs.xpt bin\components\widget.xpt bin\components\windowds.xpt bin\components\windowwatcher.xpt -;!4sunbird bin\components\shellservice.xpt -;!4sunbird bin\components\xml-rpc.xpt -;!4sunbird bin\components\xmlextras.xpt +bin\components\winhooks.xpt +bin\components\xpautocomplete.xpt bin\components\xpcom_base.xpt bin\components\xpcom_components.xpt bin\components\xpcom_ds.xpt @@ -171,48 +169,65 @@ bin\components\xpcom_io.xpt bin\components\xpcom_thread.xpt bin\components\xpcom_xpti.xpt bin\components\xpconnect.xpt +bin\components\xpinstal.dll bin\components\xpinstall.xpt +bin\components\xulapp.xpt bin\components\xuldoc.xpt bin\components\xultmpl.xpt ; JavaScript components +bin\components\nsDefaultCLH.js bin\components\nsSetDefaultBrowser.js bin\components\nsCloseAllWindows.js +bin\components\nsInterfaceInfoToIDL.js +bin\components\nsPostUpdateWin.js +bin\components\nsProgressDialog.js +bin\components\nsSetDefaultMail.js +bin\components\nsUnsetDefaultMail.js +bin\components\nsUpdateService.js ;!4sunbird bin\components\nsDictionary.js bin\components\nsHelperAppDlg.js bin\components\nsProxyAutoConfig.js ;!4sunbird bin\components\nsSidebar.js ;!4sunbird bin\components\nsXmlRpcClient.js bin\components\nsExtensionManager.js -bin\components\nsBackgroundUpdateService.js bin\components\extensions.xpt bin\components\update.xpt bin\components\calendarService.js bin\components\calAlarmMonitor.js +bin\components\calAttendee.js +bin\components\calAlarmService.js +bin\components\calAttachment.js +bin\components\calCalendarManager.js +bin\components\calCompositeCalendar.js +bin\components\calDateTimeFormatter.js +bin\components\calDavCalendar.js +bin\components\calEvent.js +bin\components\calHtmlExport.js +bin\components\calICSCalendar.js +bin\components\calIcsImportExport.js +bin\components\calImportExportModule.js +bin\components\calItemBase.js +bin\components\calItemModule.js +bin\components\calListFormatter.js +bin\components\calMemoryCalendar.js +bin\components\calOutlookCSVImportExport.js +bin\components\calRecurrenceInfo.js +bin\components\calStorageCalendar.js +bin\components\calTodo.js +bin\components\calWeekTitleService.js +bin\components\FeedProcessor.js +bin\components\pluginGlue.js -; [Browser Chrome Files] +; [Calendar Chrome Files] bin\chrome\calendar.jar +bin\chrome\calendar.manifest bin\chrome\classic.jar +bin\chrome\classic.manifest +bin\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}\install.rdf bin\chrome\comm.jar +bin\chrome\comm.manifest bin\chrome\toolkit.jar - -bin\chrome\calendar-ca-AD.jar -bin\chrome\calendar-de-AT.jar -bin\chrome\calendar-hu-HU.jar -bin\chrome\calendar-lt-LT.jar -bin\chrome\calendar-pt-BR.jar -bin\chrome\calendar-sv-SE.jar -bin\chrome\calendar-cs-CZ.jar -bin\chrome\calendar-es-ES.jar -bin\chrome\calendar-it-IT.jar -bin\chrome\calendar-nl-NL.jar -bin\chrome\calendar-sk-SK.jar -bin\chrome\calendar-tr-TR.jar -bin\chrome\calendar-cy-GB.jar -bin\chrome\calendar-fr-FR.jar -bin\chrome\calendar-ja-JP.jar -bin\chrome\calendar-pl-PL.jar -bin\chrome\calendar-sl-SI.jar -bin\chrome\calendar-wen-DE.jar +bin\chrome\toolkit.manifest ; [Default Preferences] ; All the pref files must be part of base to prevent migration bugs @@ -225,36 +240,17 @@ bin\defaults\autoconfig\prefcalls.js ; [Layout Engine Resources] ; Style Sheets, Graphics and other Resources used by the layout engine. +bin\res\hiddenWindow.html bin\res\ua.css bin\res\html.css bin\res\quirk.css bin\res\forms.css -;!4sunbird bin\res\EditorOverride.css -;!4sunbird bin\res\table-add-column-after-active.gif -;!4sunbird bin\res\table-add-column-after-hover.gif -;!4sunbird bin\res\table-add-column-after.gif -;!4sunbird bin\res\table-add-column-before-active.gif -;!4sunbird bin\res\table-add-column-before-hover.gif -;!4sunbird bin\res\table-add-column-before.gif -;!4sunbird bin\res\table-add-row-after-active.gif -;!4sunbird bin\res\table-add-row-after-hover.gif -;!4sunbird bin\res\table-add-row-after.gif -;!4sunbird bin\res\table-add-row-before-active.gif -;!4sunbird bin\res\table-add-row-before-hover.gif -;!4sunbird bin\res\table-add-row-before.gif -;!4sunbird bin\res\table-remove-column-active.gif -;!4sunbird bin\res\table-remove-column-hover.gif -;!4sunbird bin\res\table-remove-column.gif -;!4sunbird bin\res\table-remove-row-active.gif -;!4sunbird bin\res\table-remove-row-hover.gif -;!4sunbird bin\res\table-remove-row.gif -;!4sunbird bin\res\arrowd.gif -;!4sunbird bin\res\grabber.gif + +bin\res\arrowd.gif bin\res\viewsource.css -bin\res\mathml.css bin\res\arrow.gif -;!4sunbird bin\res\loading-image.gif -;!4sunbird bin\res\broken-image.gif +bin\res\loading-image.gif +bin\res\broken-image.gif bin\res\fonts\* bin\res\dtd\* bin\res\html\* @@ -280,25 +276,31 @@ bin\freebl3.dll bin\ssl3.dll bin\chrome\pipnss.jar bin\chrome\pippki.jar +bin\chrome\pippki.manifest + +; [Updater] +; +bin\updater.exe ; [Additional Developer Tools] [adt] -; [Document Inspector] -;!4sunbird bin\components\inspector-cmdline.js -;!4sunbird bin\components\inspector.dll -;!4sunbird bin\components\inspector.xpt -;!4sunbird bin\chrome\inspector.jar -;!4sunbird bin\defaults\pref\inspector.js -;!4sunbird bin\res\inspector\viewer-registry.rdf -;!4sunbird bin\res\inspector\search-registry.rdf -; [Venkman JavaScript Debugger] -; bin\components\venkman-service.js -; bin\chrome\venkman.jar - -; [Help] -[help] -bin\chrome\help.jar - -; [Additional Browsing Enhancements] -[abe] +bin\extensions\inspector@mozilla.org\install.rdf +bin\extensions\inspector@mozilla.org\components\inspector-cmdline.js +bin\extensions\inspector@mozilla.org\chrome.manifest +bin\extensions\inspector@mozilla.org\chrome\inspector.jar +bin\extensions\inspector@mozilla.org\defaults\preferences\inspector.js +bin\extensions\inspector@mozilla.org\chrome\icons\default\winInspectorMain.ico +[talkback] +bin\README.txt,bin\readme.txt +bin\extensions\talkback@mozilla.org\install.rdf +bin\extensions\talkback@mozilla.org\chrome.manifest +bin\extensions\talkback@mozilla.org\components\qfaservices.dll +bin\extensions\talkback@mozilla.org\components\qfaservices.xpt +bin\extensions\talkback@mozilla.org\components\BrandRes.dll +bin\extensions\talkback@mozilla.org\components\fullsoft.dll +bin\extensions\talkback@mozilla.org\components\master.ini +bin\extensions\talkback@mozilla.org\components\talkback-l10n.ini +bin\extensions\talkback@mozilla.org\components\talkback.cnt +bin\extensions\talkback@mozilla.org\components\talkback.exe +bin\extensions\talkback@mozilla.org\components\talkback.hlp diff --git a/calendar/locales/en-US/installer/custom.properties b/calendar/locales/en-US/installer/custom.properties new file mode 100644 index 00000000000..aca5d7a74c9 --- /dev/null +++ b/calendar/locales/en-US/installer/custom.properties @@ -0,0 +1,77 @@ +# ***** 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 ${BrandFullName} 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 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 ${BrandFullName} now +WARN_APP_RUNNING_INSTALL=${BrandFullName} must be closed to proceed with the installation.\n\nClick "OK" to exit ${BrandFullName} automatically and continue. +WARN_APP_RUNNING_UNINSTALL=${BrandFullName} must be closed to proceed with the uninstall.\n\nClick "OK" to exit ${BrandFullName} 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 + +# _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/calendar/locales/en-US/installer/mui.properties b/calendar/locales/en-US/installer/mui.properties new file mode 100644 index 00000000000..6cec468fc07 --- /dev/null +++ b/calendar/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/calendar/locales/en-US/installer/override.properties b/calendar/locales/en-US/installer/override.properties new file mode 100644 index 00000000000..7d09ead353a --- /dev/null +++ b/calendar/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 strong enclose the add and additional double quote to the +# beginning and end of the string (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/sunbird/Makefile.in b/other-licenses/branding/sunbird/Makefile.in index a14ea229f68..2aac1b7a28e 100644 --- a/other-licenses/branding/sunbird/Makefile.in +++ b/other-licenses/branding/sunbird/Makefile.in @@ -45,6 +45,9 @@ ifeq ($(OS_ARCH),WINNT) cp $(srcdir)/sunbird.ico $(DIST)/branding/app.ico cp $(srcdir)/Header.bmp $(DIST)/branding/Header.bmp cp $(srcdir)/Watermrk.bmp $(DIST)/branding/Watermrk.bmp + cp $(srcdir)/wizHeader.bmp $(DIST)/branding/wizHeader.bmp + cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp + cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/Watermark.bmp endif ifeq ($(OS_ARCH),OS2) cp $(srcdir)/sunbird-os2.ico $(DIST)/branding/sunbird.ico