mozdev.org

plXPCOM   

Home | Todo List | Mailing List | Installation | Source Code | Bugs | Documentation

Installation

Supported versions :

If you have successfully installed and used perl/xpcom on other versions/platform, let us know

Building on mozilla 1.2.1: If you wish to build plxpcom on mozilla 1.2.1 (or other old versions), to need to change a line in perl/src/plPerlXPCOM_Base.h, here is the patch :

--- src/plPerlXPCOM_Base.h      28 Oct 2004 16:13:55 -0000      1.3
+++ src/plPerlXPCOM_Base.h      14 Mar 2005 10:45:26 -0000
@@ -49,7 +49,7 @@
 #include "nsIInterfaceInfo.h"
 #include "nsIComponentLoader.h"
 #include "plIPerlComponentHelper.h"
-#include "xpcom_obsolete/nsIRegistry.h"
+#include "nsIRegistry.h"
 #include "nsIModule.h"
 #include "nsIFactory.h"
 #include "nsIFile.h"

Important Note: This installation is Unix centric only. You will need a mozilla source tree, and a working perl installation to build this package.

Step 1: Grab the source from CVS (see the Source page for details. Once you've checked out the source, place the perl directory in the mozilla/extensions directory of your mozilla source tree.

This is the quick-n-dirty instructions for getting up and running with Perl XPCOM in mozilla on Unix. For detailed instructions, see the README file that is included with the package.

Add the following Makefiles into allmakefiles.sh in the top mozilla dir:

  extensions/perl/Makefile
  extensions/perl/XPCOM/Makefile
  extensions/perl/src/Makefile
  extensions/perl/tests/Makefile
  extensions/perl/public/Makefile

The allmakefiles.sh file has a section for handling extensions, I recommend searching for the string 'p3p' in the file and it will take you where you need to go. You should find yourself at a switch statement block with the names of the directories in the extensions dir as the cases. Add the perl extension like this:

  # This section of code is already in allmakefiles.sh. I put it 
  # here to give you a reference for navigating this file.
  p3p ) MAKEFILES_extensions="$MAKEFILES_extensions
      extensions/p3p/Makefile
      extensions/p3p/public/Makefile
      extensions/p3p/resources/Makefile
      extensions/p3p/resources/content/Makefile
      extensions/p3p/resources/locale/Makefile
      extensions/p3p/resources/locale/en-US/Makefile
      extensions/p3p/resources/skin/Makefile
      extensions/p3p/src/Makefile
      " ;;
  # This is the part you need to add. Cut and paste this into 
  # allmakefiles.sh
  perl ) MAKEFILES_extensions="$MAKEFILES_extensions
      extensions/perl/Makefile
      extensions/perl/XPCOM/Makefile
      extensions/perl/src/Makefile
      extensions/perl/tests/Makefile
      extensions/perl/public/Makefile
      " ;;
  # Done

Add the following line to the .mozconfig file in the top mozilla dir:

  ac_add_options --enable-extensions=default,perl

Build mozilla, depending of your installation (you have to use GNU make):

  make -f client.mk build
or
  ./configure && make

Important: When done building go into the extensions/perl/XPCOM directory and as root run:

  make module_install

This installs the perl module parts of the package into your perl installation.

You should now have a perl enabled mozilla. If you made a debug build you should also have an nsTestPerlSample test in the dist/bin directory of your tree.

If you have trouble...

Please read the INSTALL and README files included with the package thoroughly to avoid running into trouble. If you have a linux/unix box with perl, gcc, and a mozilla source tree, you should have no trouble if you follow the directions.

If you followed the directions and still have problems, please fire off an email to the mailing list at plxpcom AT mozdev dot org. Please include any error messages encountered, the platform/distro you are using, compiler version, perl version, and whether you are using a mozilla snapshot or cvs. Thanks.

The plxpcom project can be contacted through the mailing list or the member list.
Copyright © 2000-2017. All rights reserved. Terms of Use & Privacy Policy.