Compiling under MacOs and Linux (Part 1)

I’m currently working on a project with my school (the Ecole Centrale de Nantes) on (OOo) improving the way TabletPC can be used in a Linux environment.
This project began with some modifications on OpenOffice Impress, so that now you can annotate a slide during the slideshow and change the stroke width and color (you can see the TabletPC Blog(French) for more information).

Therefor we needed to checkout, compile and test OOo and this article is about helping others to get into OOo code and improve it. I personally testes it under two plateforms, MacOs and Linux Ubuntu and i will give you some tips we found with friends of mine.

Some things are pretty common for both plateforms, first of all you need to checkout the svn of OOo for source codes, it’s better to use tags rather than the trunk, because it’s more stable. For example this is the most recent tag : DEV300_m41 so we’ll do :

svn checkout

The svn is quite large, so it will obviously take some time, so relax and prepare the next steps. Different plateforms have different needs :

  • MacOs :

This script was created by Jonathan Winandy and Pierre-jean Parot, with the help of Eric Bachard and as a user i’m presenting this to you.
So you’ll need as a first thing XCode(gives a c++ compiler to MacOs) and Fink(gives apt-get), and when these two things are installed you can start by getting the wget command typing into the terminal :

sudo apt-get install wget

then you go into the directory where you did put OpenOffice’s checkout and use these lines, one by one :

mv unowinreg.dll external/unowinreg/
mv moz/zipped/
mv moz/zipped/
mv moz/zipped/
patch --dry-run -p0 < moz2seamonkey_connectivity.diff
patch -p0 < moz2seamonkey_connectivity.diff

This is using the website of Eric Bachard, leading the port of OOo under MacOs, and once you’ve got these lines working, you can start to configure your build once and for all:

export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:

./configure --without-nas --disable-cups --disable-pasf --disable-crashdump
--disable-freetype --disable-fontconfig --with-epm=internal
--disable-gtk --disable-gnome-vfs --with-system-curl --with-stlport=no
--disable-build-mozilla --disable-mediawiki
--enable-werror --enable-presenter-screen --with-use-shell=bash


Then if everything went okay, you just need to add some variables with export and add the build tools to your terminal :

export CC="ccache gcc"
export CXX="ccache g++"


Then at last you can start to build, with these lines, after this first build is finished (about 8-9 hours on MacBook Air), you will find a dmg to mount 3, the one you built.

cd instsetoo_native/
nice -10 perl ../solenv/bin/ --all -P4

You can rebuild it after modification, using the last steps again, and it will take much less time, about 22 minutes on a MacBook Air. I will give in a future article a better way to deal with tests on OOo with MacOs, stay tuned.

Votre commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:


Vous commentez à l’aide de votre compte Déconnexion /  Changer )

Image Twitter

Vous commentez à l’aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l’aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

%d blogueurs aiment cette page :