Difference between revisions of "Getting the source"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (adding link to 2.4.x)
(introduced svn)
Line 2: Line 2:
 
|
 
|
 
''This is describing the latest version. For 2.4, see [[Getting_it_2.4.x]]''
 
''This is describing the latest version. For 2.4, see [[Getting_it_2.4.x]]''
 +
 +
The source code can be fetched in several ways, as described below.
 +
 +
== Downloading the source ==
  
 
The latest version of the source code can be downloaded as tarballs from [http://download.openoffice.org/ Download], see '''Source''' on the right.
 
The latest version of the source code can be downloaded as tarballs from [http://download.openoffice.org/ Download], see '''Source''' on the right.
Line 31: Line 35:
 
|}
 
|}
  
Unpack these tarballs to a directory. They will create a new directory with the name of the milestone, such as '''OOO310_m11'''. This folder will from now on be the '''$SRC_ROOT'''.
+
Unpack these tarballs to a directory. They will create a new directory with the name of the milestone, such as '''OOO310_m11'''. This folder will from now on be the '''$SRC_ROOT''', so set this environment variable to this path on your machine.
  
 
If you intend to build on Linux <strong>without</strong> the '''system''' tarball:
 
If you intend to build on Linux <strong>without</strong> the '''system''' tarball:
** You will need to tell ./configure explicitly to use the system libraries for the software that is otherwise contained in this tarball. Otherwise the build will fail.
+
* You will need to tell ./configure explicitly to use the system libraries for the software that is otherwise contained in this tarball. Otherwise the build will fail.
** System software is in active development. If it has changed significantly (and Mozilla sometimes does), the build may fail or OpenOffice.org may not work correctly.
+
* System software is in active development. If it has changed significantly (and Mozilla sometimes does), the build may fail or OpenOffice.org may not work correctly.
* unowinreg.dll - Do not be fooled by the .dll extension. Without it, the build will fail on Linux and it is not included in the core package. Don't worry about downloading this now because the build process will tell you where to get it and where to stick it to proceed.  
+
* unowinreg.dll - Do not be fooled by the .dll extension. Without it, the build will fail on Linux and it is not included in the core package. Don't worry about downloading this now because the build process will tell you where to get it and where to stick it to proceed.
  
 
For a full build you need them all. For development, <tt>src_core</tt> is usually all you need (but see the caveats for <tt>src_system</tt> above).
 
For a full build you need them all. For development, <tt>src_core</tt> is usually all you need (but see the caveats for <tt>src_system</tt> above).
  
Download them to one directory and unpack them.  Information how to checkout from CVS follows.
+
== Checking out from Subversion ==
 
+
=== Vanilla build ===
+
 
+
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'
+
cvs login
+
(CVS password: anoncvs)
+
cvs co -r <milestone> OpenOffice3
+
 
+
The tool to browse project [http://tools.openoffice.org/source/browse/tools/ source code online] has some [http://tools.openoffice.org/servlets/ProjectSource additional hints].
+
 
+
If you want just to test development releases, you can download already compiled builds from [http://download.openoffice.org/680/]. List of available Mac builds is in [[Mac OS X Development Builds]].
+
 
+
SVN: See also [[OOo and Subversion]]
+
 
+
== 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., [http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Id=5112&logon=true&OpenOnly=false&Section=All 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.
+
 
+
<code>
+
#!/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
+
</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
+
Checking out the source code from the Subversion tree can be done in the following ways.
<code>
+
AFFECTED_MODULES="$(cwsquery -m src680 -c picom modules)"
+
</code>
+
  
You also may use <tt>cwsquery</tt> to obtain the current milestone of the CWS with
+
''' Checking out the trunk (main development branch) '''
<code>
+
BASE_MILESTONE_TAG="SRC680_$(cwsquery -m src680 -c picom current)"
+
</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:
+
svn checkout svn://svn.services.openoffice.org/ooo/trunk
<code>
+
if [ $? -ne 0 ]; then
+
    echo 'cwsquery unsuccessful.'
+
    exit 1
+
fi
+
</code>
+
  
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.
+
The files will be placed in the current directory.
  
External links
+
'''More information:'''<br>
* [http://cedric.bosdonnat.free.fr/wordpress/?p=78 Getting an OOo CWS] Cedric's blog (May 2008)
+
[http://tools.openoffice.org/svn_checkout.html Acessing the source code repository]<br>
 +
[[OOo and Subversion]]
  
 
== See also ==
 
== See also ==

Revision as of 16:28, 3 July 2009

This is describing the latest version. For 2.4, see Getting_it_2.4.x

The source code can be fetched in several ways, as described below.

Downloading the source

The latest version of the source code can be downloaded as tarballs from Download, see Source on the right.

The source is pretty big and has therefore been split into several files.

Tarball Description
OOo_3.x.x_src_core.tar.bz2 The necessary part for each build, the other tarballs depend on this one.
OOo_3.x.x_src_system.tar.bz2 Libraries that usually exist on a standard Linux system. It's not absolutely necessary to build own version on Linux. For a Windows build this package is usually required.
OOo_3.x.x_src_binfilter.tar.bz2 The filters for old binary StarOffice formats
OOo_3.x.x_src_l10n.tar.bz2 Translations of the software for many languages
OOo_3.x.x_src_extensions.tar.bz2 OOo extensions source package
OOo_3.x.x_src_testautomation.tar.bz2 automated test suite (optional)

Unpack these tarballs to a directory. They will create a new directory with the name of the milestone, such as OOO310_m11. This folder will from now on be the $SRC_ROOT, so set this environment variable to this path on your machine.

If you intend to build on Linux without the system tarball:

  • You will need to tell ./configure explicitly to use the system libraries for the software that is otherwise contained in this tarball. Otherwise the build will fail.
  • System software is in active development. If it has changed significantly (and Mozilla sometimes does), the build may fail or OpenOffice.org may not work correctly.
  • unowinreg.dll - Do not be fooled by the .dll extension. Without it, the build will fail on Linux and it is not included in the core package. Don't worry about downloading this now because the build process will tell you where to get it and where to stick it to proceed.

For a full build you need them all. For development, src_core is usually all you need (but see the caveats for src_system above).

Checking out from Subversion

Checking out the source code from the Subversion tree can be done in the following ways.

Checking out the trunk (main development branch)

svn checkout svn://svn.services.openoffice.org/ooo/trunk

The files will be placed in the current directory.

More information:
Acessing the source code repository
OOo and Subversion

See also

Languages:

Personal tools