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

From Apache OpenOffice Wiki
Jump to: navigation, search
('''Doing the build (about 4,5 GB)''')
('''Installing, preparing and running OpenOffice.org''')
Line 107: Line 107:
  
  
== '''Installing, preparing and running OpenOffice.org''' ==
 
  
===''' Find the Bundle''' ===
 
 
Once the build completed, the Final product ( en-US version ) is named :  OpenOffice.org-2.3.0_en-US.dmg ( for version 2.3.0 e.g.)
 
 
And is located in instsetoo_native/unxmacxi.pro/OpenOffice/install/en-US  directory ( replace en-US with your locale )
 
 
[[Image:Bundle_location.jpg]]
 
 
<br><br>
 
 
=== '''Run the soffice.bin''' ===
 
 
 
 
In one line :
 
 
<big>'''Double click the .dmg , drag the OpenOffice.org icon in the folder you want, and double click to run it !!'''</big>
 
 
 
Note : soffice.bin leads XCode to not work (because of the dot in the name). The issue has been reported to xcode-users list.
 
 
We're nearly through, let's fire-off the binary:
 
 
 
But a lot has to be done, and if you want to trace (using gdb e.g.), just do:
 
 
cd <INSTALL_DIR>/OpenOffice.org\ 2.3.app/Contents/MacOS
 
 
and run:
 
 
gdb --args soffice.bin
 
 
(add any breakpoint you want)
 
 
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>
 
  <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 :
 
http://www.go-oo.org/patches/src680/disable-recovery.diff
 
 
This patch is outdated, but you can make the modifications yourself.
 
 
 
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:
 
 
{| border="1" cellpadding="15" cellspacing="0"
 
|-
 
! 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 and contribute ''' ==
 
== '''Debug and contribute ''' ==

Revision as of 21:11, 9 September 2007

WARNING: Important modifications of the current page in progress


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.


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.

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: OpenOffice.org Build Environment.


Prerequisites

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).

Mandatory

Mac OS X version

=> 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.

X11SDK (soon optional)

A dependency for Mozilla plugin needs some prototype defined in some Xlib.h header.

Please note, this dependency is not needed in runtime, but only at buildtime.

X11SDK.pkg archive is located in your Tiger's DVD, and has to be installed in the case of you're using Mozilla prebuild archives

This issue should be fixed soon: a fix is scheduled in cloph09 cws

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 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.

Needed for Milestone build

prebuilt Mozilla archives

For the Milstone build, you'll have to put the prebuild archives of mozilla binaries in moz/zipped directory after renaming them properly.

URL : http://tools.openoffice.org/moz_prebuild/680/

Note: archives are Universal Binaries, and yo'll have to rename them, depending on your architecture (eithe Intel or PowerPC)

Strongly recommended

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 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/

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:

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

Now choose one ...


See AquaBuild/Milestone for Aqua build with current milestone


See AquaBuild/AquaPortCocoa for advanced developers (Cocoa version, crashy, buggy and not complete)











Debug and contribute

Want to add a module into aquavcl03 cws ?

If you have changes and/or modifications in another module, a developer with correct rights will add it in the list.

See AquaPortCocoa for more informations

Important links or Cocoa development

Cocoadev

Pierre Chatelier page about C++ to Cocoa conversion

Note: .pdf available in both english and french versions. Excellent.

Current Work in progress (not integrated )

Developers are working on the following Child workspaces (Mac OSX dedicated) :

  • macosxspellchecker  : use Mac OS X spellchecker

Concerned modules: lingucomponent, solenv

  • cloph09 ( remove X11SDK dependance for Aquabuild )
  • aquavclcarbonfixes ( Carbon version of Aqua OpenOffice.org ): fix the 5 most important issues.

concerned modules are : desktop, vcl

  • aquavcl03 ( Carbon -> Cocoa migration )

concerned modules are desktop, instsetoo_native, solenv, svtools, vcl

  • macaddressbook01 (QA in progress )

concerned modules are : scp2, dbaccess, extensions, connectivity

  • aquaremovescripts (nominated) :

concerned module: instsetoo_native

  • readme4macintel (status: undefined):

concerned module : readlicense_oo

Work in progress:

  • macosxdnd

Concerned mmodule is dtrans ( Drag and Drop )

Integrated in m226

  • aquaremovescripts

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

  • Panther build (X11 only) : currently broken ( work in progress )

Since latest resync, no build issues have been reported.


  • Tiger: no problem nor for X11 nor Aqua versions (main baseline)


  • Leopard (Intel only, because no PowerPC developer ): build broken, but Carbon and Cocoa version work already. Java is not found, but using a working preferences files, everything Java works ( seems to be only Java detection fails ). Native FilePicker needs some work.

Lot of warnings in vcl, due to other deprecated stuff

External links

  1. Bug Database
  2. Mailinglist: mac@porting.openoffice.org (subscribe is mandatory )
  3. IRC Meeting-Logs (#ooo_macport@freenode.org): Previous_Mac_Meeting_logs MacOSXPortMeetings
  4. TX20: http://eric.bachard.free.fr/UTBM_TX20/reports/Carbon_vcl.pdf
  5. OpenOffice Source Directory Structure: http://wiki.services.openoffice.org/wiki/Source_code_directories
  6. Pavels Patch Wiki: http://blog.janik.cz/
  7. Eric Bachard Wiki: http://wiki.services.openoffice.org/wiki/User:Ericb
  8. Sebastien Plisson Wiki: http://splisson.blogspot.com/
  9. Christian Lippka Wiki: http://wiki.services.openoffice.org/wiki/User:CL
  10. Carbon: http://developer.apple.com/carbon
  11. EIS: http://eis.services.openoffice.org/EIS2/servlet/Logon
  12. Runtime Configuration: http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html
  13. OpenOffice Domain Developer http://wiki.services.openoffice.org/wiki/DomainDeveloper

Screenshots

  1. Eric Bachard screenshots (some are from Stephan Schaefer) http://eric.bachard.free.fr/mac/aquavcl/screenshots/
  2. Most recent: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/
  3. Pavel Janik screenshots http://blog.janik.cz/images/MacOSX/2006-08-10
  4. Important screenshot (eventloop issue): http://blog.janik.cz/images/MacOSX/ => See: OOoMenus-separator-and-disabled_entries.png
  5. Aqua look (the begining):

combobox_search_and_replace02_14mars07.jpg

More menus: http://eric.bachard.free.fr/mac/aquavcl/screenshots/aqua_menus_05_nov_06/index.html

Personal tools