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

From Apache OpenOffice Wiki
Jump to: navigation, search
('''Closed for development''')
 
(245 intermediate revisions by 25 users not shown)
Line 1: Line 1:
<div align="left" style="color:blue; font-size:18px">'''Cocoa migration is in progress '''</div>
+
{{Documentation/Building Guide TOC
<br>
+
|ShowNextPage=none
<div align="left" style="color:red; font-size:18px">'''Please note the next Master Work space (MWS) will soon change for DEV300, means SRC680 will be replaced at every place once 3.0 branch will exist '''</div>
+
|ShowPrevPage=none
<br>
+
}}
<big>'''This document tries to wrap-up the build process for [[OpenOffice.org]] on Mac OS X using the native windowing-toolkit of the platform named Aqua.''' </big>
+
  
=== Important links for Cocoa development ===
+
{{DISPLAYTITLE:Building OpenOffice 3.x or Apache OpenOffice 4.0 on Mac OSX}}
 +
[[Category:MacOSX]]
 +
{{Note|These instructions have been '''DEPRECATED'''}}
 +
{{SeeAlso|EN|
 +
* [[Documentation/Building_Guide_AOO/Building_on_MacOsX]] }}
 +
__TOC__
 +
<!-- insert comment -->
 +
= Overview =
 +
This document explains how to build older OpenOffice source code on Mac OS X systems.
 +
{{Note|<code>$SRC_ROOT</code> will denote the directory in which the source code of Apache OpenOffice is stored.}}
 +
{{Tip|You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.}}
  
[http://www.cocoadev.com Cocoadev ]
+
= Requirements =
  
[http://ktd.club.fr/programmation/objective-c.php Pierre Chatelier page about C++ to Cocoa conversion ]
+
To build the office on Mac OS X several requirements/prerequisites have to be fulfilled.  
  
Note: .pdf available in both english and french versions. Excellent.
+
== Mandatory Requirements ==
 +
* '''Mac OS X''' version 10.4 (aka Tiger) or later (if using 10.5 aka Leopard, have a look at [[User:Dyrcona/LeopardBuild#flex]]
 +
* '''Mac 10.4 SDK'''
 +
* '''XCode''' version 2.4.1 or any XCode 3. If you want to use a newer version than the one that is shipped with your Mac OS X installation media, you need to register at the [https://connect.apple.com/ Apple Developer Connection] site (free of charge) to be able to [http://developer.apple.com/technology/xcode.html download it].  On Mac OS X 10.6 (Snow Leopard), make sure to install the optional 10.4 SDK with XCode.
 +
* '''dmake''', the build environment depends currently on a special patched version of dmake that you can download and build on demand during configure and bootstrap. Or you can provide a prebuilt version and can specify it during configure.
 +
* '''epm''', the build environment depends currently on a special patched version of epm (easy package manager) that you can download and build on demand during configure and bootstrap. Or you can provide a prebuilt version and can specify it during configure. 
 +
 +
{{Note|XCode 3 and SDK 10.4 is currently required for building trunk or the releases. Work on supporting XCode>=4 is ongoing.}}
  
 +
== Optional Requirements ==
  
(Outdated): To give a kickstart in the coding involved to get VCL ported to Carbon, please have a look at the excellent Pierre de Filippis [[Intro To Mac Porting]].
+
=== Prebuilt unowinreg.dll ===
  
We use the bash shell in all examples, since to our belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description of the build environment here: [http://tools.openoffice.org/build_env.html OpenOffice.org Build Environment].
+
This library is Windows only but will be packed in the Apache OpenOffice SDK to ensure that it is available on all platforms. The library provides some glue code to setup a working UNO environment for UNO client applications connecting to an office and doing some remote automation via API. The library should be stored in ''main/external/unowinreg''. Only necessary for building the SDK.
  
== '''Prerequisites''' ==
+
The library can be downloaded under
 +
* http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
  
This document was derived from the description of the X11 build thanksworthy provided by Eric Hoch in this document: [[MacOSXBuildInstructions]].
 
  
'''Here we would like to outline the things you need to build the Aqua Version''' (besides the OS).
+
== Recommended tools ==
  
=== <div align="left" style="color:red; font-size:18px">'''Mandatory'''</div>===
+
* '''ccache'''
 +
If you intend to build Apache OpenOffice several times, you probably can benefit of ccache since it will speed up your future builds. The first time you make a build with ccache you won't notice it, but the next time the build will go up to five times faster.
  
==== Mac OS X version ====
+
You can install it using '''[http://www.finkproject.org/ Fink]'''. It is simply named "ccache". For '''[http://www.macports.org/ MacPorts]''' users the package is called "ccache".  
 
+
=> '''Minimal version for AquaBuild is Mac OS X 10.4 (aka Tiger).'''
+
 
+
Due to important changes in the API, Aqua version cannot be built on Panther.
+
 
+
==== Xcode ====
+
 
+
This is the only mandatory part to be installed to build Aqua version of OpenOffice.org.
+
 
+
Current verified working version is '''XCode 2.4.1'''. Older are deprecated.
+
 
+
==== Java ====
+
 
+
Aqua version of OpenOffice.org does not build yet using Java SDK 1.6.0.
+
 
+
'''Please use either J2SDK 1.4.2 or 1.5.0'''
+
 
+
To change the Java version -> go into folder : Applications -> Utilities -> Java and modify.
+
 
+
 
+
Else, you'll meet unfixed build breakers (patches are welcome anyway)
+
 
+
Note: If you are interested in helping us with Java 1.6 a patch which enables the build using java 1.6 is available [http://eric.bachard.free.fr/mac/aquavcl/patches/aquavcl03_august2007/java1.6/java_1.6_build.diff  '''here'''].  e.g. several known build issues have to be fixed e.g. hsqldb, but probably other modules are concerned.
+
 
+
Be aware that it may impact important work and/or incompatibilities will occur. Feel free to submit your patches at mac@porting mailing list.
+
 
+
==== gperf ====
+
 
+
You need a build of [[http://www.gnu.org/software/gperf/gperf.html gperf]] in your path for some modules.
+
 
+
=== <div align="left" style="color:blue; font-size:18px">''' Strongly recommended'''</div>===
+
 
+
==== ccache ====
+
If you intend to build OpenOffice.org several times, you probably can benefit of ccache since it will speed up your future builds. The first time you make a build with ccache you won't notice it, but the next time the build will go up to five times faster.
+
 
+
You can install it using [[http://www.finkproject.org/ fink]]. It is simply named "ccache". For [[http://www.macports.org/ MacPorts]] users the package is called "ccache".  
+
  
 
If you don't use fink, you can download and build it yourself using the source provided at http://ccache.samba.org/
 
If you don't use fink, you can download and build it yourself using the source provided at http://ccache.samba.org/
  
In order to use ccache you need to change the following environment variables '''assuming you're using bash, and just before doing configure command line''':
+
There are two ways to enable ccache - one is to set environment variables, the other way is to use symlinks.
  
<pre>
+
Using environment variables:
export CC="ccache gcc"
+
export CC="ccache gcc"
export CXX="ccache g++"
+
export CXX="ccache g++"
</pre>
+
  
== '''Everything is installed ? Now build it... '''==
+
Using the symlink approach:
 +
# create a directory for the links
 +
mkdir ~/bin
 +
# create the symlinks pointing to ccache with the name of the compiler
 +
ln -s /path/to/ccache ~/bin/gcc
 +
ln -s /path/to/ccache ~/bin/g++
 +
ln -s /path/to/ccache ~/bin/cc
 +
ln -s /path/to/ccache ~/bin/c++
 +
# no all you need to enable ccache is to prepend ~/bin to your PATH
 +
  $ export PATH=~/bin:$PATH
  
<!--
+
for both methody, you can add the "export ..." lines to your ~/.profile - that way you don't need to manually set it when building. You can still temporarily disable ccache (export CCACHE_DISABLE=1) in case you don't want to use it.
<br><br>
+
<div align="left" style="color:green; font-size:22px">'''=> Current Milestone is m245, and current MWS is DEV300'''</div>
+
<br><br>
+
-->
+
  
 +
Since OOo is rather huge, you should increase the cache-size to 1 GB or more
 +
ccache -M 1G
  
<br><br>
+
* '''subversion''' version '''1.5.4 or later'''
<div align="left" style="color:green; font-size:22px">'''=> Current Milestone is m245'''</div>
+
Since OOo's source code is managed using Subversion currently, you also need the svn client to checkout sources (otherwise you would be bount to source-tarballs that aren't generated that frequently). You can either compile yourself or use the subversion universal binaries from the [http://subversion.tigris.org subversion project] Version 1.5.4 or later is required because of important fixes related to the merge-feature.
<br><br>
+
  
== '''Getting the code (checkout, merge and patch the puppy)''' ==
+
== Get the source and prepare to build it ==
  
=== Create a directory for a given milestone, setup CVS access: ===
+
=== Get the source from SVN ===
  
<!--
+
You need about 4.7 GB for a checkout from the svn repository. Building the source requires another 5GB.<br>
<code>[bash,N]
+
mkdir DEV300_m245
+
cd DEV300_m245
+
-->
+
<code>[bash,N]
+
mkdir SRC680_m245
+
cd SRC680_m245
+
</code>
+
<code>[bash,N]
+
export CVSROOT=":pserver:anoncvs@anoncvs.services.openoffice.org:/cvs"
+
cvs login
+
(password is 'anoncvs' )  + Enter
+
</code>
+
<code>[bash,N]
+
Note: The source should be downloaded to a path that does not contain any spaces, otherwise compiling might be troublesome.
+
</code>
+
  
<!--
+
* '''check out the latest source from svn'''
=== checkout DEV300 (Master workspace since 3.0 branch creation) (1,5 GB): ===
+
<code>[N]
+
cvs -z3 co -r DEV300_m243 OpenOffice2    # don't forget the "2" !!
+
</code>
+
Once done, you'll obtain milestone m245.
+
-->
+
=== checkout SRC680 (Master workspace since aquavcl01 integration) (1,5 GB): ===
+
<code>[N]
+
cvs -z3 co -r SRC680_m245 OpenOffice2    # don't forget the "2" !!
+
</code>
+
Once done, you'll obtain milestone m245.
+
  
=== <div align="left" style="color:green; font-size:18px">'''Additional dependencies for current Milestone builds'''</div>===
+
svn co https://svn.apache.org/repos/asf/openoffice/trunk aoo
  
==== prebuilt Mozilla archives ====
+
=== One-Time preparation and scripts ===
  
To enable the use of macros (disabled by default for security reasons), you'll have to put the prebuilt archives of mozilla binaries in moz/zipped directory after renaming them properly.
+
Apache OpenOffice build environment is configured using the open-source configuration-management package 'autoconf'. So you can do your beloved './configure' command, is now done in the '''main''' source directory.  
  
URL : http://tools.openoffice.org/moz_prebuild/680/
+
To save the configure parameters and use them with different milestones it is useful to create your own build script to configure the environment and to trigger the build.
  
Note: archives are Universal Binaries, and you'll have to rename them, depending on your architecture (either Intel or PowerPC)
+
The directory structure when you have checked out the sources from svn looks like:
  
Archives to be downloaded :
+
aoo/
 +
aoo/main
 +
aoo/extras
 +
aoo/test
 +
aoo/ext_libraries
 +
aoo/ext_sources
  
http://tools.openoffice.org/moz_prebuild/680/MACOSXGCCUBinc.zip
+
Move into '''main''' and configure a minimal environment to build your first version of Apache OpenOffice:
 +
 +
cd main
  
http://tools.openoffice.org/moz_prebuild/680/MACOSXGCCUBlib.zip
+
Run the autoconf command to prepare a new configure based on the latest changes in configure.in
  
http://tools.openoffice.org/moz_prebuild/680/MACOSXGCCUBruntime.zip
+
autoconf
  
 +
Run configure
  
If you want to build using them on PowerPC or Intel architecture (with Tiger)  please rename them this way :
+
  ./configure --without-stlport --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 --with-epm-url=http://www.msweet.org/files/project2/epm-3.7-source.tar.gz
  
{| border="1"
+
This commands prepares a minimal environment to build the office without any category-b enabled external libraries. A pure Apache license compatible version. See also the configure switches ''--with-dmake-path'' and ''--with-epm'' to specify prebuilt versions of dmake or epm.
|Archive || Name in Intel architecture || Name on PowerPC architecture
+
|-
+
| headers || MACOSXGCC'''I'''inc.zip || MACOSXGCC'''P'''inc.zip
+
|-
+
| runtime || MACOSXGCC'''I'''runtime.zip || MACOSXGCC'''P'''lib.zip
+
|-
+
| libs || MACOSXGCC'''I'''lib.zip || MACOSXGCC'''P'''lib.zip
+
|}
+
  
 +
Finally you should run bootstrap to trigger further preparations and to create platform specific shell script to setup a working build environment. On Mac OS x for example '''MacOSXX86Env.Set.sh''' on a Intel based system. 
  
As you can see, '''P''' means PowerPC, and '''I''' means Intel (replacing '''UB''' in the original name)
+
=== Build environment with enabled category-b dependencies ===
  
<!--
+
To prepare a build environment that provides more features and make use of further external libraries which are under copyleft but viral licenses you have to explicitly enable this '''category-b''' components.
.. and put them into '''<ooo build directory>/DEV300_m245/moz/zipped'''  
+
Once done, you'll obtain milestone m245.
+
-->
+
.. and put them into '''<ooo build directory>/SRC680_m245/moz/zipped'''
+
  
OpenOffice.org should detect and use them if you respect the configure command line as described in Milestone build.
+
./configure --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 \
 +
    --with-epm-url=http://www.msweet.org/files/project2/epm-3.7-source.tar.gz \
 +
    --disable-build-mozilla \
 +
    --without-stlport \
 +
    --enable-verbose \
 +
    '''--enable-category-b'''\
 +
    --enable-wiki-publisher
  
=== One-Time preparations and scripts ===
 
  
OpenOffice.org's build environment is configured using 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.
+
===Example build script to simplify user specific configurations===
 +
As mentioned before to save the configure parameters and use them with different versions it is useful to create your own build script to configure the environment.
  
My directory-structure looks like this:
+
Create 'build.sh' (to be written) :
  
bin/
+
<pre>
<!--
+
#! /bin/bash
DEV300_m245/
+
-->  
+
SRC680_m225/
+
SRC680_m245/
+
...
+
  
Now I go to the 'config_office' subdir and link in my startscript:
+
echo "### checking for unowinreg.dll ... "
<!--
+
if [ ! -e ./external/unowinreg/unowinreg.dll ]; then
<code>[bash,N]
+
    wget -O external/unowinreg/unowinreg.dll http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
  cd DEV300_m245/config_office/
+
else
ln -s ../../bin/build.sh
+
    echo "  unowinreg.dll found"
</code>
+
fi
-->
+
<code>[bash,N]
+
cd SRC680_ m245/config_office/
+
ln -s ../../bin/build.sh
+
</code>
+
And this is how 'build.sh' (to be written) looks like :
+
  
<code>[bash,N]
+
echo "### checking for moz prebuild libs ... "
#!/bin/sh
+
if [ ! -e  ./moz/zipped/MACOSXGCCIinc.zip ]; then
export BASE=`pwd|sed 's/\/config_office//'`
+
    wget -O ./moz/zipped/MACOSXGCCIinc.zip http://www.openoffice.org/tools/moz_prebuild/OOo3.2/MACOSXGCCIinc.zip
export OOVERSION=`echo $BASE|sed 's/^\/.*\///'`
+
     wget -O ./moz/zipped/MACOSXGCCIlib.zip http://www.openoffice.org/tools/moz_prebuild/OOo3.2/MACOSXGCCIlib.zip
echo Building from     : $BASE
+
    wget -O ./moz/zipped/MACOSXGCCIruntime.zip http://www.openoffice.org/tools/moz_prebuild/OOo3.2/MACOSXGCCIruntime.zip
echo OpenOffice Version: $OOVERSION
+
else
./configure \
+
    echo " moz prebuild libs found"
--with-lang="en-US de fr" \
+
fi
--disable-odk \
+
--disable-pasf \
+
--disable-gtk \
+
--disable-headless \
+
--disable-build-mozilla \
+
--with-build-version=$OOVERSION-`date +%d-%m-%y` \
+
--disable-fontconfig \
+
--without-nas \
+
--with-use-shell=bash \
+
--with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home \
+
  --with-stlport=no
+
</code>
+
  
Note : --disable-neon has been removed since m217 resync. See issue : [[http://qa.openoffice.org/issues/show_bug.cgi?id=78206 --disable-neon breaks aqua build]]
+
if [ ! -e ./configure ]; then
 +
    echo "### autoconf ..."
 +
    autoconf
 +
else
 +
    echo "### autoconf ..."
 +
    rm ./configure
 +
    autoconf
 +
fi
  
--disable-odk : disables SDK build, and will avoid you to download some windows dll which is not needed for aqua-build.
+
echo "### Configure"
 +
./configure --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz
  
--disable-pasf : pasf stands for Portable Audio System file. As we want to use system library rather than portable ones, we disabled this. However, at this time not all functionality will be available with pasf disabled. You might willing to use --with-pasf if you want working audio in your build.
+
#./configure --with-build-version="$(date +"%Y-%m-%d %H:%M:%S (%a, %d %b %Y)") - Rev. $(echo $(svn info) | sed -e 's/^.*Last Changed Rev: //g' -e 's/ .*//g')" \
 +
    --disable-build-mozilla \
 +
    --enable-verbose --enable- category-b --enable-minimizer --enable-presenter-console --enable-wiki-publisher \
 +
    --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 \
 +
    --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz
  
--without-nas : nas stands for Network Audio System, it uses X11, if you want to use it in your build, just remove this flag. You will need to install the X11 package provided in your CDs/DVD Mac OS X installation. X11 SDK from xCode tools is not required for build this.
+
./bootstrap
 +
</pre>
  
--disable-build-mozilla: will disable the mozilla build (in the moz module), but mozilla pre-built archives will be used instead (they are mandatory to enable the macro security configuration dialog (see [http://www.openoffice.org/issues/show_bug.cgi?id=79885 issue 79885]).
+
Put this script into ~/bin and make sure it is executable :  
  
--enable-dbgutil: add this option to enable assertions and other functionality useful for debugging
+
chmod ug+x ~/bin/build.sh
  
--with-jdk-home must be set as above with XCode 3.0
+
<b>We used the bash shell in all example, since to our belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description  [http://tools.openoffice.org/build_env.html OpenOffice.org's Build Environment].</b>
  
--with-stlport=no uses Apple's built-in STL, but will cause some warnings
+
== Doing the build ==
  
== '''Doing the build (about 4,5 GB)''' ==
+
After running configure and bootstrap we should have a working build environment and all necessary scripts should have been created. From now on you can use '''MacOSXX86Env.Set.sh''' to prepare a new shell with a working build environment.
  
Fine, now we have a (hopefully) working 'build.sh' in the config_office subdir. We need to run it beforehand:
+
=== On Mac Intel ===
<!--
+
cd DEV300_m245/config_office/
+
-->
+
cd SRC680_m245/config_office/
+
./build.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 only need to take 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:
 
 
==== Mac Intel ====
 
 
cd ..
 
./bootstrap
 
 
  source MacOSXX86Env.Set.sh
 
  source MacOSXX86Env.Set.sh
 
  cd instsetoo_native
 
  cd instsetoo_native
  export TMP=/tmp
+
  build --all
export SYSTEM_OPENSSL=YES
+
  
+
 
build --all -P4 --dlv_switch -link --dontgraboutput
 
 
 
  or
 
  or
+
 
 
  build --all -P4  
 
  build --all -P4  
  
if you run into trouble with --dlv_switch (see: [http://qa.openoffice.org/issues/show_bug.cgi?id=77360 | issue 77360])
+
=== On PowerPC ===
  
==== On PowerPC ====
 
 
cd ..
 
./bootstrap
 
 
  source MacOSXPPCEnv.Set.sh
 
  source MacOSXPPCEnv.Set.sh
 
  cd instsetoo_native
 
  cd instsetoo_native
  export TMP=/tmp
+
  build --all
export SYSTEM_OPENSSL=YES
+
  
+
 
 
 
build --all -P2 --dlv_switch -link --dontgraboutput
 
 
 
  or
 
  or
+
 
 
  build --all -P2  
 
  build --all -P2  
  
===== Comments on above =====
+
=== Comments on above ===
  
if you run into trouble with --dlv_switch (see: [http://qa.openoffice.org/issues/show_bug.cgi?id=77360|issue 77360])
+
'''TODO TODO TODO ....'''
 +
 
 +
if you run into trouble with --dlv_switch (see: {{Bug|77360}})
  
 
The main purpose of the '''bootstrap''' script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it's history and manpage have a look here: http://tools.openoffice.org/dmake/index.html
 
The main purpose of the '''bootstrap''' script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it's history and manpage have a look here: http://tools.openoffice.org/dmake/index.html
Line 290: Line 219:
  
 
where $USER is your user name. Then you can load in Firefox (not Safari!) the HTML file '''unxmacxi.pro.build.html''' via the in Mac OS X included Apache web server or diretctly form the directory ''/Users/$USER/Sites/''. This file is automatically being updated and is showing the status of the build and also the time needed since the build started.
 
where $USER is your user name. Then you can load in Firefox (not Safari!) the HTML file '''unxmacxi.pro.build.html''' via the in Mac OS X included Apache web server or diretctly form the directory ''/Users/$USER/Sites/''. This file is automatically being updated and is showing the status of the build and also the time needed since the build started.
 +
 +
If you build on Snow Leopard (aka Mac OS X 10.6): Set DYLD_INSERT_LIBRARIES to point to the correct libsqlite3.dylib:
 +
<pre>
 +
DYLD_INSERT_LIBRARIES=/usr/lib/libsqlite3.dylib
 +
</pre>
  
 
== '''Installing, preparing and running OpenOffice.org''' ==
 
== '''Installing, preparing and running OpenOffice.org''' ==
Line 295: Line 229:
 
===''' Find the Bundle''' ===
 
===''' Find the Bundle''' ===
  
Once the build completed, the Final product ( en-US version ) is named :  OOo_2.4.0_071211_MacOSXIntel_install.dmg ( for version 2.4.0 e.g.)  
+
Once the build completed, the final product ( en-US version ) is named :  OOo_3.0.0_*_MacOSXIntel_install.dmg ( for version 3.0beta e.g.)  
  
And is located in instsetoo_native/unxmacxi.pro/OpenOffice/archive/install/en-US  directory ( replace en-US with your locale )
+
And is located in instsetoo_native/unxmacxi.pro/OpenOffice/dmg/install/en-US  directory ( replace en-US with your locale )
  
[[Image:Bundle_Location_2.4.0.jpg]]
+
[[Image:Bundle_Location3.0beta.jpg]]
  
<br><br>
+
=== '''Install the new Build''' ===
  
=== '''Run the soffice.bin''' ===
+
* double-click on the *.dmg icon
 +
* drag the OpenOffice icon into a folder of your choice
  
 +
=== '''Run the new Build''' ===
  
 +
* double click the application icon in that folder
  
In one line :
+
=== '''Screenshots''' ===
  
<big>'''Double click the .dmg , drag the OpenOffice.org icon in the folder you want, and double click to run it !!'''</big>
+
Now you can start to work with this [[Aqua_Screenshots | amazing productivity suite]].
  
 +
== '''Contribute by finding, isolating, debugging or solving issues''' ==
  
Note : soffice.bin leads XCode to not work (because of the dot in the name). The issue has been reported to xcode-users list.
+
=== '''Isolate a problem''' ===
+
We're nearly through, let's fire-off the binary:
+
  
 +
==== '''Reduce a problem''' ====
  
But a lot has to be done, and if you want to trace (using gdb e.g.), just do:
+
* make a problem reproducable
 +
* reduce it to a test case that is as small and simple as possible
 +
* if a problem is specific to a document then please attach it to the issue. A mininal excerpt of the document that still shows the problem is even better.
 +
* a screenshot of is a good idea if it clearly shows the problem
  
cd <INSTALL_DIR>/OpenOffice.org\ 2.4.app/Contents/MacOS
+
==== '''Using application switches''' ====
  
and run:
+
Application switches are often valuable for isolating a problem. Most of OpenOffice.org's options can be found its Tools->Options menu.
 
+
<br><br>
gdb --args soffice.bin
+
Some switches are so special that there is no user interface to change them. They are only useful for debugging and isolating a problem, but they are very valuable a that. So a developer might suggest to isolate a problem by setting an environment variable before running the application. E.g. for isolating problems with the menubar a developer might suggest to set the environment variable [[AQUA_NATIVE_MENUS]] to false. This is done by typing these commands into a terminal:
 
+
* cd <INSTALL_DIR>/OpenOffice.org/Contents/MacOS
(add any breakpoint you want)
+
* export AQUA_NATIVE_MENUS=false
 
+
* ./soffice.bin
r to run OpenOffice.org
+
 
+
=== Use vcl menubar and / or vcl menus ===
+
 
+
 
+
Native menus are defaults. If you want to use vcl menus, do:
+
 
+
<pre>
+
AQUA_NATIVE_MENUS=FALSE ./soffice.bin
+
</pre>
+
 
+
Note: options to not recover is  -norestore , and to bypass the user informations to fill in, use -nofirststartwizard
+
 
+
AQUA_NATIVE_MENUS=FALSE ./soffice.bin -nofirststartwizard -norestore
+
 
+
You can also insert environement variables in a Dictionary Class of Info.plist located in the Contents directory of OpenOffice.org bundle.
+
 
+
For example, you can add the following XML in a text editor (or make it generated by Property List Editor) in your Info.plist :
+
  
  <key>LSEnvironment</key>
+
==== '''Provide a call stack for crash problems''' ====
  <dict>
+
      <key>AQUA_NATIVE_MENUS</key>
+
      <string>TRUE</string>
+
      <key>OOO_DISABLE_RECOVERY</key>
+
      <string>TRUE</string>
+
      <key>SAL_NO_NWF</key>
+
        <string>TRUE</string>
+
  <dict>
+
  
Notice that in order to work, the OOO_DISABLE_RECOVERY variable detection must be manually inserted in OOo code using the following patch :
+
Please note that bugs involving crashes should provide a description of how to reproduce the problem and a callstack.
http://www.go-oo.org/patches/src680/disable-recovery.diff
+
There are several ways to provide the callstack:
 +
* the preferred method is to use OOo"s builtin [[CrashReporting|crash reporting tool]]
 +
* developers may provide a [[Providing_a_gdb_backtrace | gdb backtrace]] of the problem
 +
* if the above two methods don"t work then please attach a file with the details provided by the AppleCrashReporter
  
This patch is outdated, but you can make the modifications yourself.
+
=== '''Check against known issues''' ===
  
 +
Check the list of [http://www.openoffice.org/issues/buglist.cgi?issue_status=UNCONFIRMED&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&email1=&emailtype1=exact&emailassigned_to1=1&email2=&emailtype2=exact&emailreporter2=1&issueidtype=include&issue_id=&changedin=&votes=&chfieldfrom=&chfieldto=&chfieldvalue=&short_desc=&short_desc_type=fulltext&long_desc=&long_desc_type=fulltext&issue_file_loc=&issue_file_loc_type=fulltext&status_whiteboard=&status_whiteboard_type=fulltext&keywords=aqua&keywords_type=anytokens&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&newqueryname=&order=Reuse+same+sort+as+last+time&Submit+query=Submit+query open issues]
  
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:
+
=== '''Report a new issue''' ===
  
{| border="1" cellpadding="15" cellspacing="0"
+
Report [http://qa.openoffice.org/issue_handling/pre_submission.html new issues] after you have [[AquaBuild#Isolate_a_problem | isolated the problem]]
|-
+
! Variable || Function
+
|-
+
| SAL_NO_NWF=TRUE  || disable native controls code
+
|-
+
| AQUA_NATIVE_MENUS=FALSE || disable native menus code
+
|}
+
  
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.
+
=== '''Debug a problem''' ===
  
== '''Debug and contribute ''' ==
+
Debugging problems is often easier in an development environment:
 
<ul>
 
<ul>
<li>You want to provide crash issue details? Please see [[Providing_a_gdb_backtrace]]</li>
+
<li>With XCode: [[MacOSX_Debug_OpenOffice.org_using_XCode]]</li>
<li>You want to debug using XCode? Please see [[MacOSX_Debug_OpenOffice.org_using_XCode]]</li>
+
<li>With Xemacs: [http://www.mikesicotte.com/2007/02/21/debugging-ooo-with-xemacs-and-gdb Michael Sicotte's blog entry]</li>
<li>You want to debug using Xemacs? Please see [http://www.mikesicotte.com/2007/02/21/debugging-ooo-with-xemacs-and-gdb Michael Sicotte's blog entry]</li>
+
 
</ul>
 
</ul>
  
 +
Please note that XCode still has some problems with the executable named soffice.bin (because of the dot in the name). The issue has been reported to xcode-users list.
  
<br>
+
== '''Current Work in progress (Aqua specific work only)''' ==
  
<div align="left" style="color:green; font-size:18px">'''[[AquaBuild/Cocoa Informations]] <== Additionnal informations for advanced developers '''</div>
+
With OOO300 the Aqua port became a mainstream port, so most Aqua issues are handled in regular GSL-Layer childworkspaces instead of dedicated Aqua CWSses. Other CWSses that are purely Aqua specific are being tracked below:
  
<br>
+
* '''{{CWS|ogltrans4mac|DEV300}}''' : Implement the 3D (OpenGL) transitions in Impress ( see :  [[Mac_OS_X_Porting_-_OpenGL_transitions|  OpenGL transitions on Mac OS X ]] )
  
== '''Current Work in progress''' ==
 
  
==='''Developers are working on the following Child workspaces, all Mac OSX dedicated (not integrated )''' ===
 
  
*'''quicklookplugin01''' : This cws provides a plugin for the QuickLook system available in MacOSX from versions 10.5 onwards
+
==='''Child WorkSpaces in development''' ===
  
Concerned modules : extensions scp2
+
* '''{{CWS|appleremote03|DEV300}}''' : use the contextual menu in presentation mode with Impress. preliminary step
  
==='''Closed for development''' ===
+
* '''{{CWS|hotmac|OOO300}}''' : fix memory deallocation problems in exit()
  
*'''[http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Faquavcl05 aquavcl05]''':
+
* '''{{CWS|macosxscanner01|DEV300}}''' (planned)
  
concerned modules : automation avmedia connectivity default_images desktop filter framework
+
All patches that developers have that need testing or peer review should be added here.
  
instsetoo_native jvmfwk lingucomponent officecfg sal sc scp2 sfx2 shell vcl
+
==='''Child WorkSpaces in testing (closed for development)''' ===
  
 +
*'''{{CWS|macmiscfixes}}''' : misc fixes for mac
  
*'''aquafilepicker02''' : replace Carbon native FilePicker with Cocoa native FilePicker
+
*'''{{CWS|maccrashrep}}''' : support crash reporting for OSX builds
  
Concerned module : fpicker
+
*'''{{CWS|quicklookplugin01}}''' : a plugin for the QuickLook system available in MacOSX from versions 10.5 onwards
  
*'''nativeprintdlg01''' : add support for native print dialog
+
==='''Child WorkSpaces waiting for integration''' ===
  
Concerned modules: offapi, vcl, sfx2, svtools, sw
+
* '''{{CWS|appleremote02|DEV300}}''' : improve the Apple Remote use with Impress (use MEDIA_COMMAND stuff, improve code robustness, and portability )
  
==='''Integrated''' ===
+
==='''Child Workspaces integrated into OpenOffice's trunk''' ===
  
Integrated m248
+
A historical overview of [[Aqua_Integrated_CWS | old Aqua specific ChildWorkspaces]].
 
+
*'''macosxdnd''' Drag and Drop for Aqua
+
 
+
Concerned modules : dtrans svtools vcl
+
 
+
Integrated m247
+
 
+
* '''obr07'''
+
 
+
Remove a few Mac OS X specialties
+
 
+
Concerned modules:  desktop instsetoo_native scp2 setup_native solenv sysui vcl
+
 
+
Integrated in m243
+
 
+
*'''stl4leopardppc''' : allow OpenOffice.org to be built on Mac OS X 10.5 PowerPC using system stl, using --without-stlport4 configure option.
+
 
+
If possible, continue with other builds (Leopard / Tiger Intel and PowerPC).
+
 
+
Concerned modules : connectivity, cosv, fpicker, autodoc
+
 
+
*'''[http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Faquavcl04 aquavcl04]''':
+
 
+
concerned modules : desktop vcl rsc shell svx sw solenv instsetoo_native
+
 
+
 
+
Integrated in m239
+
 
+
*'''macosxquicktime01''' : use QTKit for sounds and movies
+
 
+
Concerned modules : avmedia scp2 vcl
+
 
+
 
+
Integrated in m238
+
 
+
*'''macosx24dmg''' : fix bad icon positionning in the mounted disk image ( already Approved by QA )
+
 
+
Concerned module : instsetoo_native
+
 
+
 
+
Integrated in m237
+
 
+
*'''pj86''' : Make module sw warning free on Mac OS X
+
 
+
Concerned modules : sw , solenv
+
 
+
*'''macleopardbuild''' : be Leopard compatible, when building on Tiger
+
 
+
Concerned modules : idlc soltools jvmfwk extensions stlport
+
 
+
Integrated in m233
+
 
+
*'''readme4macintel''' 
+
 
+
concerned module : readlicense_oo
+
 
+
Integrated in m233
+
 
+
*'''aquavcl03''' ( Carbon -> Cocoa migration )
+
 
+
concerned modules are desktop, instsetoo_native, solenv, svtools, vcl
+
 
+
*'''spotlightplugin01''' ( add a new Sportlight plugin )
+
 
+
Concerned modules: extensions, scp2
+
 
+
 
+
Integrated in m229
+
 
+
*'''macaddressbook01'''  (QA in progress )
+
 
+
concerned modules are : scp2, dbaccess, extensions, connectivity
+
 
+
*'''macosxspellchecker'''  :  use Mac OS X spellchecker
+
 
+
Concerned modules: lingucomponent, solenv
+
 
+
*'''aquavclcarbonfixes''' ( Carbon version of Aqua OpenOffice.org ): fix the 5 most important issues.
+
 
+
concerned modules are : desktop, vcl, fpicker, libxmlsec, xmlsecurity, basic
+
 
+
 
+
Integrated in m228
+
 
+
*'''cloph09'''  ( remove X11SDK dependance for Aquabuild )
+
 
+
Concerned modules:  np_sdk
+
 
+
 
+
Integrated in m227
+
 
+
*'''aquaremovescripts''': remove useless Applescripts from Aqua version
+
 
+
concerned module: instsetoo_native
+
 
+
Integrated in m223:
+
 
+
*'''aquavcl02'''
+
 
+
 
+
Integrated in m222 :
+
 
+
*'''aquaremovefondu'''
+
 
+
*macosxdmg23
+
 
+
 
+
Integrated in m221:
+
 
+
*'''aquafilepicker01'''
+
 
+
 
+
 
+
 
+
All patches that developers have that need testing or peer review should be added here.
+
  
 
== '''Known build issues '''==
 
== '''Known build issues '''==
 +
*'''Tiger''':  no known issues
 +
*'''Leopard''': no known issues
 +
*'''Snow Leopard''': no known issues
 +
*'''Lion''': no known issues
 +
*'''Mountain Lion''': no known issues
  
*'''Panther''' build (X11 only) : currently broken ( work in progress )
+
<div align="left" style="color:grey; font-size:12px">[[AquaBuild/Some Background | '''Some Background (what is a CWS, EIS) (click me to know more) ''']]</div>
 
+
Since latest resync, no build issues have been reported.
+
 
+
 
+
*'''Tiger''':  no problem nor for X11 nor Aqua versions (main baseline)
+
 
+
 
+
 
+
*'''Leopard''' Intel : builds OK now. Build is broken in cppu for PowerPC architecture, and builds fine using --without-stlport4 flag
+
 
+
*Native FilePicker is fixed (aquafilepicker02 + pl fixed repaint issue )
+
 
+
*Lot of warnings in vcl, due to other deprecated stuff
+
 
+
 
+
<div align="left" style="color:grey; font-size:12px">[[AquaBuild/Some Background | '''Some Background (what is aquavcl01, EIS) (click me to know more) ''']]</div><br><br>
+
  
 
== '''External links''' ==
 
== '''External links''' ==
 +
* [https://issues.apache.org/ooo Apache OpenOffice Issuezilla] : a database of bugs, changes and enhancements
 +
* There are [[MacOSXPortMeetings | regular meetings]] on IRC (archives are [[Previous_Mac_Meeting_logs | available]]).
 +
* Apache OpenOffice has a complicated code base. [[Source_code_directories | Here]] is an overview.
 +
* the official Apache OpenOffice blog is at [https://blogs.apache.org/OOo/]
 +
* [http://www.cocoadev.com Cocoadev] provides great resources to get up to speed in Cocoa development
 +
* Pierre Chatelier's excellent [http://ktd.club.fr/programmation/objective-c.php Objective C for C++ developers] is available in both english and french versions
 +
* Details about OSX's [http://developer.apple.com/cocoa Cocoa API] are available in the XCode documentation
  
# [http://www.openoffice.org/issues/query.cgi Bug Database]
 
# Mailinglist: [http://porting.openoffice.org/servlets/ProjectMailingListList mac@porting.openoffice.org]  (subscribe is mandatory )
 
# IRC Meeting-Logs (#ooo_macport@freenode.org): [[Previous_Mac_Meeting_logs]] [[MacOSXPortMeetings]]
 
# TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf
 
# OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories
 
# Pavels Patch Wiki: http://blog.janik.cz/
 
# Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb
 
# Sebastien Plisson Wiki: http://splisson.blogspot.com/
 
# Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL
 
# Carbon: http://developer.apple.com/carbon
 
# EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon
 
# Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html
 
# OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper
 
# Nakata Maho's package build service http://ooopackages.good-day.net/pub/OpenOffice.org/MacOSX/
 
 
== '''Screenshots''' ==
 
 
# Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/
 
# Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/
 
# Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10
 
# Important screenshot (eventloop issue): http://blog.janik.cz/images/MacOSX/  => See: OOoMenus-separator-and-disabled_entries.png
 
# current Aqua look (taken from CWS aquavcl05):
 
[[image:Aqualook.png]]
 
 
More menus: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html
 
 
 
 
[[Category:MacOSX]]
 
[[Category:Porting]]
 
[[Category:Development]]
 
 
[[Category:Aqua]]
 
[[Category:Aqua]]
 
[[Category:Build_System]]
 
[[Category:Build_System]]

Latest revision as of 07:38, 18 July 2018

[[{{{PrevPage}}}|< Previous Page

]]

[[{{{NextPage}}}|Next Page
>]]
Documentation note.png These instructions have been DEPRECATED



See Also


Overview

This document explains how to build older OpenOffice source code on Mac OS X systems.

Documentation note.png $SRC_ROOT will denote the directory in which the source code of Apache OpenOffice is stored.
Tip.png You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.


Requirements

To build the office on Mac OS X several requirements/prerequisites have to be fulfilled.

Mandatory Requirements

  • Mac OS X version 10.4 (aka Tiger) or later (if using 10.5 aka Leopard, have a look at User:Dyrcona/LeopardBuild#flex
  • Mac 10.4 SDK
  • XCode version 2.4.1 or any XCode 3. If you want to use a newer version than the one that is shipped with your Mac OS X installation media, you need to register at the Apple Developer Connection site (free of charge) to be able to download it. On Mac OS X 10.6 (Snow Leopard), make sure to install the optional 10.4 SDK with XCode.
  • dmake, the build environment depends currently on a special patched version of dmake that you can download and build on demand during configure and bootstrap. Or you can provide a prebuilt version and can specify it during configure.
  • epm, the build environment depends currently on a special patched version of epm (easy package manager) that you can download and build on demand during configure and bootstrap. Or you can provide a prebuilt version and can specify it during configure.
Documentation note.png {{{1}}}

Optional Requirements

Prebuilt unowinreg.dll

This library is Windows only but will be packed in the Apache OpenOffice SDK to ensure that it is available on all platforms. The library provides some glue code to setup a working UNO environment for UNO client applications connecting to an office and doing some remote automation via API. The library should be stored in main/external/unowinreg. Only necessary for building the SDK.

The library can be downloaded under


Recommended tools

  • ccache

If you intend to build Apache OpenOffice several times, you probably can benefit of ccache since it will speed up your future builds. The first time you make a build with ccache you won't notice it, but the next time the build will go up to five times faster.

You can install it using Fink. It is simply named "ccache". For MacPorts users the package is called "ccache".

If you don't use fink, you can download and build it yourself using the source provided at http://ccache.samba.org/

There are two ways to enable ccache - one is to set environment variables, the other way is to use symlinks.

Using environment variables:

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

Using the symlink approach:

# create a directory for the links 
mkdir ~/bin
# create the symlinks pointing to ccache with the name of the compiler
ln -s /path/to/ccache ~/bin/gcc
ln -s /path/to/ccache ~/bin/g++
ln -s /path/to/ccache ~/bin/cc
ln -s /path/to/ccache ~/bin/c++
# no all you need to enable ccache is to prepend ~/bin to your PATH
$ export PATH=~/bin:$PATH

for both methody, you can add the "export ..." lines to your ~/.profile - that way you don't need to manually set it when building. You can still temporarily disable ccache (export CCACHE_DISABLE=1) in case you don't want to use it.

Since OOo is rather huge, you should increase the cache-size to 1 GB or more

ccache -M 1G
  • subversion version 1.5.4 or later

Since OOo's source code is managed using Subversion currently, you also need the svn client to checkout sources (otherwise you would be bount to source-tarballs that aren't generated that frequently). You can either compile yourself or use the subversion universal binaries from the subversion project Version 1.5.4 or later is required because of important fixes related to the merge-feature.

Get the source and prepare to build it

Get the source from SVN

You need about 4.7 GB for a checkout from the svn repository. Building the source requires another 5GB.

  • check out the latest source from svn
svn co https://svn.apache.org/repos/asf/openoffice/trunk aoo

One-Time preparation and scripts

Apache OpenOffice build environment is configured using the open-source configuration-management package 'autoconf'. So you can do your beloved './configure' command, is now done in the main source directory.

To save the configure parameters and use them with different milestones it is useful to create your own build script to configure the environment and to trigger the build.

The directory structure when you have checked out the sources from svn looks like:

aoo/
aoo/main 
aoo/extras
aoo/test
aoo/ext_libraries
aoo/ext_sources

Move into main and configure a minimal environment to build your first version of Apache OpenOffice:

cd main

Run the autoconf command to prepare a new configure based on the latest changes in configure.in

autoconf

Run configure

./configure --without-stlport --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 --with-epm-url=http://www.msweet.org/files/project2/epm-3.7-source.tar.gz

This commands prepares a minimal environment to build the office without any category-b enabled external libraries. A pure Apache license compatible version. See also the configure switches --with-dmake-path and --with-epm to specify prebuilt versions of dmake or epm.

Finally you should run bootstrap to trigger further preparations and to create platform specific shell script to setup a working build environment. On Mac OS x for example MacOSXX86Env.Set.sh on a Intel based system.

Build environment with enabled category-b dependencies

To prepare a build environment that provides more features and make use of further external libraries which are under copyleft but viral licenses you have to explicitly enable this category-b components.

./configure --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 \
    --with-epm-url=http://www.msweet.org/files/project2/epm-3.7-source.tar.gz \
    --disable-build-mozilla \
    --without-stlport \
    --enable-verbose \
    --enable-category-b\
    --enable-wiki-publisher


Example build script to simplify user specific configurations

As mentioned before to save the configure parameters and use them with different versions it is useful to create your own build script to configure the environment.

Create 'build.sh' (to be written) :

#! /bin/bash

echo "### checking for unowinreg.dll ... "
if [ ! -e  ./external/unowinreg/unowinreg.dll ]; then
    wget -O external/unowinreg/unowinreg.dll http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
else
    echo "  unowinreg.dll found" 
fi

echo "### checking for moz prebuild libs ... "
if [ ! -e  ./moz/zipped/MACOSXGCCIinc.zip ]; then
    wget -O ./moz/zipped/MACOSXGCCIinc.zip http://www.openoffice.org/tools/moz_prebuild/OOo3.2/MACOSXGCCIinc.zip
    wget -O ./moz/zipped/MACOSXGCCIlib.zip http://www.openoffice.org/tools/moz_prebuild/OOo3.2/MACOSXGCCIlib.zip
    wget -O ./moz/zipped/MACOSXGCCIruntime.zip http://www.openoffice.org/tools/moz_prebuild/OOo3.2/MACOSXGCCIruntime.zip
else
    echo "  moz prebuild libs found" 
fi

if [ ! -e  ./configure ]; then
    echo "### autoconf ..."
    autoconf
else
    echo "### autoconf ..."
    rm ./configure
    autoconf
fi

echo "### Configure"
./configure --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz

#./configure --with-build-version="$(date +"%Y-%m-%d %H:%M:%S (%a, %d %b %Y)") - Rev. $(echo $(svn info) | sed -e 's/^.*Last Changed Rev: //g' -e 's/ .*//g')" \
    --disable-build-mozilla \
    --enable-verbose --enable- category-b --enable-minimizer --enable-presenter-console --enable-wiki-publisher \
    --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2 \
    --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz

./bootstrap

Put this script into ~/bin and make sure it is executable :

chmod ug+x ~/bin/build.sh

We used the bash shell in all example, since to our belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description OpenOffice.org's Build Environment.

Doing the build

After running configure and bootstrap we should have a working build environment and all necessary scripts should have been created. From now on you can use MacOSXX86Env.Set.sh to prepare a new shell with a working build environment.

On Mac Intel

source MacOSXX86Env.Set.sh
cd instsetoo_native
build --all 
or
build --all -P4 

On PowerPC

source MacOSXPPCEnv.Set.sh
cd instsetoo_native
build --all 
or
build --all -P2 

Comments on above

TODO TODO TODO ....

if you run into trouble with --dlv_switch (see: Issue 77360 )

The main purpose of the bootstrap script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it's history and manpage have a look here: http://tools.openoffice.org/dmake/index.html

Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for running svdem later on. Here all the Environment-Variables for the Build will be set up. For a detailed description see Environment_Variables. Please note that on Intel machines, 'MacOSXPPCEnv.Set.sh' should be substituted with 'MacOSXX86Env.Set.sh'.

This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours, and 3 to 6 hours on Mac Intel (3:30h on a 2GHz DualCore INTEL iMac). Be patient.

If you want to see how the progress on that build is you can use two build options to get a comfortable view:

build ... <see above> ... --html --html_path /Users/$USER/Sites

where $USER is your user name. Then you can load in Firefox (not Safari!) the HTML file unxmacxi.pro.build.html via the in Mac OS X included Apache web server or diretctly form the directory /Users/$USER/Sites/. This file is automatically being updated and is showing the status of the build and also the time needed since the build started.

If you build on Snow Leopard (aka Mac OS X 10.6): Set DYLD_INSERT_LIBRARIES to point to the correct libsqlite3.dylib:

DYLD_INSERT_LIBRARIES=/usr/lib/libsqlite3.dylib

Installing, preparing and running OpenOffice.org

Find the Bundle

Once the build completed, the final product ( en-US version ) is named : OOo_3.0.0_*_MacOSXIntel_install.dmg ( for version 3.0beta e.g.)

And is located in instsetoo_native/unxmacxi.pro/OpenOffice/dmg/install/en-US directory ( replace en-US with your locale )

Bundle Location3.0beta.jpg

Install the new Build

  • double-click on the *.dmg icon
  • drag the OpenOffice icon into a folder of your choice

Run the new Build

  • double click the application icon in that folder

Screenshots

Now you can start to work with this amazing productivity suite.

Contribute by finding, isolating, debugging or solving issues

Isolate a problem

Reduce a problem

  • make a problem reproducable
  • reduce it to a test case that is as small and simple as possible
  • if a problem is specific to a document then please attach it to the issue. A mininal excerpt of the document that still shows the problem is even better.
  • a screenshot of is a good idea if it clearly shows the problem

Using application switches

Application switches are often valuable for isolating a problem. Most of OpenOffice.org's options can be found its Tools->Options menu.

Some switches are so special that there is no user interface to change them. They are only useful for debugging and isolating a problem, but they are very valuable a that. So a developer might suggest to isolate a problem by setting an environment variable before running the application. E.g. for isolating problems with the menubar a developer might suggest to set the environment variable AQUA_NATIVE_MENUS to false. This is done by typing these commands into a terminal:

  • cd <INSTALL_DIR>/OpenOffice.org/Contents/MacOS
  • export AQUA_NATIVE_MENUS=false
  • ./soffice.bin

Provide a call stack for crash problems

Please note that bugs involving crashes should provide a description of how to reproduce the problem and a callstack. There are several ways to provide the callstack:

  • the preferred method is to use OOo"s builtin crash reporting tool
  • developers may provide a gdb backtrace of the problem
  • if the above two methods don"t work then please attach a file with the details provided by the AppleCrashReporter

Check against known issues

Check the list of open issues

Report a new issue

Report new issues after you have isolated the problem

Debug a problem

Debugging problems is often easier in an development environment:

Please note that XCode still has some problems with the executable named soffice.bin (because of the dot in the name). The issue has been reported to xcode-users list.

Current Work in progress (Aqua specific work only)

With OOO300 the Aqua port became a mainstream port, so most Aqua issues are handled in regular GSL-Layer childworkspaces instead of dedicated Aqua CWSses. Other CWSses that are purely Aqua specific are being tracked below:


Child WorkSpaces in development

All patches that developers have that need testing or peer review should be added here.

Child WorkSpaces in testing (closed for development)

  • CWS quicklookplugin01   : a plugin for the QuickLook system available in MacOSX from versions 10.5 onwards

Child WorkSpaces waiting for integration

  • CWS DEV300 appleremote02   : improve the Apple Remote use with Impress (use MEDIA_COMMAND stuff, improve code robustness, and portability )

Child Workspaces integrated into OpenOffice's trunk

A historical overview of old Aqua specific ChildWorkspaces.

Known build issues

  • Tiger: no known issues
  • Leopard: no known issues
  • Snow Leopard: no known issues
  • Lion: no known issues
  • Mountain Lion: no known issues

External links

Personal tools