McCoy:Building

From MozillaWiki
Jump to navigation Jump to search

McCoy includes binary components required for working with cryptographic keys. This means that it is unfortunately necessary to build as part of a regular Mozilla build process. The rest of this page assumes you have an understanding of how to build a Mozilla app, preferable XULRunner.

Initial Requirements

You must checkout a copy of the Mozilla trunk with XULRunner (MOZ_CO_PROJECTS=xulrunner), see getting the source code by CVS for further information.

You must also checkout a copy of McCoy into mozilla/mccoy. To do this from the mozilla directory type:

 svn co http://svn.mozilla.org/projects/mccoy/trunk mccoy

Or change trunk to the appropriate branch/tag you need.

Regular Builds

For most platforms McCoy can be built using a single mozconfig:

 ac_add_options --disable-tests
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
 
 mk_add_options MOZ_BUILD_PROJECTS="xulrunner mccoy"
 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mccoybase
 
 ac_add_app_options xulrunner --enable-application=xulrunner
 ac_add_app_options xulrunner --disable-installer
 
 ac_add_app_options mccoy --enable-application=mccoy
 ac_add_app_options mccoy --with-libxul-sdk=../xulrunner/dist

This will build in two passes. The first being a full build of XULRunner in mccoybase/xulrunner, the second building McCoy into mccoybase/mccoy. Note that despite the argument name, a full build of XULRunner is required, the libxul-sdk is not enough on its own.

To package up McCoy change to mccoybase/mccoy and type make package

OSX Universal Builds

This isn't actually working right yet, changes to the build system are necessary

If you wish to build an OSX universal build then the process is complicated slightly. You need two mozconfig files, one to compile a universal XULRunner and the second to compile the universal McCoy:

For XULRunner:

 . $topsrcdir/build/macosx/universal/mozconfig
 ac_add_app_options ppc --enable-prebinding
 
 ac_add_options --disable-tests
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
 
 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mccoybase/xulrunner
 
 ac_add_options --enable-application=xulrunner
 ac_add_options --disable-installer

For McCoy:

 . $topsrcdir/build/macosx/universal/mozconfig
 ac_add_app_options ppc --enable-prebinding
 
 ac_add_options --disable-tests
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
 
 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mccoybase/mccoy
 
 ac_add_options --enable-application=mccoy
 ac_add_app_options ppc  --with-libxul-sdk=../../xulrunner/ppc/dist
 ac_add_app_options i386 --with-libxul-sdk=../../xulrunner/i386/dist

Packaging should be possible by running make package in mccoybase/mccoy/ppc