Difference between revisions of "Documentation/Building Guide/Building on MacOSX"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 3: Line 3:
 
This Document tries to wrap-up the Buildprocess for OpenOffice on MacOS X using the native Windowing Toolkit of the Platform Aqua. The main goal is to get the demonstration programs 'svdem' build. They act as fairly good starting point to further endaevours, since they are used to test the capabilities of the underlying VCL Layer.
 
This Document tries to wrap-up the Buildprocess for OpenOffice on MacOS X using the native Windowing Toolkit of the Platform Aqua. The main goal is to get the demonstration programs 'svdem' build. They act as fairly good starting point to further endaevours, since they are used to test the capabilities of the underlying VCL Layer.
  
The base for this Document is the Description of the X11 Build thanksworthy provided by Eric Hoch in this Document: [[MacOSXBuildInstructions]]
+
The base for this Document is the Description of the X11 Build thanksworthy provided by Eric Hoch in this Document: [[MacOSXBuildInstructions]]. Please check this document for prerequesites (perl, gnu-copy). In this step-by-step description i will only refer to the things which need to be done for each '''new''' milestone.
  
 
I use the bash-shell in all examples only, since to my believe users of the c-shell are smart enough to figure the differences anyway.
 
I use the bash-shell in all examples only, since to my believe users of the c-shell are smart enough to figure the differences anyway.
Line 20: Line 20:
 
Porting OpenOffice to a new Windowing Toolkit is mostly porting of the OpenOffice's VCL Layer (Visual Class Libraries) to the new toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit of the platform.
 
Porting OpenOffice to a new Windowing Toolkit is mostly porting of the OpenOffice's VCL Layer (Visual Class Libraries) to the new toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit of the platform.
  
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is develop in the child workspace called 'aquavcl01'.  
+
The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is develop in the child workspace called 'aquavcl01'. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.
  
 
The basic approach of a creating a developers workspace is to do the following:
 
The basic approach of a creating a developers workspace is to do the following:
Line 35: Line 35:
 
=== Getting the code (checkout, merge and patch the puppy) ===
 
=== Getting the code (checkout, merge and patch the puppy) ===
  
Now let's have a look what to check-out and where. All these milestones below highly depend on the given point-in-time. I use the milestones which worked for me at the time of this writing (August, 13th 2006). You may change this to your needs.
+
Now let's have a look what to check-out and where. All these milestones below highly depend on the given point-in-time. I use the milestones which worked for me at the time of this writing (August, 13th 2006). You may change this to your needs.  
  
 
You also need to bear in mind that you have to access the CVS-Server on it's default port (2401). If a firewall stop's you here you have to setup a CVS-Tunnel.
 
You also need to bear in mind that you have to access the CVS-Server on it's default port (2401). If a firewall stop's you here you have to setup a CVS-Tunnel.
 +
 +
One word of caution here: It worked out quite good to me have backup-copies of the Masterworkspace (m177) and the childworkspace (aquavcl01) and merge them manually rather than to checkout in the same subdirectory. I explain here for demonstration purposes only the checkout in the same subdirectory, nevertheless i recommend the two-directories-copy-later aproach.
  
 
==== create a directory for a given milestone, setup CVS access: ====  
 
==== create a directory for a given milestone, setup CVS access: ====  
Line 53: Line 55:
 
  cvs -z3 co -r SRC680_m177 OpenOffice2
 
  cvs -z3 co -r SRC680_m177 OpenOffice2
  
==== checkout Aquavcl01:
+
==== checkout Aquavcl01: ====
  
 
  cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2
 
  cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2
 +
 +
==== Apply some patches ====
 +
 +
After you've checked out the sources you need, you have to apply the needed patches. Here for example some st
 +
 +
patch -p0 ../patches/aquavcl01-menus_debug.diff
 +
 +
How our team keeps track of these patches, tests their compatibility and consolidates them remains to be seen.
  
 
=== One-Time preparations and scripts ===
 
=== One-Time preparations and scripts ===
Line 61: Line 71:
 
==== Ant ====
 
==== Ant ====
  
For the OpenOffice Builds you need to have Apache's Ant in the source-directory. You have to have Ant Version 1.6.5. My Ant usually resides in /opt/ant so i link it in from there:
+
For the OpenOffice Builds you need to have Apache's Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:
  
 
  cd src680-m177/
 
  cd src680-m177/
Line 80: Line 90:
  
 
  cd src680-m177/config_office/
 
  cd src680-m177/config_office/
  ln -s ../../bin/doit.sh
+
  ln -s ../../bin/build.sh
  
And this is how 'doit.sh' looks like (call it build.sh or compile.sh if you like):
+
And this is how 'build.sh' looks like:
  
 
  #!/bin/sh
 
  #!/bin/sh
Line 106: Line 116:
 
=== Doing the build ===
 
=== Doing the build ===
  
# configure
+
Fine, now we have a (hopefully) working 'build.sh' in the config_office subdir. We need to run it upfront:
# build
+
 
# post-processing
+
cd src680-m177/config_office/
 +
./doit.sh
 +
 
 +
This will setup the necessary includefiles and create a couple of files in the *parent* directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you need only care for 'MacOSXPPCEnv.Set.sh'. Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:
 +
 
 +
cd ..
 +
./bootstrap
 +
. MacOSXPPCEnv.Set.sh
 +
dmake
  
=== Testing the result, running svdem ===
+
=== Building and running svdem ===
  
 
=== Some Pointers ===
 
=== Some Pointers ===
Line 120: Line 138:
 
# TX20:
 
# TX20:
 
# OpenOffice Source Directory Structure:
 
# OpenOffice Source Directory Structure:
 +
# Pavels Patch Repository:
  
 
[[Category:Porting]]
 
[[Category:Porting]]

Revision as of 11:54, 13 August 2006

Building OpenOffice for MacOSX using Aqua, or the Story of svdem ...

This Document tries to wrap-up the Buildprocess for OpenOffice on MacOS X using the native Windowing Toolkit of the Platform Aqua. The main goal is to get the demonstration programs 'svdem' build. They act as fairly good starting point to further endaevours, since they are used to test the capabilities of the underlying VCL Layer.

The base for this Document is the Description of the X11 Build thanksworthy provided by Eric Hoch in this Document: MacOSXBuildInstructions. Please check this document for prerequesites (perl, gnu-copy). In this step-by-step description i will only refer to the things which need to be done for each new milestone.

I use the bash-shell in all examples only, since to my believe users of the c-shell are smart enough to figure the differences anyway.

Many thanks for help & assistance go to Pavel Janik and Eric Bachard.

Some Backgroud (what is aquavcl01, EIS, etc.)

EIS

OpenOffice sources are basically kept in the CVS server located at anoncvs.services.openoffice.org. However this repository is managed by a Database on top called EIS (Environment Information System) which is used to keep track of Master and Client Workspaces. Master Workspaces are used to keep track of changes going back of the mainline and QA-cycles. These Master Workspaces are driven to official releases. Child workspaces in contrast are copies of certain Master Workspaces used to develop and test bugfixes and additional functionality. These Child Workspaces are later (hopefully) merged back to mainlain Master Workspaces. The TX20 Report gives a very good overview about the overall process.

Go to EIS http://eis.services.openoffice.org/EIS2/servlet/Logon and Logon as guest/guest to get yourself an impression. You can find information about the different workspaces, their dates and times there.

VCL (Visual Class Libraries)

Porting OpenOffice to a new Windowing Toolkit is mostly porting of the OpenOffice's VCL Layer (Visual Class Libraries) to the new toolkit. The VCL-Layer is responsible of mapping the OpenOffice Application calls to the windowing toolkit of the platform.

The (native) OpenOffice port to MacOSX using the Aqua Windowing Toolkit is develop in the child workspace called 'aquavcl01'. This child workspace consists of the modules (aka subdirs): canvas dtrans extensions freetype padmin scp2 sj2 solenv vcl.

The basic approach of a creating a developers workspace is to do the following:

  1. checkout a given OpenOffice Milestone.
  2. checkout aquavcl01 Child Workspace.
  3. merge them together.
  4. apply the latest patches.

The last point here is a cumbersome but nevertheless necessary operation, since this porting project is in flux. Thanks to Pavel and others many improvements are happening at the moment, but these improvements get distributed as patches/diffs against aquavcl01.

Aquavcl01 needs to remain stable all the time, therefore the team needs to work on this patch-by-patch aproach at the moment.

Getting the code (checkout, merge and patch the puppy)

Now let's have a look what to check-out and where. All these milestones below highly depend on the given point-in-time. I use the milestones which worked for me at the time of this writing (August, 13th 2006). You may change this to your needs.

You also need to bear in mind that you have to access the CVS-Server on it's default port (2401). If a firewall stop's you here you have to setup a CVS-Tunnel.

One word of caution here: It worked out quite good to me have backup-copies of the Masterworkspace (m177) and the childworkspace (aquavcl01) and merge them manually rather than to checkout in the same subdirectory. I explain here for demonstration purposes only the checkout in the same subdirectory, nevertheless i recommend the two-directories-copy-later aproach.

create a directory for a given milestone, setup CVS access:

mkdir src680-m177
cd src680-m177

export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs ==== 
cvs login

Please Enter the password 'anoncvs'

checkout Milestone m177:

cvs -z3 co -r SRC680_m177 OpenOffice2

checkout Aquavcl01:

cvs -z3 co -r cws_src680_aquavcl01 OpenOffice2

Apply some patches

After you've checked out the sources you need, you have to apply the needed patches. Here for example some st

patch -p0 ../patches/aquavcl01-menus_debug.diff

How our team keeps track of these patches, tests their compatibility and consolidates them remains to be seen.

One-Time preparations and scripts

Ant

For the OpenOffice Builds you need to have Apache's Ant in the source-directory. You have to have Ant Version 1.6.5+. My Ant usually resides in /opt/ant so i link it in from there:

cd src680-m177/
ln -s /opt/ant/ apache-ant-1.6.5

./configure

OpenOffice building gets configured by the popular open-source configuration-management package 'autoconf'. So you can do your beloved './configure' command, but in our case this is done in the 'config_office' subdirectory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.

My directory-structure looks like this:

bin/
src680-m176/
src680-m177/
...

Now I go to the 'config_office' subdir and link in my startscript:

cd src680-m177/config_office/
ln -s ../../bin/build.sh

And this is how 'build.sh' looks like:

#!/bin/sh
export BASE=`pwd|sed 's/\/config_office//'`
export OOVERSION=`echo $BASE|sed 's/^\/.*\///'`
echo Building from      : $BASE
echo OpenOffice Version : $OOVERSION
./configure \
--with-lang="de en-US" \
--with-jdk-home=/Library/Java/Home/ \
--with-ant-home=$BASE/apache-ant-1.6.5/ \
--with-gnu-cp=/sw/bin/cp \
--with-epm=internal \
--disable-mozab \
--disable-pasf \
--disable-gtk \
--disable-mozilla \
--with-build-version=$OOVERSION-`date +%d-%m-%y` \
--disable-fontconfig

This is allowedly a pretty much limited setup, but my overall goal is to get people to have 'svdem' build to start coding rather than to have a production ready build for the final release. Therefore I switched off most of the stuff. How these builds are done in the long run is open for discussion.

Doing the build

Fine, now we have a (hopefully) working 'build.sh' in the config_office subdir. We need to run it upfront:

cd src680-m177/config_office/
./doit.sh

This will setup the necessary includefiles and create a couple of files in the *parent* directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you need only care for 'MacOSXPPCEnv.Set.sh'. Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:

cd ..
./bootstrap
. MacOSXPPCEnv.Set.sh
dmake

Building and running svdem

Some Pointers

  1. Bug Database:
  2. Mailinglist:
  3. IRC Meeting-Logs:
  4. Carbon:
  5. TX20:
  6. OpenOffice Source Directory Structure:
  7. Pavels Patch Repository:
Personal tools