User:Florian/building purplexpcom for Thunderbird

From MozillaWiki
Jump to: navigation, search

The add-on Additional Chat Protocols for Thunderbird is made from parts of Instantbird.

For Thunderbird 24 and below

The source code is the purple/ folder of the Instantbird repository.

To build for all OSes, I pushed that code to the Thunderbird try server.

The changesets I pushed to the try server can be downloaded here. They contain:

  • the purple/ folder of the Instantbird repository (any revision that contains the patch from Instantbird bug 1665 and its follow ups should work). Let's say I used the purple/ folder of revision 29d2a239ba24.
  • a patch to adapt the comm-central build system to build purple/ (Thunderbird 15, 16 and 17 versions)
  • some very simple changes to purple/ to disable the jabber and qq libpurple protocol plugins (jabber because Thunderbird already ships by default a generic XMPP plugin and I don't want to override it, and qq because it doesn't work correctly at the moment, even for Instantbird), and to disable purple/'s xpcshell tests (I didn't request tests on the try server runs, so just commenting out the lines related to the test in the purple/ Makefile was easier than adding a line in mail/'s xpcshell.ini file to make the harness find them). (patch available here)
  • when building for Thunderbird 16 and 17, the same patch has some additional fixes to keep purplexpcom building against newer gecko versions. For Thunderbird 16 I had deal with the removal of nsILocalFile, and for Thunderbird 17 I also had to deal with the nsnull->nullptr change and the removal of the NS_OUTPARAM and NS_SCRIPTABLE macros (this patch has been posted to Instantbird bug 1606 and reviewed there. (Patch available here for the Thunderbird 16 and Thunderbird 17 versions)

I included in the add-on localized strings for the top 4 locales of Thunderbird (en-US, de, fr, ja) from http://hg.instantbird.org/l10n/libpurple/

For Thunderbird 38

  • Pull comm-aurora revision 37d096d3bf18.
  • A set of patches were applied to comm-aurora to (the full set is available [here http://ftp.instantbird.com/instantbird/thunderbird-addon/2.10.9/changesets/]):
    1. Pull purplexpcom rev 18e35a43ad30 (libpurple + an XPCOM wrapper used in Instantbird) to mozilla/extensions/purple
    2. Patch configure.in of Thunderbird to set up for building purplexpcom, these changes were ported from Instantbird's configure.in
    3. Change the build configuration to include the purple folder
    4. Package the resulting purplexpcom library (i.e. dylib, dll or so) and don't package libxul (to ensure the upload from try finishes)
    5. There are a few minor changes made to the purplexpcom library (disabling of certain features):
      • Bonjour on Linux: the builders don't have the proper development headers (libavahi)
      • SIPE on all operating systems: Thunderbird does not include the necessary NSS bits
      • Jabber: Thunderbird includes the JavaScript XMPP code

And that's it! Grab the purplexpcom binary component (e.g. purplexpcom.so, purplexpcom.dll, or purplexpcom.dylib) and overwrite the previous version in the extension.

A try run was used to build the components in as similar an environment as possible to the Thunderbird releases, results were uploaded to FTP.

The final extension is available for download.