2006-03-12 10:48:59 +01:00
|
|
|
Checking out the Source
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
SyncEvolution is hosted at sf.net. If you want to work
|
|
|
|
on the code, just let me know what your SF account is
|
|
|
|
and I can provide access to the developers CVS. The
|
|
|
|
anonymous CVS mirrors the sources automatically, but
|
2006-03-12 11:10:44 +01:00
|
|
|
sometimes is lacking a bit behind. Before using sources
|
|
|
|
checked out from CVS, invoke "sh autogen.sh" with
|
|
|
|
appropriate autotools packages installed.
|
2006-03-12 10:48:59 +01:00
|
|
|
|
|
|
|
The most recent version of the Sync4j C++ client library
|
|
|
|
is available from CVS, checkout the "3x" module from the CVS at
|
|
|
|
http://forge.objectweb.org/projects/sync4j
|
|
|
|
You'll need the files in 3x/client-api/native.
|
|
|
|
|
2006-08-06 17:48:20 +02:00
|
|
|
Also note that some of the patches in the
|
|
|
|
3x/client-api/native/.patches directory might be needed for
|
|
|
|
SyncEvolution to compile and work correctly. See
|
|
|
|
3x/client-api/native/README for more information about those patches
|
|
|
|
and SyncEvolution's NEWS file for some information which client
|
|
|
|
library is compatible.
|
|
|
|
|
2006-03-12 10:48:59 +01:00
|
|
|
The recommended way to make that library available is by
|
|
|
|
installing it into its own directory with shared libraries disabled:
|
|
|
|
configure --prefix=<dir> --disable-shared; make; make install
|
|
|
|
and then pointing the configure of SyncEvolution towards it:
|
|
|
|
configure --with-sync4j=<dir> --disable-shared
|
|
|
|
Shared versions of the libraries are not recommended at the moment
|
|
|
|
because the client libraries API is not expected to be stable.
|
|
|
|
|
|
|
|
Alternatively SyncEvolution can work with a source snapshot of
|
|
|
|
the client library directly:
|
|
|
|
configure --with-sync4j-src=<dir>
|
|
|
|
where <dir> points towards the contents of the 3x/client-api/native
|
|
|
|
directory. This mode is required to generate source distributions
|
|
|
|
because those are meant to contain a copy of the client library
|
|
|
|
code.
|
|
|
|
|
|
|
|
|
2006-03-11 20:23:43 +01:00
|
|
|
Working with the Code
|
|
|
|
---------------------
|
|
|
|
|
2005-11-05 23:04:33 +01:00
|
|
|
The code follows the code formatting of the Funambol
|
|
|
|
Sync4j C++ client library. Just emulate the existing
|
|
|
|
code when possible.
|
|
|
|
|
2006-05-26 14:49:19 +02:00
|
|
|
Exceptions derived from std::exception are used to report
|
|
|
|
errors, but not in code which is called from inside the Sync4j
|
|
|
|
library because that library does not handle exceptions for compatibility
|
2005-11-05 23:04:33 +01:00
|
|
|
reasons. In that case special case must be taken to not
|
|
|
|
forget that an error occurred (EvolutionSyncSource::m_hasFailed).
|
2006-05-26 14:49:19 +02:00
|
|
|
This is done in in EvolutionSyncSource wrapper functions
|
|
|
|
which call the real functions which then may throw exceptions.
|
|
|
|
The EvolutionSyncSource::handleException() function deals with
|
|
|
|
logging the exception.
|
2005-11-05 23:04:33 +01:00
|
|
|
|
|
|
|
"make check" in the src directory compiles and runs unit
|
|
|
|
tests. Those tests were written inside the CppUnit
|
|
|
|
[http://cppunit.sourceforge.net/cppunit-wiki] framework
|
|
|
|
and so they (and just they) require that "cppunit-config"
|
2006-01-21 16:52:40 +01:00
|
|
|
is in the shell search path. Before running them, setup
|
|
|
|
your Evolution and ~/.sync4j configuration as described
|
|
|
|
in the README section 'Exchanging Data' (create address
|
2006-03-11 20:23:43 +01:00
|
|
|
books 'SyncEvolution test #1/2', etc).
|
2005-11-05 23:04:33 +01:00
|
|
|
|
2006-04-24 20:49:03 +02:00
|
|
|
Running the test with the environment variable TEST_EVOLUTION_LOG
|
2005-12-11 18:13:36 +01:00
|
|
|
set to the server's log file ensures that for each
|
|
|
|
individual sync session both the client and the corresponding
|
|
|
|
server log are stored in individual files in the src
|
|
|
|
directory. The filenames are derived from the tests and
|
|
|
|
the steps executed for each of them.
|
|
|
|
|
2006-04-24 20:49:03 +02:00
|
|
|
The basic configuration is chosen via TEST_EVOLUTION_SERVER;
|
|
|
|
the default is "localhost".
|
|
|
|
|
|
|
|
If the server needs a certain delay between syncs, that
|
|
|
|
can be set via TEST_EVOLUTION_DELAY=<seconds>. The Sync4j
|
|
|
|
2.3 server needs a delay of around 20 seconds to work
|
|
|
|
correctly.
|
|
|
|
|
2006-01-21 18:13:42 +01:00
|
|
|
The first parameter of the "test" program can be used
|
|
|
|
to select specific tests, like this:
|
2006-04-24 20:49:03 +02:00
|
|
|
./TestEvolution ContactSync::testItems
|
2006-01-21 18:13:42 +01:00
|
|
|
|
2005-11-05 23:04:33 +01:00
|
|
|
"make valgrind" runs the same tests inside valgrind
|
|
|
|
[http://www.valgrind.org]. A suppression file is
|
|
|
|
used to hide errors inside system libraries which
|
2006-03-11 20:23:43 +01:00
|
|
|
are not caused by SyncEvolution or Sync4j C++
|
2005-11-05 23:04:33 +01:00
|
|
|
library code. Most likely the suppressions will only
|
|
|
|
work on Debian GNU/Linux 3.1 ("Sarge") - feel free
|
|
|
|
to add more for your system.
|
2006-03-11 20:23:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
CVS
|
|
|
|
---
|
|
|
|
|
|
|
|
Please add your changes to the ChangeLog file. The
|
|
|
|
Emacs vc-update-change-log = C-x v a command collects
|
|
|
|
the latest CVS commit messages and adds them automatically.
|
|
|
|
|
|
|
|
|
|
|
|
Building a Release
|
|
|
|
------------------
|
|
|
|
|
|
|
|
- increase version number in configure.in/AM_INIT_AUTOMAKE
|
|
|
|
- ensure ChangeLog and NEW are up-to-date
|
|
|
|
- make distcheck
|
|
|
|
- compile binary packages
|