Jon !

Blog personnel de Jon

Archive for the ‘go-oo’ Category

How to install the SDK and compile the C++ examples on MacOS Intel

leave a comment »

This post is a MacOS oriented Hello-world based of this wiki page http://wiki.services.openoffice.org/wiki/SDKInstallation. You can have it in French also http://wiki.services.openoffice.org/wiki/FR/Documentation/Installation_du_SDK.

DocumentLoader

Good news, to start extending OpenOffice using UNO , like create components or extensions, you don’t necessary need to go trough a full build of the source code (I will talk later about the process) which take once start 6h30 on my MacBook Pro. Today, let’s be lazy.

  1. Requirements
  2. Get the SDK
    http://openoffice.cict.fr/stable/3.1.0/OOo-SDK_3.1.0_MacOSXIntel_install_en-US.dmg and you can drag and drop anywhere, that does not matter.
  3. Test the SDK
    Open a terminal (Terminal.app or Iterm.app), look for the OpenOffice.org3.1_SDK folder :

    cd <....>/OpenOffice.org3.1_SDK
    #-- And set the environment. Follow the instruction, nothing special here, just some settings.
    ./setsdkenv_unix
    #-- You will need to execute this command each time you want to work with the SDK.
    #-- Now go to examples :
    cd examples/cpp/DocumentLoader
    #-- and build
    make
    #-- A few set of instruction will be displayed at the end of the build, Let's follow them. First start OpenOffice
    soffice "-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager" &
    #-- and execute :
    make DocumentLoader.run

    If everything went fine, you should see a new document, with the content of OpenOffice.org3.1_SDK/examples/cpp/DocumentLoader/test.odt.

Just enjoy, you can now extend OpenOffice with the SDK. For more information,  continue your reading on this page : http://wiki.services.openoffice.org/wiki/SDKInstallation.

Publicités

Written by Jonathan

juin 3, 2009 at 1:10

Publié dans en, go-oo