Fix compatibility with Mozilla 2.0 (upgrade comm-central build system using 9f4d6e54923d as the reference).
authorFlorian Quèze <florian@instantbird.org>
Thu, 29 Jul 2010 02:24:56 +0200
changeset 18070 ff8aeb781f8222405b506452f699583295868030
parent 18069 d041cc17586b11fa54a9d36ff9ec8516c8100cc9
child 18071 aebaafd71bc657afdc18cee846640e779703e8a8
push idunknown
push userunknown
push dateunknown
Fix compatibility with Mozilla 2.0 (upgrade comm-central build system using 9f4d6e54923d as the reference).
im/app/Makefile.in
im/app/mozilla.in
im/app/splash.rc
im/components/Makefile.in
im/components/autoLoginHandler.js
im/components/autoLoginHandler.manifest
im/components/logger.js
im/components/logger.manifest
im/components/profileMigrator.js
im/components/profileMigrator.manifest
im/components/smileProtocolHandler.js
im/components/smileProtocolHandler.manifest
im/confvars.sh
im/content/convZoom.js
im/content/convbrowser.xml
im/content/jar.mn
im/content/preferences/themes.js
im/installer/Makefile.in
im/installer/windows/Makefile.in
im/themes/messages/bubbles/Incoming/Content.html
purple/purplexpcom/src/facebookOverrideProtocol.js
purple/purplexpcom/src/gtalkOverrideProtocol.js
purple/purplexpcom/src/jsProtoHelper.jsm
purple/purplexpcom/src/jsTestProtocol.js
purple/purplexpcom/src/jsTestProtocol.manifest
purple/purplexpcom/src/overrideProtocols.manifest
--- a/im/app/Makefile.in
+++ b/im/app/Makefile.in
@@ -56,83 +56,85 @@ MAIL_APP_LICENSE_FILE = $(srcdir)/app-li
 DEFINES += \
   -DINSTANTBIRD_ICO=\"$(DIST)/branding/instantbird.ico\" \
   -DAB_CD=$(AB_CD) \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
   -DGRE_BUILDID=$(GRE_BUILDID) \
   -DAPP_LICENSE_BLOCK=$(MAIL_APP_LICENSE_FILE) \
    $(NULL)
 
-SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify -i 2>/dev/null | cut -f1 -d' ')
-ifdef SOURCE_STAMP
-DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
+MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
+ifdef MOZ_SOURCE_STAMP
+DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif
 
 SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
 ifdef SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
 
+ifdef MOZILLA_OFFICIAL
+DEFINES += -DOFFICIAL_BUILD=1
+endif
+
 DIRS		= profile
 
 GARBAGE += \
 	$(MAIL_LICENSE_HTML_FILE) \
 	$(FINAL_TARGET)/license.html \
 	$(NULL)
 
 PREF_JS_EXPORTS = \
     $(srcdir)/profile/all-instantbird.js \
     $(srcdir)/profile/channel-prefs.js \
     $(NULL)
 
 ifndef LIBXUL_SDK
 
-ifeq ($(USE_SHORT_LIBNAME), 1)
-PROGRAM = instantbird$(BIN_SUFFIX)
+ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
+PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
 else
-PROGRAM = instantbird-bin$(BIN_SUFFIX)
+PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
 endif
 
-REQUIRES = \
-	xpcom \
-	string \
-	xulapp \
-	$(NULL)
 
 CPPSRCS = nsMain.cpp
 else
 
-ifeq ($(USE_SHORT_LIBNAME), 1)
-STUBNAME = instantbird$(BIN_SUFFIX)
+ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
+STUBNAME = $(MOZ_APP_NAME)$(BIN_SUFFIX)
 else
-STUBNAME = instantbird-bin$(BIN_SUFFIX)
+STUBNAME = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
 endif
 endif # LIBXUL_SDK
 
 DIST_FILES = application.ini
 
 LOCAL_INCLUDES += -I$(MOZILLA_SRCDIR)/toolkit/xre
 
 ifdef BUILD_STATIC_LIBS
 ifdef _MSC_VER
-STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(DEPTH)/staticlib
+STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(MOZDEPTH)/staticlib
 else
-STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
+STATIC_COMPONENTS_LINKER_PATH = -L$(MOZDEPTH)/staticlib
 endif
-LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
+LIBS += $(MOZDEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
 else
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 LIBS += $(DIST)/bin/XUL
 else
 EXTRA_DSO_LIBS += xul
 endif
 endif
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 TK_LIBS := -framework Cocoa $(TK_LIBS)
+ifdef BUILD_STATIC_LIBS
+TK_LIBS := -framework SystemConfiguration $(TK_LIBS)
+endif
 endif
 
 ifdef MOZ_ENABLE_LIBXUL
 APP_XPCOM_LIBS = $(XPCOM_GLUE_LDOPTS)
 else
 MOZILLA_INTERNAL_API = 1
 APP_XPCOM_LIBS = $(XPCOM_LIBS)
 endif
@@ -150,24 +152,36 @@ LIBS += \
 ifneq (,$(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)))
 LIBS += $(XLDFLAGS) $(XLIBS)
 endif
 
 ifdef MOZ_JPROF
 LIBS += -ljprof
 endif
 
+ifdef MOZ_ENABLE_DBUS
+LIBS += $(MOZ_DBUS_GLIB_LIBS)
+endif
+
+ifndef MOZ_ENABLE_LIBXUL
+ifdef MOZ_NATIVE_HUNSPELL
+LIBS += $(MOZ_HUNSPELL_LIBS)
+endif
+endif
+
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
+# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
+# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/config.mk
 
 ifdef _MSC_VER
 # Always enter a Windows program through wmain, whether or not we're
 # a console application.
 ifdef WINCE
@@ -191,62 +205,86 @@ else
 include $(topsrcdir)/config/static-config.mk
 
 EXTRA_DEPS	+= \
 	$(STATIC_EXTRA_DEPS) \
 	$(NULL)
 DEFINES		+= $(STATIC_DEFINES)
 CPPSRCS		+= $(STATIC_CPPSRCS)
 EXTRA_DSO_LIBS	+= $(STATIC_EXTRA_DSO_LIBS)
-REQUIRES	+= $(STATIC_REQUIRES)
-EXTRA_LIBS	+= $(STATIC_EXTRA_LIBS)
+EXTRA_LIBS	+= \
+	$(STATIC_EXTRA_LIBS) \
+	$(MOZ_HARFBUZZ_LIBS) \
+	$(NULL)
+
+# OpenGL is required by (mozilla/)content/canvas: see (mozilla/)layout/build/Makefile.in.
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+OS_LIBS += -framework OpenGL
 endif
 
+endif # BUILD_STATIC_LIBS
+
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
 endif
 
 ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
 RCINCLUDE = splash.rc
 ifndef GNU_CC
 RCFLAGS += -DMOZ_INSTANTBIRD -I$(srcdir)
 else
 RCFLAGS += -DMOZ_INSTANTBIRD --include-dir $(srcdir)
 endif
 ifdef BUILD_STATIC_LIBS
 RCFLAGS += -DMOZ_STATIC_BUILD
+OS_LIBS += $(call EXPAND_LIBNAME,shlwapi)
 endif
 endif
 
 ifeq ($(OS_ARCH),BeOS)
 ifdef BUILD_STATIC_LIBS
 OS_LIBS += -ltracker -lgame
 endif
 endif
 
+ifeq ($(OS_ARCH),OS2)
+RESFILE=splashos2.res
+RCFLAGS += -DMOZ_INSTANTBIRD
+ifdef BUILD_STATIC_LIBS
+RCFLAGS += -DMOZ_STATIC_BUILD -i $(DIST)/include
+endif
+ifdef DEBUG
+RCFLAGS += -DDEBUG
+endif
+RCFLAGS += -DINSTANTBIRD_ICO=\"$(DIST)/branding/instantbird.ico\"
+endif
+
+LIBS += $(JEMALLOC_LIBS)
+
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZILLA_OFFICIAL
 DEFINES += -DMOZILLA_OFFICIAL
 endif
 
 ifdef BUILD_STATIC_LIBS
 include $(topsrcdir)/config/static-rules.mk
 
 DEFINES	+= -DIMPL_XREAPI
 endif
 
-APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
-DEFINES += -DAPP_VERSION="$(APP_VERSION)"
+APP_UA_NAME = $(shell echo $(MOZ_APP_DISPLAYNAME) | sed -e's/[^A-Za-z]//g')
+DEFINES += -DAPP_VERSION="$(MOZ_APP_VERSION)" -DAPP_UA_NAME="$(APP_UA_NAME)"
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 ifdef BUILD_STATIC_LIBS
-LIBS	+= -lcups -framework AddressBook
+LIBS	+= -lcups
 endif
+LIBS	+= -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 #
 # Control the default heap size.
 # This is the heap returned by GetProcessHeap().
 # As we use the CRT heap, the default size is too large and wastes VM.
 #
@@ -255,16 +293,22 @@ ifeq ($(OS_ARCH),WINNT)
 #
 # Set it to 256k.  See bug 127069.
 #
 ifndef GNU_CC
 LDFLAGS += /HEAP:0x40000
 endif
 endif
 
+ifeq ($(OS_ARCH),AIX)
+ifdef BUILD_STATIC_LIBS
+LDFLAGS += -bbigtoc
+endif
+endif
+
 $(PROGRAM): $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
 
 ifneq (,$(filter windows gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
 ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
 ICON_SUFFIX=.ico
 else
 ICON_SUFFIX=.png
 endif
@@ -301,32 +345,34 @@ libs:: $(addprefix $(DIST)/branding/,$(B
 	$(INSTALL) $^ $(DIST)/bin/chrome/icons/default
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 libs::
 	$(INSTALL) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
 endif
 
-ifneq (,$(filter-out WINNT WINCE Darwin,$(OS_ARCH)))
-instantbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
-	cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
-		-e "s|%MREDIR%|$(mredir)|" \
-		-e "s|%MOZILLA-BIN%|$(PROGRAM)|g" > $@
+ifneq (,$(filter-out OS2 WINNT WINCE Darwin,$(OS_ARCH)))
+$(MOZ_APP_NAME):: $(MOZILLA_DIR)/build/unix/mozilla.in $(GLOBAL_DEPS) $(DEPTH)/config/autoconf.mk
+	cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
+		-e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
 	chmod +x $@
 
-libs:: instantbird
+libs:: $(MOZ_APP_NAME)
 	$(INSTALL) $< $(DIST)/bin
 
+install:: $(MOZ_APP_NAME)
+	$(SYSINSTALL) $< $(DESTDIR)$(bindir)
+
 ifdef LIBXUL_SDK
 libs::
 	cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(STUBNAME)
 endif
 
-GARBAGE += instantbird
+GARBAGE +=  $(MOZ_APP_NAME)
 GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, all.js all-instantbird.js channel-prefs.js)
 endif
 
 ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
 ICON_FILES	= \
 		$(DIST)/branding/default16.png \
 		$(DIST)/branding/mozicon128.png \
 		$(DIST)/branding/mozicon50.xpm \
@@ -369,36 +415,39 @@ module.ver: module.ver.in $(DEPTH)/confi
 	sed 's/@''MODULE_PRODUCTVERSION@/'`echo $(INSTANTBIRD_VERSION) | sed 's/[a-z].*//; s/\./,/g; s/^\([0-9]*,[0-9]*\)$$/\1,0/; s/^\([0-9]*,[0-9]*,[0-9]*\)$$/\1,0/'`'/;s/@''MODULE_PRODUCTVERSION_STRING@/$(INSTANTBIRD_VERSION)/' $< > $@
 
 _RC_STRING += -SRCDIR .
 module.rc: module.ver
 
 GARBAGE += module.ver
 
 libs:: $(srcdir)/profile/prefs.js
-	$(INSTALL) $^ $(DIST)/bin/defaults/profile
+	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 
 AB := $(firstword $(subst -, ,$(AB_CD)))
 
+APP_NAME = $(MOZ_APP_DISPLAYNAME)
+
 ifdef MOZ_DEBUG
-APP_NAME = InstantbirdDebug
-else
-APP_NAME = Instantbird
+APP_NAME := $(APP_NAME)Debug
 endif
 
 libs:: $(PROGRAM)
 	mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
-	rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
+	rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
 	mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
-	rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
-	sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
-	sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
+	rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
+	sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
+	sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
 	rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS
 	rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
 	rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
 	cp -RL $(DIST)/branding/instantbird.icns $(DIST)/$(APP_NAME).app/Contents/Resources/instantbird.icns
 	printf APPLMOZM > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
 
 clean clobber::
 	rm -rf $(DIST)/$(APP_NAME).app
 endif
+
+# Note that anything you do to dist/ down here isn't going to make it into the
+# Mac build, since it's already been copied over to the .app, above.
deleted file mode 100644
--- a/im/app/mozilla.in
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/sh
-#
-# ***** 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 mozilla.org Code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# 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 *****
-
-## $Id: mozilla.in,v 1.8 2008/01/07 23:17:04 reed%reedloden.com Exp $
-##
-## Usage:
-##
-## $ mozilla [args]
-##
-## This script is meant to run the mozilla-bin binary from either
-## mozilla/xpfe/bootstrap or mozilla/dist/bin.
-##
-## The script will setup all the environment voodoo needed to make
-## the mozilla-bin binary to work.
-##
-
-#uncomment for debugging
-#set -x
-
-moz_libdir=%MOZAPPDIR%
-MRE_HOME=%MREDIR%
-
-# Use run-mozilla.sh in the current dir if it exists
-# If not, then start resolving symlinks until we find run-mozilla.sh
-found=0
-progname="$0"
-curdir=`dirname "$progname"`
-progbase=`basename "$progname"`
-run_moz="$curdir/run-mozilla.sh"
-if test -x "$run_moz"; then
-  dist_bin="$curdir"
-  found=1
-else
-  here=`/bin/pwd`
-  while [ -h "$progname" ]; do
-    bn=`basename "$progname"`
-    cd `dirname "$progname"`
-    progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
-    progbase=`basename "$progname"`
-    if [ ! -x "$progname" ]; then
-      break
-    fi
-    curdir=`dirname "$progname"`
-    run_moz="$curdir/run-mozilla.sh"
-    if [ -x "$run_moz" ]; then
-      cd "$curdir"
-      dist_bin=`pwd`
-      found=1
-      break
-    fi
-  done
-  cd "$here"
-fi
-if [ $found = 0 ]; then
-  # Check default compile-time libdir
-  if [ -x "$moz_libdir/run-mozilla.sh" ]; then
-    dist_bin="$moz_libdir"
-  else
-    echo "Cannot find mozilla runtime directory. Exiting."
-    exit 1
-  fi
-fi
-
-script_args=""
-debugging=0
-MOZILLA_BIN="${progbase}-bin"
-
-if [ "$OSTYPE" = "beos" ]; then
-  mimeset -F "$MOZILLA_BIN"
-fi
-
-pass_arg_count=0
-while [ $# -gt $pass_arg_count ]
-do
-  case "$1" in
-    -p | --pure | -pure)
-      MOZILLA_BIN="${MOZILLA_BIN}.pure"
-      shift
-      ;;
-    -g | --debug)
-      script_args="$script_args -g"
-      debugging=1
-      shift
-      ;;
-    -d | --debugger)
-      script_args="$script_args -d $2"
-      shift 2
-      ;;
-    *)
-      # Move the unrecognized argument to the end of the list.
-      arg="$1"
-      shift
-      set -- "$@" "$arg"
-      pass_arg_count=`expr $pass_arg_count + 1`
-      ;;
-  esac
-done
-
-export MRE_HOME
-
-if [ $debugging = 1 ]
-then
-  echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
-fi
-"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
-exitcode=$?
-
-exit $exitcode
-# EOF.
--- a/im/app/splash.rc
+++ b/im/app/splash.rc
@@ -48,19 +48,19 @@ 1 24 "instantbird.exe.manifest"
 
 // Program icon.
 IDI_APPICON  ICON  INSTANTBIRD_ICO
 IDI_APPLICATION ICON INSTANTBIRD_ICO
 
 STRINGTABLE DISCARDABLE
 BEGIN
 #ifdef DEBUG
-    IDS_STARTMENU_APPNAME,              "Instantbird Debug"
+    IDS_STARTMENU_APPNAME,              "@MOZ_APP_DISPLAYNAME@ Debug"
 #else
-    IDS_STARTMENU_APPNAME,              "Instantbird"
+    IDS_STARTMENU_APPNAME,              "@MOZ_APP_DISPLAYNAME@"
 #endif
 END
 
 #ifdef MOZ_STATIC_BUILD
 
 // XXX This code is copied from resource.h and widget.rc.  It's a work-around
 // for the limitation that only one resource file can be used in an .exe.  We
 // should develop a method, for static builds only, to combine multiple .rc
@@ -74,20 +74,20 @@ END
 #define IDC_ALIAS                       4105
 #define IDC_ZOOMIN                      4106
 #define IDC_ZOOMOUT                     4107
 #define IDC_COLRESIZE                   4108
 #define IDC_ROWRESIZE                   4109
 #define IDC_VERTICALTEXT                4110
 #define IDC_NONE                        4112
 
-IDC_GRAB                CURSOR  DISCARDABLE     "../../widget/src/build/res/grab.cur"
-IDC_GRABBING            CURSOR  DISCARDABLE     "../../widget/src/build/res/grabbing.cur"
-IDC_CELL                CURSOR  DISCARDABLE     "../../widget/src/build/res/cell.cur"
-IDC_COPY                CURSOR  DISCARDABLE     "../../widget/src/build/res/copy.cur"
-IDC_ALIAS               CURSOR  DISCARDABLE     "../../widget/src/build/res/aliasb.cur"
-IDC_ZOOMIN              CURSOR  DISCARDABLE     "../../widget/src/build/res/zoom_in.cur"
-IDC_ZOOMOUT             CURSOR  DISCARDABLE     "../../widget/src/build/res/zoom_out.cur"
-IDC_COLRESIZE           CURSOR  DISCARDABLE     "../../widget/src/build/res/col_resize.cur"
-IDC_ROWRESIZE           CURSOR  DISCARDABLE     "../../widget/src/build/res/row_resize.cur"
-IDC_VERTICALTEXT        CURSOR  DISCARDABLE     "../../widget/src/build/res/vertical_text.cur"
-IDC_NONE                CURSOR  DISCARDABLE     "../../widget/src/build/res/none.cur"
+IDC_GRAB                CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/grab.cur"
+IDC_GRABBING            CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/grabbing.cur"
+IDC_CELL                CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/cell.cur"
+IDC_COPY                CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/copy.cur"
+IDC_ALIAS               CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/aliasb.cur"
+IDC_ZOOMIN              CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/zoom_in.cur"
+IDC_ZOOMOUT             CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/zoom_out.cur"
+IDC_COLRESIZE           CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/col_resize.cur"
+IDC_ROWRESIZE           CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/row_resize.cur"
+IDC_VERTICALTEXT        CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/vertical_text.cur"
+IDC_NONE                CURSOR  DISCARDABLE     "../../mozilla/widget/src/build/res/none.cur"
 #endif
--- a/im/components/Makefile.in
+++ b/im/components/Makefile.in
@@ -41,18 +41,18 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= instantbird
 
 XPIDLSRCS	= ibILogger.idl
 
 EXTRA_COMPONENTS = \
-	smileProtocolHandler.js \
-	autoLoginHandler.js \
-	logger.js \
+	smileProtocolHandler.js smileProtocolHandler.manifest \
+	autoLoginHandler.js autoLoginHandler.manifest \
+	logger.js logger.manifest \
 	$(NULL)
 
 ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-EXTRA_COMPONENTS += profileMigrator.js
+EXTRA_COMPONENTS += profileMigrator.js profileMigrator.manifest
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/im/components/autoLoginHandler.js
+++ b/im/components/autoLoginHandler.js
@@ -63,15 +63,12 @@ autoLoginHandler.prototype = {
 
   // 3 tabs here because there is a misalignment with only 2
   helpInfo: "  -n                 Disables auto-login.\n" +
             "  -preferences       Open only the preferences window.",
 
   classDescription: "AutoLogin Handler",
   classID: Components.ID("{9e5d5160-d61d-4d57-ae0d-81bee4380269}"),
   contractID: "@instantbird.org/autologin-handler;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
-  _xpcom_categories: [{category: "command-line-handler", entry: "b-n"}]
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler])
 };
 
-function NSGetModule(aCompMgr, aFileSpec) {
-  return XPCOMUtils.generateModule([autoLoginHandler]);
-}
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([autoLoginHandler]);
new file mode 100644
--- /dev/null
+++ b/im/components/autoLoginHandler.manifest
@@ -0,0 +1,3 @@
+component {9e5d5160-d61d-4d57-ae0d-81bee4380269} autoLoginHandler.js
+contract @instantbird.org/autologin-handler;1 {9e5d5160-d61d-4d57-ae0d-81bee4380269}
+category command-line-handler b-n @instantbird.org/autologin-handler;1
--- a/im/components/logger.js
+++ b/im/components/logger.js
@@ -341,17 +341,17 @@ Logger.prototype = {
     this._enumerateLogs(aBuddy.account, aBuddy.normalizedName),
   getLogsForConversation: function logger_getLogsForConversation(aConversation)
     this._enumerateLogs(aConversation.account, aConversation.normalizedName),
   getSystemLogsForAccount: function logger_getSystemLogsForAccount(aAccount)
     this._enumerateLogs(aAccount, ".system"),
 
   observe: function logger_observe(aSubject, aTopic, aData) {
     switch (aTopic) {
-    case "app-startup":
+    case "profile-after-change":
       obs.addObserver(this, "final-ui-startup", false);
       break;
     case "final-ui-startup":
       obs.removeObserver(this, "final-ui-startup");
       ["new-conversation", "new-text",
        "conversation-closed", "conversation-left-chat",
        "account-connected", "account-disconnected",
        "buddy-signed-on", "buddy-signed-off",
@@ -402,15 +402,12 @@ Logger.prototype = {
       let nameText = (aSubject.buddyAlias || name) + " (" + name + ")";
       getLogForAccount(aSubject.account).logEvent(nameText + " is now " + status);
     }
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.ibILogger]),
   classDescription: "Logger",
   classID: Components.ID("{fb0dc220-2c7a-4216-9f19-6b8f3480eae9}"),
-  contractID: "@instantbird.org/logger;1",
-
-  // get this contractID registered for certain categories via XPCOMUtils
-  _xpcom_categories: [{ category: "app-startup", service: true}]
+  contractID: "@instantbird.org/logger;1"
 };
 
-function NSGetModule(aCompMgr, aFileSpec) XPCOMUtils.generateModule([Logger]);
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([Logger]);
new file mode 100644
--- /dev/null
+++ b/im/components/logger.manifest
@@ -0,0 +1,3 @@
+component {fb0dc220-2c7a-4216-9f19-6b8f3480eae9} logger.js
+contract @instantbird.org/logger;1 {fb0dc220-2c7a-4216-9f19-6b8f3480eae9}
+category profile-after-change Logger @instantbird.org/logger;1
--- a/im/components/profileMigrator.js
+++ b/im/components/profileMigrator.js
@@ -86,14 +86,13 @@ InstantbirdProfileMigrator.prototype = {
       } catch(e) {}
     }
   },
   migrate: function(aStartup) { },
 
   classDescription: "Instantbird Profile Migrator",
   classID: Components.ID("028ab7f2-5c83-4643-b846-09119c702faa"),
   contractID: "@mozilla.org/toolkit/profile-migrator;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIProfileMigrator]),
-}
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsIProfileMigrator])
+};
 
-function NSGetModule(aCompMgr, aFileSpec) {
-  return XPCOMUtils.generateModule([InstantbirdProfileMigrator]);
-}
+const NSGetFactory =
+  XPCOMUtils.generateNSGetFactory([InstantbirdProfileMigrator]);
new file mode 100644
--- /dev/null
+++ b/im/components/profileMigrator.manifest
@@ -0,0 +1,2 @@
+component {028ab7f2-5c83-4643-b846-09119c702faa} profileMigrator.js
+contract @mozilla.org/toolkit/profile-migrator;1 {028ab7f2-5c83-4643-b846-09119c702faa}
--- a/im/components/smileProtocolHandler.js
+++ b/im/components/smileProtocolHandler.js
@@ -68,11 +68,9 @@ smileProtocolHandler.prototype = {
   allowPort: function  SPH_allowPort(aPort, aScheme) false,
 
   classDescription: "Smile Protocol Handler",
   classID: Components.ID("{04e58eae-dfbc-4c9e-8130-6d9ef19cbff4}"),
   contractID: "@mozilla.org/network/protocol;1?name=smile",
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler])
 };
 
-function NSGetModule(aCompMgr, aFileSpec) {
-  return XPCOMUtils.generateModule([smileProtocolHandler]);
-}
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([smileProtocolHandler]);
new file mode 100644
--- /dev/null
+++ b/im/components/smileProtocolHandler.manifest
@@ -0,0 +1,2 @@
+component {04e58eae-dfbc-4c9e-8130-6d9ef19cbff4} smileProtocolHandler.js
+contract @mozilla.org/network/protocol;1?name=smile {04e58eae-dfbc-4c9e-8130-6d9ef19cbff4}
--- a/im/confvars.sh
+++ b/im/confvars.sh
@@ -33,17 +33,19 @@
 # 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 *****
 
 MOZ_APP_NAME=instantbird
-MOZ_APP_VERSION=`cat $topsrcdir/$MOZ_BUILD_APP/config/version.txt`
 MOZ_XUL_APP=1
 MOZ_ENABLE_LIBXUL=1
-MOZ_XULRUNNER=1
-MOZ_NO_XPCOM_OBSOLETE=1
 MOZ_UPDATER=1
-MOZ_PLACES=
-MOZ_MORK=
 MOZ_MATHML=
+
+MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt
+MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
+INSTANTBIRD_VERSION=$MOZ_APP_VERSION
+
+MOZ_BRANDING_DIRECTORY=instantbird/branding/nightly
+MOZ_OFFICIAL_BRANDING_DIRECTORY=instantbird/branding/release
--- a/im/content/convZoom.js
+++ b/im/content/convZoom.js
@@ -37,17 +37,17 @@
  *
  * ***** END LICENSE BLOCK *****/
 
 // This code was mostly copied from mozilla:
 // mozilla-central/source/browser/base/content/browser-textZoom.js
 var FullZoom = {
   prefName: "conversation.zoomLevel",
 
-  get _prefBranch FullZoom_get_prefBranch() {
+  get _prefBranch() {
     delete this._prefBranch;
     return this._prefBranch = Cc["@mozilla.org/preferences-service;1"]
                               .getService(Ci.nsIPrefBranch2);
   },
 
   init: function FullZoom_init() {
     window.addEventListener("DOMMouseScroll", FullZoom.handleMouseScrolled, false);
     window.addEventListener("unload", FullZoom.destroy, false);
--- a/im/content/convbrowser.xml
+++ b/im/content/convbrowser.xml
@@ -189,24 +189,16 @@
          ]]>
         </body>
       </method>
 
       <field name="mDestroyed">false</field>
 
       <constructor>
         <![CDATA[
-          try {
-            this.mDragDropHandler = Components.classes["@mozilla.org:/content/content-area-dragdrop;1"]
-                                              .createInstance(Components.interfaces.nsIDragDropHandler);
-            this.mDragDropHandler.hookupTo(this, null);
-          }
-          catch (e) {
-          }
-
           this.addEventListener("scroll", this.browserScroll, false);
           this.addEventListener("resize", this.browserResize, false);
           this.mPrefs.addObserver(this.magicCopyPref, this, false);
 
           if (!("cleanupImMarkup" in window))
             Components.utils.import("resource://app/modules/imContentSink.jsm");
           if (!("smileImMarkup" in window))
             Components.utils.import("resource://app/modules/imSmileys.jsm");
--- a/im/content/jar.mn
+++ b/im/content/jar.mn
@@ -1,10 +1,10 @@
 instantbird.jar:
-% content instantbird %instantbird/ xpcnativewrappers=yes
+% content instantbird %instantbird/
 	instantbird/aboutDialog.css
 *	instantbird/aboutDialog.xul
 	instantbird/account.js
 	instantbird/accounts.css
 	instantbird/accounts.js
 *	instantbird/accounts.xul
 	instantbird/accountWizard.js
 	instantbird/accountWizard.xul
@@ -72,20 +72,20 @@ instantbird.jar:
 	instantbird/preferences/tabs.js                 (preferences/tabs.js)
 	instantbird/preferences/messagestyle.js	        (preferences/messagestyle.js)
 	instantbird/preferences/smileys.js		(preferences/smileys.js)
 	instantbird/preferences/smiley.css		(preferences/smiley.css)
 	instantbird/preferences/smiley.xml		(preferences/smiley.xml)
 
 #ifdef DEBUG
 debug.jar:
-% content debug %debug/ xpcnativewrappers=yes
+% content debug %debug/
 % overlay chrome://instantbird/content/blist.xul chrome://debug/content/debug.xul
 % overlay chrome://instantbird/content/instantbird.xul chrome://debug/content/viewselectionsource.xul
 	debug/debug.js	(debug/debug.js)
 	debug/debug.xul	(debug/debug.xul)
 	debug/viewselectionsource.xul (debug/viewselectionsource.xul)
-% content fake %fake/ xpcnativewrappers=yes
+% content fake %fake/
 % overlay chrome://instantbird/content/blist.xul chrome://fake/content/fake.xul
 	fake/fake.js (debug/fake/fake.js)
 	fake/fake.xul (debug/fake/fake.xul)
 #endif
 
--- a/im/content/preferences/themes.js
+++ b/im/content/preferences/themes.js
@@ -30,25 +30,30 @@
  * 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 ***** */
 
+Components.utils.import("resource://gre/modules/AddonManager.jsm");  
+
 const PREF_EXTENSIONS_GETMOREMESSAGESTYLESURL = "extensions.getMoreMessageStylesURL";
 const PREF_EXTENSIONS_GETMOREEMOTICONSURL     = "extensions.getMoreEmoticonsURL";
 
 var gThemePane = {
   init: function (){
+    AddonManager.getAllAddons(function(aAddons) {
+      gThemePane.extensionList = aAddons;
+      previewObserver.load();
+      smileysPreview.load();
+    });
     gThemePane.setGetMore("Emoticons");
     gThemePane.setGetMore("MessageStyles");
-    previewObserver.load();
-    setTimeout(function() { smileysPreview.load(); }, 10);
   },
 
   /* Set the correct URL for the "Get more ..."-links */
   setGetMore: function (aType){
     var prefURL;
     switch(aType){
       case "Emoticons":
         prefURL = PREF_EXTENSIONS_GETMOREEMOTICONSURL;
@@ -76,17 +81,13 @@ var gThemePane = {
       }
       catch (e) { }
     }
     getMore.hidden = !showGetMore;
   },
 
   // Get extension list (slow) and cache it for use by messagestyle.js and smileys.js
   getExtensionList: function () {
-    if (!this.extensionList) {
-      this.extensionList =
-        Components.classes["@mozilla.org/extensions/manager;1"]
-                  .getService(Components.interfaces.nsIExtensionManager)
-                  .getItemList(Components.interfaces.nsIUpdateItem.TYPE_EXTENSION, {});
-    }
+    if (!this.extensionList)
+      throw "The add-ons list should be loaded by now...";
     return this.extensionList;
   }
 };
--- a/im/installer/Makefile.in
+++ b/im/installer/Makefile.in
@@ -132,22 +132,22 @@ endif
 ifdef MOZ_MEMORY
 DEFINES += -DMOZ_MEMORY=1
 endif
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = packages-static
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
-	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
+	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
 
 GARBAGE += $(MOZ_PKG_MANIFEST)
 endif
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 MOZ_PKG_MAC_DSSTORE=branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=branding/background.png
 MOZ_PKG_MAC_ICON=branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 
 # On mozilla-central, packager.mk uses core_abspath to redefine DIST
 # As the comm-central config.mk doesn't set it, do it ourselves instead
@@ -171,13 +171,20 @@ VSINSTALLDIR ?= $(error VSINSTALLDIR not
 UNPACKAGE = $(LIBXUL_DIST)/xulrunner*$(PKG_SUFFIX)
 
 installer: stage-package
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
 	cd $(DIST) && $(PYTHON) $(MOZILLA_SRCDIR)/build/package/wince/make_wince_cab.py -s "$(VSINSTALLDIR)/SmartDevices/SDK/SDKTools/cabwiz.exe" "$(MOZ_PKG_DIR)" "$(MOZ_APP_DISPLAYNAME)" "$(PKG_PATH)$(PKG_BASENAME).cab" && $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR)
 	@echo Installer $(PKG_PATH)$(PKG_BASENAME).cab created!
 endif
 
+package-compare:: $(MOZ_PKG_MANIFEST)
+ifdef MOZ_PKG_MANIFEST_P
+	cd $(DIST); find $(PKGCOMP_FIND_OPTS) $(FINDPATH) -type f | sort > bin-list.txt
+	grep "^$(BINPATH)" $(MOZ_PKG_MANIFEST) | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
+	-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
+	rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
+endif
 
 installer:: removed-files
 ifeq ($(OS_ARCH),WINNT)
 	$(MAKE) -C windows
 endif
--- a/im/installer/windows/Makefile.in
+++ b/im/installer/windows/Makefile.in
@@ -112,19 +112,19 @@ uninstaller::
 	for i in $(BRANDING_FILES_CONV); do \
 	  iconv -f UTF-8 -t UTF-16LE $(DIST)/branding/$$i | \
 	    cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
 	    $(CONFIG_DIR)/$$i; \
 	done
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	$(EXIT_ON_ERROR) \
 	for i in $(PP_LOCALIZED_FILES); do \
-	  $(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
+	  $(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
 	done
-	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
+	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
 	  $(srcdir)/nsis/defines.nsi.in | iconv -f UTF-8 -t UTF-16LE | \
 	  cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
 	  $(CONFIG_DIR)/defines.nsi
 	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
 	  $(MOZILLA_SRCDIR) $(call EXPAND_LOCALE_SRCDIR,instantbird/locales)/installer $(AB_CD) \
 	  $(CONFIG_DIR)
 
 $(CONFIG_DIR)/setup.exe::
@@ -138,23 +138,23 @@ uninstaller::
 	for i in $(BRANDING_FILES_CONV); do \
 	  iconv -f UTF-8 -t UTF-16LE $(DIST)/branding/$$i | \
 	    cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
 	    $(CONFIG_DIR)/$$i; \
 	done
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	$(EXIT_ON_ERROR) \
 	for i in $(PP_LOCALIZED_FILES); do \
-	  $(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
+	  $(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
 	done
 ifeq ($(CONFIG_DIR),instgen)
 	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
 	  ../removed-files > $(CONFIG_DIR)/removed-files.log
 endif
-	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
+	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) \
 	  $(srcdir)/nsis/defines.nsi.in | iconv -f UTF-8 -t UTF-16LE | \
 	  cat $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
 	  $(CONFIG_DIR)/defines.nsi
 	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
 	  $(MOZILLA_SRCDIR) $(call EXPAND_LOCALE_SRCDIR,instantbird/locales)/installer $(AB_CD) \
 	  $(CONFIG_DIR)
 
 include $(topsrcdir)/config/rules.mk
--- a/im/themes/messages/bubbles/Incoming/Content.html
+++ b/im/themes/messages/bubbles/Incoming/Content.html
@@ -1,7 +1,7 @@
-<div class="bubble %messageClasses%" style="opacity: 0;" senderColor="%senderColor%">
+<div class="bubble %messageClasses%" senderColor="%senderColor%">
 <div class="indicator">
 <p class="pseudo"><span>%sender%</span></p>
 <p class="%messageClasses%" title="%time%">%message%</p>
 <div id="insert"/>
 </div>
 </div>
--- a/purple/purplexpcom/src/facebookOverrideProtocol.js
+++ b/purple/purplexpcom/src/facebookOverrideProtocol.js
@@ -83,9 +83,9 @@ facebookProtocol.prototype = {
     }
     return new nsSimpleEnumerator(newSplits);
   },
 
   classID: Components.ID("{61bc3528-df53-4481-a61a-74c3a2e8c9fd}")
 };
 facebookProtocol.prototype.__proto__ = ForwardProtocolPrototype;
 
-var NSGetModule = XPCOMUtils.generateNSGetModule([facebookProtocol]);
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([facebookProtocol]);
--- a/purple/purplexpcom/src/gtalkOverrideProtocol.js
+++ b/purple/purplexpcom/src/gtalkOverrideProtocol.js
@@ -43,9 +43,9 @@ gtalkProtocol.prototype = {
   get normalizedName() "gtalk",
   get name() "Google Talk",
   get iconBaseURI() "chrome://prpl-gtalk/skin/",
   get baseId() "prpl-jabber",
   classID: Components.ID("{ad8a6454-2f5a-40c2-86ca-30062408125e}")
 };
 gtalkProtocol.prototype.__proto__ = ForwardProtocolPrototype;
 
-var NSGetModule = XPCOMUtils.generateNSGetModule([gtalkProtocol]);
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([gtalkProtocol]);
--- a/purple/purplexpcom/src/jsProtoHelper.jsm
+++ b/purple/purplexpcom/src/jsProtoHelper.jsm
@@ -354,18 +354,17 @@ const GenericProtocolPrototype = {
   getInterfaces: function(countRef) {
     var interfaces = [Ci.nsIClassInfo, Ci.nsISupports, Ci.purpleIProtocol];
     countRef.value = interfaces.length;
     return interfaces;
   },
   getHelperForLanguage: function(language) null,
   implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
   flags: 0,
-  QueryInterface: XPCOMUtils.generateQI([Ci.purpleIProtocol, Ci.nsIClassInfo]),
-  _xpcom_categories: [{category: "js-protocol-plugin"}],
+  QueryInterface: XPCOMUtils.generateQI([Ci.purpleIProtocol, Ci.nsIClassInfo])
 };
 
 // the baseId property should be set to the prpl id of the base protocol plugin
 // and the name getter is required.
 const ForwardProtocolPrototype = {
   get base() {
     if (!this.hasOwnProperty("_base")) {
       this._base =
--- a/purple/purplexpcom/src/jsTestProtocol.js
+++ b/purple/purplexpcom/src/jsTestProtocol.js
@@ -108,10 +108,10 @@ overrideTestProtocol.prototype = {
   get normalizedName() "override",
   get name() "Override Test",
   get iconBaseURI() "chrome://prpl-qq/skin/",
   get baseId() "prpl-null",
   classID: Components.ID("{88795348-8a4b-4018-890d-5314cb08ec4d}")
 };
 overrideTestProtocol.prototype.__proto__ = ForwardProtocolPrototype;
 
-var NSGetModule = XPCOMUtils.generateNSGetModule([jsTestProtocol,
-                                                  overrideTestProtocol]);
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([jsTestProtocol,
+                                                      overrideTestProtocol]);
new file mode 100644
--- /dev/null
+++ b/purple/purplexpcom/src/jsTestProtocol.manifest
@@ -0,0 +1,6 @@
+component {a0774c5a-4aea-458b-9fbc-8d3cbf1a4630} jsTestProtocol.js
+contract @instantbird.org/purple/jstest;1 {a0774c5a-4aea-458b-9fbc-8d3cbf1a4630}
+category js-protocol-plugin @instantbird.org/purple/jstest;1 @instantbird.org/purple/jstest;1
+component {88795348-8a4b-4018-890d-5314cb08ec4d} jsTestProtocol.js
+contract @instantbird.org/purple/override;1 {88795348-8a4b-4018-890d-5314cb08ec4d}
+category js-protocol-plugin @instantbird.org/purple/override;1 @instantbird.org/purple/override;1
new file mode 100644
--- /dev/null
+++ b/purple/purplexpcom/src/overrideProtocols.manifest
@@ -0,0 +1,6 @@
+component {ad8a6454-2f5a-40c2-86ca-30062408125e} gtalkOverrideProtocol.js
+contract @instantbird.org/purple/gtalk;1 {ad8a6454-2f5a-40c2-86ca-30062408125e}
+category js-protocol-plugin @instantbird.org/purple/gtalk;1 @instantbird.org/purple/gtalk;1
+component {61bc3528-df53-4481-a61a-74c3a2e8c9fd} facebookOverrideProtocol.js
+contract @instantbird.org/purple/facebook;1 {61bc3528-df53-4481-a61a-74c3a2e8c9fd}
+category js-protocol-plugin @instantbird.org/purple/facebook;1 @instantbird.org/purple/facebook;1