Difference between revisions of "Getting the source"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Checking out a CWS through CVS: +1 link)
(fix typos and formatting)
Line 3: Line 3:
 
=== Source code ===
 
=== Source code ===
  
The source code can be downloaded as tarballs, e.g. [http://download.openoffice.org/2.2.1/source.html here for OOo2.2.1]. In case there are newer releases or for developer snapshots please see the [http://download.openoffice.org/ Download Central] ''Development'' section.  The source is huge, so it was split to several files, for newer releases than OOo2.1 substitute OOo_2.1.0_ accordingly:
+
The source code can be downloaded as tarballs, e.g. [http://download.openoffice.org/2.2.1/source.html here for OOo2.2.1]. In case there are newer releases or for developer snapshots please see the [http://download.openoffice.org/ Download Central] ''Development'' section.  The source is huge, so it was split to several files: for newer releases than OOo2.1 substitute OOo_2.1.0_ accordingly:
  
 
* <strong>OOo_2.1.0_src_core.tar.bz2</strong> - the necessary part for each build, the other tarballs depend on this one.
 
* <strong>OOo_2.1.0_src_core.tar.bz2</strong> - the necessary part for each build, the other tarballs depend on this one.
Line 9: Line 9:
 
* OOo_2.1.0_src_l10n.tar.bz2 - translations to other languages than English and German.
 
* OOo_2.1.0_src_l10n.tar.bz2 - translations to other languages than English and German.
 
* OOo_2.1.0_src_sdk.tar.bz2 - OOo SDK (Software Development Kit).
 
* OOo_2.1.0_src_sdk.tar.bz2 - OOo SDK (Software Development Kit).
* OOo_2.1.0_src_system.tar.bz2 - libraries that usually are on a standard Linuxsystem and it's not necessary to build own version on Linux. For a Windows build this package is usually required.
+
* OOo_2.1.0_src_system.tar.bz2 - libraries that usually are on a standard Linux system and it's not necessary to build own version on Linux. For a Windows build this package is usually required.
  
For a full build you need them all. For development, <strong>src_core</strong> is usually all you need.
+
For a full build you need them all. For development, <tt>src_core</tt> is usually all you need.
  
 
Download them to one directory and unpack them.  Information how to checkout from CVS follows.
 
Download them to one directory and unpack them.  Information how to checkout from CVS follows.
Line 17: Line 17:
 
=== Vanilla up-stream ===
 
=== Vanilla up-stream ===
  
You might be interested particulary in the [http://tools.openoffice.org/dev_docs/build_linux.html#GetTheSourceCode Get the source code] section in the build guide (for Linux, but it is quite similar for all the platforms).  
+
You might be interested particularly in the [http://tools.openoffice.org/dev_docs/build_linux.html#GetTheSourceCode Get the source code] section in the build guide.  It is written for Linux, but it is quite similar for all the platforms.
  
 
  export 'CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs'
 
  export 'CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs'
Line 30: Line 30:
 
=== ooo-build ===
 
=== ooo-build ===
  
There are loads of versions of OO.o, and several choices of
+
There are loads of versions of OO.o, and several choices of branch, with multiple outstanding patch sets.
branch, with multiple outstanding patch sets.
+
I recommend you build from up-stream CVS HEAD milestones (SRC680 milestones), with patch sets to make them easier to build from [http://go-ooo.org/packages/SRC680]
I recommend you build from up-stream CVS HEAD milestones
+
(SRC680 milestones), with patch sets to make them easier to
+
build from [http://go-ooo.org/packages/SRC680]
+
  
The very latest ooo-build (a small ~1.5Mb build wrapper) can
+
The very latest ooo-build (a small ~1.5Mb build wrapper) can be got from SVN thus:
be got from SVN thus:
+
  
 
<pre>
 
<pre>
Line 43: Line 39:
 
</pre>
 
</pre>
  
<strong>Note:</strong> You are going to need to download
+
<strong>Note:</strong> You are going to need to download an additional ~150Mb of compressed source, and have ~3Gb
an additional ~150Mb of compressed source, and have ~3Gb
+
of space to unpack and build it in.  
of space to unpack and build it in.
+
 
+
  
 
== Checking out a CWS through CVS ==
 
== Checking out a CWS through CVS ==
Line 58: Line 52:
 
Here is a script.
 
Here is a script.
  
<code>[bash,N]
+
<code>
#!/bin/bash
+
#!/bin/bash
# configure these variables according to the particular CWS
+
# configure these variables according to the particular CWS
AFFECTED_MODULES="basebmp basegfx canvas comphelper cppcanvas \
+
AFFECTED_MODULES="basebmp basegfx canvas comphelper cppcanvas \
 
         desktop filter goodies offapi offuh psprint sal  \
 
         desktop filter goodies offapi offuh psprint sal  \
 
         slideshow solenv testshl2 tools unotools vcl xpdf"
 
         slideshow solenv testshl2 tools unotools vcl xpdf"
BASE_MILESTONE_TAG=SRC680_m222
+
BASE_MILESTONE_TAG=SRC680_m222
CWS_TAG=cws_src680_picom
+
CWS_TAG=cws_src680_picom
 
+
export CVSROOT=':pserver:anoncvs@anoncvs.services.openoffice.org:/cvs'
export CVSROOT=':pserver:anoncvs@anoncvs.services.openoffice.org:/cvs'
+
echo 'Enter the password is anoncvs'
echo 'Enter the password is anoncvs'
+
cvs login
cvs login
+
cvs co -r $BASE_MILESTONE_TAG OpenOffice2
cvs co -r $BASE_MILESTONE_TAG OpenOffice2
+
for d in $AFFECTED_MODULES
for d in $AFFECTED_MODULES
+
do
do
+
 
         echo "updating module $d"
 
         echo "updating module $d"
 
         pushd $d
 
         pushd $d
 
         cvs up -dP -r $CWS_TAG
 
         cvs up -dP -r $CWS_TAG
 
         popd
 
         popd
done
+
done
 
</code>
 
</code>
  
 
'''If''' you have a working [[CWS#cws_config_file_.28.cwsrc.29 | ~/.cwsrc configuration file]] setup '''and''' the SOLARENV environment variable is set to an already existing <tt>solenv</tt> directory of a previously checked out OOo tree, e.g. <code>export SOLARENV="$HOME/ooo/SRC680/src.m222/solenv"</code>, '''and''' <tt>PATH</tt> contains the <tt>solenv/bin</tt> directory, e.g. <code>export PATH="$SOLARENV/bin:$PATH"</code>, '''then''' the list of affected modules may be automatically obtained using
 
'''If''' you have a working [[CWS#cws_config_file_.28.cwsrc.29 | ~/.cwsrc configuration file]] setup '''and''' the SOLARENV environment variable is set to an already existing <tt>solenv</tt> directory of a previously checked out OOo tree, e.g. <code>export SOLARENV="$HOME/ooo/SRC680/src.m222/solenv"</code>, '''and''' <tt>PATH</tt> contains the <tt>solenv/bin</tt> directory, e.g. <code>export PATH="$SOLARENV/bin:$PATH"</code>, '''then''' the list of affected modules may be automatically obtained using
<code>[bash,N]
+
<code>
 
AFFECTED_MODULES="$(cwsquery -m src680 -c picom modules)"
 
AFFECTED_MODULES="$(cwsquery -m src680 -c picom modules)"
 
</code>
 
</code>
  
 
You also may use <tt>cwsquery</tt> to obtain the current milestone of the CWS with
 
You also may use <tt>cwsquery</tt> to obtain the current milestone of the CWS with
<code>[bash,N]
+
<code>
 
BASE_MILESTONE_TAG="SRC680_$(cwsquery -m src680 -c picom current)"
 
BASE_MILESTONE_TAG="SRC680_$(cwsquery -m src680 -c picom current)"
 
</code>
 
</code>
  
 
When scripting this it is a good idea to check the exit code of <tt>cwsquery</tt> commands in case your <tt>~/.cwsrc</tt> is broken or the environment prerequisites aren't met or the EIS database isn't reachable, so add the following after each <tt>cwsquery</tt> command:
 
When scripting this it is a good idea to check the exit code of <tt>cwsquery</tt> commands in case your <tt>~/.cwsrc</tt> is broken or the environment prerequisites aren't met or the EIS database isn't reachable, so add the following after each <tt>cwsquery</tt> command:
<code>[bash,N]
+
<code>
if [ $? -ne 0 ]; then
+
if [ $? -ne 0 ]; then
 
     echo 'cwsquery unsuccessful.'
 
     echo 'cwsquery unsuccessful.'
 
     exit 1
 
     exit 1
fi
+
fi
 
</code>
 
</code>
  
If you already have ~/.cwsrc working and a milestone master build ready and want to work on a CWS based on that milestone see [[Tuning in to a CWS]], which offers a method that does not require to rebuild the entire tree.
+
If you already have <tt>~/.cwsrc</tt> working and a milestone master build ready and want to work on a CWS based on that milestone see [[Tuning in to a CWS]], which offers a method that does not require to rebuild the entire tree.
 
+
  
 
External links
 
External links

Revision as of 22:07, 26 May 2008

Source code

The source code can be downloaded as tarballs, e.g. here for OOo2.2.1. In case there are newer releases or for developer snapshots please see the Download Central Development section. The source is huge, so it was split to several files: for newer releases than OOo2.1 substitute OOo_2.1.0_ accordingly:

  • OOo_2.1.0_src_core.tar.bz2 - the necessary part for each build, the other tarballs depend on this one.
  • OOo_2.1.0_src_binfilter.tar.bz2 - the filters for old binary StarOffice formats.
  • OOo_2.1.0_src_l10n.tar.bz2 - translations to other languages than English and German.
  • OOo_2.1.0_src_sdk.tar.bz2 - OOo SDK (Software Development Kit).
  • OOo_2.1.0_src_system.tar.bz2 - libraries that usually are on a standard Linux system and it's not necessary to build own version on Linux. For a Windows build this package is usually required.

For a full build you need them all. For development, src_core is usually all you need.

Download them to one directory and unpack them. Information how to checkout from CVS follows.

Vanilla up-stream

You might be interested particularly in the Get the source code section in the build guide. It is written for Linux, but it is quite similar for all the platforms.

export 'CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs'
cvs login
(CVS password: anoncvs)
cvs co -r <milestone> OpenOffice2

The tool to browse project source code online has some additional hints.

If you want just to test development releases, you can download already compiled builds from [1]. List of available Mac builds is in Mac OS X Development Builds.

ooo-build

There are loads of versions of OO.o, and several choices of branch, with multiple outstanding patch sets. I recommend you build from up-stream CVS HEAD milestones (SRC680 milestones), with patch sets to make them easier to build from [2]

The very latest ooo-build (a small ~1.5Mb build wrapper) can be got from SVN thus:

svn co http://svn.gnome.org/svn/ooo-build/trunk ooo-build

Note: You are going to need to download an additional ~150Mb of compressed source, and have ~3Gb of space to unpack and build it in.

Checking out a CWS through CVS

This section is a draft!

First, find the CWS name such as picom. Then, lookup the CWS name in EIS (e.g., picom). Notice "Milestone (current)" is m222 (in this example as of time of writing): that is the base milestone. Then, notice the affected modules listed under "Modules & Files."

You will checkout the base milestone from CVS. The convention for base milestone is SRC680_m### (later DEV300_m###?). Then in each affected module (where a module is basically a directory), you will update the module with CVS. The convention for the revision tag for the CWS is cws_src680_####.

Here is a script.

#!/bin/bash
# configure these variables according to the particular CWS
AFFECTED_MODULES="basebmp basegfx canvas comphelper cppcanvas \
        desktop filter goodies offapi offuh psprint sal  \
        slideshow solenv testshl2 tools unotools vcl xpdf"
BASE_MILESTONE_TAG=SRC680_m222
CWS_TAG=cws_src680_picom
export CVSROOT=':pserver:anoncvs@anoncvs.services.openoffice.org:/cvs'
echo 'Enter the password is anoncvs'
cvs login
cvs co -r $BASE_MILESTONE_TAG OpenOffice2
for d in $AFFECTED_MODULES
do
       echo "updating module $d"
       pushd $d
       cvs up -dP -r $CWS_TAG
       popd
done

If you have a working ~/.cwsrc configuration file setup and the SOLARENV environment variable is set to an already existing solenv directory of a previously checked out OOo tree, e.g. export SOLARENV="$HOME/ooo/SRC680/src.m222/solenv", and PATH contains the solenv/bin directory, e.g. export PATH="$SOLARENV/bin:$PATH", then the list of affected modules may be automatically obtained using AFFECTED_MODULES="$(cwsquery -m src680 -c picom modules)"

You also may use cwsquery to obtain the current milestone of the CWS with BASE_MILESTONE_TAG="SRC680_$(cwsquery -m src680 -c picom current)"

When scripting this it is a good idea to check the exit code of cwsquery commands in case your ~/.cwsrc is broken or the environment prerequisites aren't met or the EIS database isn't reachable, so add the following after each cwsquery command:

if [ $? -ne 0 ]; then
   echo 'cwsquery unsuccessful.'
   exit 1
fi

If you already have ~/.cwsrc working and a milestone master build ready and want to work on a CWS based on that milestone see Tuning in to a CWS, which offers a method that does not require to rebuild the entire tree.

External links

See also

Languages:

Personal tools