Compiling OpenOffice.org under MacOs and Linux (Part 1)

I’m currently working on a project with my school (the Ecole Centrale de Nantes) on OpenOffice.org (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 http://svn.services.openoffice.org/ooo/tags/DEV300_m41

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 :


wget http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
mv unowinreg.dll external/unowinreg/
wget http://eric.bachard.free.fr/mac/moz/seamonkey_Intel/MACOSXGCCIinc.zip
wget http://eric.bachard.free.fr/mac/moz/seamonkey_Intel/MACOSXGCCIlib.zip
wget http://eric.bachard.free.fr/mac/moz/seamonkey_Intel/MACOSXGCCIruntime.zip
mv MACOSXGCCIinc.zip moz/zipped/
mv MACOSXGCCIlib.zip moz/zipped/
mv MACOSXGCCIruntime.zip moz/zipped/
wget http://eric.bachard.free.fr/mac/aquavcl/patches/
aqua_November_2008/26th_november/moz2seamonkey_connectivity.diff
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:
/usr/X11/bin:/usr/X11R6/bin:/opt/local/bin:/opt/local/sbin:/sw/bin:
/sw/sbin:/Library/Frameworks/Python.framework/Versions/Current/bin"

./configure --without-nas --disable-cups --disable-pasf --disable-crashdump
--disable-freetype --disable-fontconfig --with-epm=internal
--with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home
--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

./bootstrap

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++"
export MACOSX_DEPLOYMENT_TARGET=10.5
export VERBOSE=TRUE

source MacOSXX86Env.Set.sh

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 OpenOffice.org 3, the one you built.


cd instsetoo_native/
nice -10 perl ../solenv/bin/build.pl --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.

Publicités

Laisser un commentaire

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

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. 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 )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

%d blogueurs aiment cette page :