Building XULRunner with Python

  • Revision slug: Building_XULRunner_with_Python
  • Revision title: Building XULRunner with Python
  • Revision id: 168280
  • Created:
  • Creator: SteveLee
  • Is current revision? No
  • Comment

Revision Content

Work In progress

Building XULRunner with Python

XULRunner with Python promises to be a great platform for accessibility projects and both Jambu Alternative Input and the IAccessible2 test tool are using it. With the Python extension enabled XULRunner provides python script access to the DOM and XPCOM in addition to the usual Java Script. The work builds on Mark Hammond's pyXPCOM work from Active State. Of particular interested is access to MSAA and IAccessible2 via the python comtypes package.

Currently (Mar 07) Python is not enabled by default so a custom build of Mozilla is needed. This page provides instructions in the hope of eliminating much trial and error. You should also read the the Mozilla build documentation and the pyXPCOM docs ???

Development Machine Setup

First a word of warning that ZoneAlarm has exhibited memory leaks that cause build machines to crash with rather spurious errors. You may want to uninstall it you suspect this to be a problem. You will also want to disable any virus scanner resident monitoring as that will slow builds.

Ensure your PC is running XP with all the latest Service Packs and patches applied.

Microsoft C++ compiler is necessary and whilst the current free version is Visual Studio 8 Express (MSVC8) you will almost certainly want to use Visual Studio .NET 2003 (MSVC71). The issue is that XULRunner must be built with the same version of C as Python and with Python 2.5 that is MSVC71. The issue is that both must use the same version of the C runtime library MSVCRT?.DLL or crashes will ensue. The alternative is to build Python with MSVC8 as well, but that may be problematic. You should apply any Service Packs and for MSVC71 and SP1 is available The platform SDK is also need and for MSVC71 that is .NET Framework SDK 1.1

Next you need the Mozilla Build system and the latest is easy to use. Just grab ???? and unzip it. While you are at it install the included Python with the .MSI. It doesn't need to be installed for the build but will be useful later when installing Python packages which look for it in the Windows registry.

There is a batch file start-msvc71.bat which is used to launch the build console (MSys from the MinGw project ). You could modify it to set the CVSROOT environment variable if you are mainly working with Mozilla. ???

set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

Building

Deploying

Revision Source

<p><i>Work In progress</i>
</p><p>
</p>
<h2 name="Building_XULRunner_with_Python"> Building XULRunner with Python </h2>
<p>XULRunner with Python promises to be a great platform for accessibility projects and both <a class="external" href="http://www.oatsoft.org/trac/jambu/wiki">Jambu Alternative Input</a> and the IAccessible2 test tool are using it. With the Python extension enabled XULRunner provides python script access to the DOM and XPCOM in addition to the usual Java Script. The work builds on Mark Hammond's pyXPCOM work from Active State. Of particular interested is access to MSAA and IAccessible2 via the python comtypes package.
</p><p>Currently (Mar 07) Python is not enabled by default so a custom build of Mozilla is needed. This page provides instructions in the hope of eliminating much trial and error. You should also read the the Mozilla build documentation and the pyXPCOM docs ???
</p>
<h3 name="Development_Machine_Setup"> Development Machine Setup </h3>
<p>First a word of warning that ZoneAlarm has exhibited memory leaks that cause build machines to crash with rather spurious errors. You may want to uninstall it you suspect this to be a problem. You will also want to disable any virus scanner resident monitoring as that will slow builds.
</p><p>Ensure your PC is running XP with all the latest Service Packs and patches applied.
</p><p>Microsoft C++ compiler is necessary and whilst the current free version is Visual Studio 8 Express (MSVC8) you will almost certainly want to use Visual Studio .NET 2003 (MSVC71). The issue is that XULRunner must be built with the same version of C as Python and with Python 2.5 that is MSVC71. The issue is that both must use the same version of the C runtime library MSVCRT?.DLL or crashes will ensue. The alternative is to build Python with MSVC8 as well, but that may be problematic. You should apply any Service Packs and for MSVC71 and SP1 is available The platform SDK is also need and for MSVC71 that is .NET Framework SDK 1.1
</p><p>Next you need the Mozilla Build system and the latest is easy to use. Just grab ???? and unzip it. While you are at it install the included Python with the .MSI. It doesn't need to be installed for the build but will be useful later when installing Python packages which look for it in the Windows registry.
</p><p>There is a batch file <b>start-msvc71.bat</b> which is used to launch the build console (MSys from the MinGw project ). You could modify it to set the CVSROOT environment variable if you are mainly working with Mozilla. ???
</p>
<blockquote>set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
</blockquote>
<h3 name="Building"> Building </h3>
<h3 name="Deploying"> Deploying </h3>
Revert to this revision