2009-01-18 22:14:24 +01:00
|
|
|
Synthesis Branch
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Compile and install Synthesis SDK in directory "foo".
|
|
|
|
|
|
|
|
Configure SyncEvolution with
|
|
|
|
SYNTHESIS_CFLAGS=-Ifoo/include SYNTHESIS_LIBS=-Lfoo/lib -lsynthesissdk
|
|
|
|
|
|
|
|
Create a syncevolution.xml config file in the current
|
|
|
|
directory, see src/syncevolution.xml.
|
|
|
|
|
|
|
|
Run syncevolution with LD_LIBRARY_PATH=foo/lib:SDK_PATH/SDK/bin/Linux
|
|
|
|
where SDK_PATH is the installation directory of the official Synthesis
|
|
|
|
SDK (only necessary if .xml config refers to some of those modules).
|
|
|
|
|
|
|
|
Currently none of the SyncEvolution backends are connected to Synthesis,
|
|
|
|
so one has to configure a dummy file backend and use the SDK_textdb.so
|
|
|
|
to handle the data.
|
|
|
|
|
|
|
|
Example config: $ ./syncevolution --print-config --quiet funambol_1
|
|
|
|
|
|
|
|
syncURL = http://my.funambol.com/sync
|
|
|
|
username = xxxx
|
|
|
|
password = yyyy
|
|
|
|
logdir = /tmp
|
|
|
|
useProxy = 1
|
|
|
|
proxyHost = http://proxy.isw.intel.com:911
|
|
|
|
deviceId = sc-pim-3e43622c-2e38-477a-9a9d-29ce45aba78c
|
|
|
|
|
|
|
|
[addressbook]
|
|
|
|
sync = two-way
|
|
|
|
type = file:text/x-calendar:1.0
|
|
|
|
evolutionsource = file:///home/pohly/funambol/addressbook
|
|
|
|
uri = card
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-12 10:48:59 +01:00
|
|
|
Checking out the Source
|
|
|
|
-----------------------
|
|
|
|
|
2008-09-14 19:52:08 +02:00
|
|
|
SyncEvolution is hosted on estamos.de. Anonymous access is
|
|
|
|
via
|
|
|
|
svn checkout http://www.estamos.de/svn/SyncEvolution/trunk
|
|
|
|
|
|
|
|
Before using sources checked out from Subversion, invoke "sh
|
|
|
|
autogen.sh" with appropriate autotools packages installed.
|
|
|
|
|
|
|
|
When running the configure script, it will check out the source of a
|
|
|
|
suitable Funambol client library which will be compiled
|
|
|
|
automatically. There are configure options for using a precompiled
|
|
|
|
Funambol client library or non-default sources - see the "funambol"
|
|
|
|
configure options for details.
|
2006-03-12 10:48:59 +01:00
|
|
|
|
2008-03-24 22:41:20 +01:00
|
|
|
For doing development work the recommended configure line is:
|
2008-09-14 19:52:08 +02:00
|
|
|
configure SYNCEVOLUTION_CXXFLAGS="-Wall -Werror -Wno-unknown-pragmas" \
|
2008-03-24 22:41:20 +01:00
|
|
|
--enable-unit-tests
|
|
|
|
|
|
|
|
In contrast to CXXFLAGS, SYNCEVOLUTION_CXXFLAGS adds these flags only
|
|
|
|
to the compilation of source files from the SyncEvolution source code
|
|
|
|
repository, but not the client library. -Wno-unknown-pragmas is
|
|
|
|
required to avoid warnings triggered by '#pragma }', a trick to
|
|
|
|
preserve indention after 'extern "C" {' in
|
|
|
|
/usr/include/evolution-data-server-1.12/libical/
|
2006-03-12 10:48:59 +01:00
|
|
|
|
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
|
2008-09-14 19:52:08 +02:00
|
|
|
C++ client library. Just emulate the existing
|
2005-11-05 23:04:33 +01:00
|
|
|
code when possible.
|
|
|
|
|
2006-05-26 14:49:19 +02:00
|
|
|
Exceptions derived from std::exception are used to report
|
2008-09-14 19:52:08 +02:00
|
|
|
errors, but not in code which is called from inside the client
|
2006-05-26 14:49:19 +02:00
|
|
|
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
|
|
|
|
2007-04-21 14:33:23 +02:00
|
|
|
SyncEvolution uses the Funambol C++ testing framework (which is
|
|
|
|
based on the previous SyncEvolution testing). Configure with
|
|
|
|
--enable-integration-tests and (optionally) --enable-unit-tests,
|
|
|
|
then run "src/client-test" as described in the C++ client libraries
|
|
|
|
test/README.txt.
|
|
|
|
|
|
|
|
It understands the same environment variables as the C++ client
|
|
|
|
libraries "client-test", among them:
|
2007-06-19 19:36:45 +02:00
|
|
|
- CLIENT_TEST_SERVER = chooses config
|
|
|
|
- CLIENT_TEST_LOG = name of server log file, will be copied and reset
|
|
|
|
after each sync
|
|
|
|
- CLIENT_TEST_FAILURES = comma separated list of tests which are allowed
|
|
|
|
to fail without affecting the return code of the test runner
|
|
|
|
- CLIENT_TEST_ALARM = number of seconds a single test is allowed to run
|
|
|
|
before aborting it
|
|
|
|
- CLIENT_TEST_SOURCES = comma separated list of enabled sources, identified
|
|
|
|
by their name (ical20, vcard21, vcard30, itodo20, text (= memos))
|
2007-04-21 14:33:23 +02:00
|
|
|
|
|
|
|
In addition it supports:
|
|
|
|
- CLIENT_TEST_EVOLUTION_PREFIX=[name|file://<path>] overrides
|
2007-06-19 19:36:45 +02:00
|
|
|
the evolutionsource setting in the configuration; if file:// is used
|
|
|
|
then these database will be created automatically
|
|
|
|
|
|
|
|
Here are step-by-step instructions to get started with testing,
|
|
|
|
using ScheduleWorld as example:
|
|
|
|
- CLIENT_TEST_SERVER=scheduleworld \
|
|
|
|
CLIENT_TEST_EVOLUTION_PREFIX=file:///tmp/testing/ \
|
|
|
|
./client-test -h
|
2008-08-03 22:23:02 +02:00
|
|
|
=> creates ~/.config/syncevolution/scheduleworld_[12]/ configs
|
2007-06-19 19:36:45 +02:00
|
|
|
which use data bases under /tmp/testing, then
|
|
|
|
prints all available tests
|
2008-08-03 22:23:02 +02:00
|
|
|
- edit ~/.config/syncevolution/scheduleworld_[12]/spds/syncml/config.txt
|
2007-06-19 19:36:45 +02:00
|
|
|
and enter account data for ScheduleWorld in both configurations;
|
|
|
|
check that the syncURL is correct
|
|
|
|
- CLIENT_TEST_SERVER=scheduleworld \
|
|
|
|
CLIENT_TEST_EVOLUTION_PREFIX=file:///tmp/testing/ \
|
|
|
|
./client-test Client::Source
|
|
|
|
=> runs alls tests involving just local operations
|
|
|
|
- CLIENT_TEST_SERVER=scheduleworld \
|
|
|
|
CLIENT_TEST_EVOLUTION_PREFIX=file:///tmp/testing/ \
|
|
|
|
./client-test Client::Sync::vcard30::testCopy
|
|
|
|
=> runs one test that checks that one contact can
|
|
|
|
be copied to and from the server using the two
|
|
|
|
configurations
|
|
|
|
- CLIENT_TEST_SERVER=scheduleworld \
|
|
|
|
CLIENT_TEST_EVOLUTION_PREFIX=file:///tmp/testing/ \
|
|
|
|
./client-test Client::Sync
|
|
|
|
=> runs all tests which involve the SyncML server;
|
|
|
|
tests involving just one source are run first,
|
|
|
|
followed by the same tests with all enabled
|
|
|
|
sources in two different orders
|
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
|
2008-09-14 19:52:08 +02:00
|
|
|
are not caused by SyncEvolution or Funambol 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
|
|
|
|
|
|
|
|
|
|
|
Building a Release
|
|
|
|
------------------
|
|
|
|
|
2008-08-29 21:23:54 +02:00
|
|
|
- increase version number in configure-pre.in/AM_INIT_AUTOMAKE
|
2007-03-26 22:35:08 +02:00
|
|
|
- ensure files were updated:
|
2007-07-09 22:24:21 +02:00
|
|
|
./ChangeLog ./NEWS debian/changelog
|
2008-04-17 20:19:03 +02:00
|
|
|
|
2008-08-29 21:12:02 +02:00
|
|
|
To update the ChangeLog file use "./svn2cl.sh". It invokes
|
|
|
|
svn2cl with the right options.
|
|
|
|
|
2008-04-17 20:19:03 +02:00
|
|
|
For prereleases use "old version"+"new prerelease"-1 as
|
|
|
|
package version. That ensures that package versions are
|
|
|
|
higher than the old release, but lower than the final
|
2008-08-29 21:12:02 +02:00
|
|
|
release. Avoid hyphens as part of the release names, i.e.
|
|
|
|
use "0.7+0.8beta1" instead of "0.7+0.8-beta1".
|
2008-04-19 11:11:53 +02:00
|
|
|
|
2006-03-11 20:23:43 +01:00
|
|
|
- make distcheck
|
2007-03-25 22:19:42 +02:00
|
|
|
- compile binary .tar.gz packages for different Evolution versions;
|
|
|
|
done automatically by runtests.py on estamos.de (= Debian 3.0), using different Garnome
|
|
|
|
installations, and with special configure options to ensure maximum
|
2008-09-14 19:52:08 +02:00
|
|
|
portability (LDFLAGS=-Wl,--as-needed --enable-static-cxx)
|
2007-11-08 22:19:59 +01:00
|
|
|
- compile .deb for Maemo
|
|
|
|
- update entries on the web about the release:
|
2008-09-14 19:52:08 +02:00
|
|
|
http://maemo.org/downloads/product/OS2008/syncevolution/
|
2007-11-08 22:19:59 +01:00
|
|
|
http://www.estamos.de/blog/wp-admin
|
|
|
|
http://www.estamos.de/projects/SyncEvolution/Roadmap.html
|
2008-01-13 00:22:43 +01:00
|
|
|
http://freshmeat.net/projects/syncevolution/
|
2007-11-08 22:19:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
Compiling for Maemo
|
|
|
|
-------------------
|
2008-08-17 10:50:42 +02:00
|
|
|
unpack source archive in Scratchbox (for maximum compatibility: use Chinook 4.0
|
2007-03-25 22:19:42 +02:00
|
|
|
rootstrap; for support of all backends: ensure that the EDS-DBus calendar dev packages
|
|
|
|
are installed),
|
2008-04-20 14:38:19 +02:00
|
|
|
DEB_BUILD_OPTIONS=maemo fakeroot dpkg-buildpackage
|
2007-04-15 15:41:56 +02:00
|
|
|
NOTE: dpkg-buildpackage -rfakeroot does *not* work as it leads to strange problems executing a.out
|
|
|
|
during the client-src configure.
|
2007-03-25 22:19:42 +02:00
|
|
|
|
|
|
|
Maemo EDS-DBus calendar dev packages /etc/apt/source.list:
|
2008-08-17 10:50:42 +02:00
|
|
|
deb http://maemo.o-hand.com/packages chinook/
|
2007-10-04 22:54:27 +02:00
|
|
|
|
2007-11-08 22:19:59 +01:00
|
|
|
|
|
|
|
Compiling for iPhone
|
|
|
|
--------------------
|
|
|
|
Requires iPhone toolchain and a libcurl compiled for the iPhone.
|
|
|
|
libcurl is ideally configured as small as possible
|
2007-10-04 22:54:27 +02:00
|
|
|
and statically (to avoid packaging problems):
|
|
|
|
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --disable-shared \
|
|
|
|
--disable-crypto-auth --without-gnutls --without-ssl --without-zlib \
|
|
|
|
--without-libssh2 --disable-ipv6 --disable-manual --disable-telnet \
|
|
|
|
--disable-tftp --disable-ldap --disable-file --disable-ftp
|
|
|
|
manually set HAVE_POSIX_STRERROR_R in lib/config.h
|
|
|
|
|
|
|
|
Potential problems with toolchain:
|
|
|
|
std++ not found: ln -s libstdc++.6.dylib /usr/local/iphone-filesystem/usr/lib/libstdc++.dylib
|
|
|
|
AddressBook framework must be added to iphone-dev/include/install-headers.sh.in
|
|
|
|
|
|
|
|
Compile with curl-config in the PATH:
|
2008-09-14 19:52:08 +02:00
|
|
|
PATH=/usr/local/iphone/bin/:$PATH ~/projects/SyncEvolution/trunk/configure --host=arm-apple-darwin --with-funambol-src=/home/patrick/projects/native CXXFLAGS=-O0 --disable-ecal --disable-ebook --enable-addressbook --prefix=/usr
|
2007-10-07 21:24:54 +02:00
|
|
|
PATH=/usr/local/iphone/bin/:$PATH make all
|
|
|
|
|
|
|
|
Build a package with:
|
|
|
|
make distbin BINSUFFIX="iphone"
|
|
|
|
|
2007-11-08 22:19:59 +01:00
|
|
|
Compiling for Mac OS X
|
|
|
|
----------------------
|
|
|
|
|
2008-07-12 20:43:17 +02:00
|
|
|
Configuring for development:
|
2008-09-14 19:52:08 +02:00
|
|
|
<path>/configure --with-funambol-src=<path> \
|
2008-07-12 20:43:17 +02:00
|
|
|
--enable-addressbook \
|
|
|
|
SYNCEVOLUTION_CXXFLAGS="-Wall -Werror -Wno-unknown-pragmas" \
|
2008-08-29 23:27:27 +02:00
|
|
|
LDFLAGS="-framework Addressbook -framework CoreServices" \
|
2008-07-12 20:43:17 +02:00
|
|
|
CXXFLAGS=-g \
|
|
|
|
CFLAGS=-g
|
2008-01-13 00:22:43 +01:00
|
|
|
|
2008-07-12 20:43:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
Compiling final release:
|
2008-01-13 00:22:43 +01:00
|
|
|
./configure --enable-addressbook \
|
|
|
|
CXXFLAGS="-O -g -arch i386 -arch ppc" \
|
|
|
|
CFLAGS="-O -g -arch i386 -arch ppc" \
|
2008-08-29 23:27:27 +02:00
|
|
|
LDFLAGS="-arch i386 -arch ppc -framework Addressbook -framework CoreServices" \
|
|
|
|
--disable-dependency-tracking
|
2008-07-14 20:40:52 +02:00
|
|
|
make BINSUFFIX=mac-os-x distbin
|
2008-01-13 00:22:43 +01:00
|
|
|
|
2007-11-08 22:19:59 +01:00
|
|
|
Fine-grained memory checking:
|
|
|
|
MallocStackLogging=1 MallocStackLoggingNoCompact=1 \
|
|
|
|
MallocScribble=1 MallocPreScribble=1 MallocGuardEdges=1 \
|
|
|
|
MallocCheckHeapStart=1 MallocCheckHeapEach=100
|
|
|
|
|
2007-10-07 21:24:54 +02:00
|
|
|
|
2007-12-06 19:53:30 +01:00
|
|
|
Debugging
|
|
|
|
---------
|
|
|
|
|
|
|
|
The following packages contain debug information for
|
|
|
|
relevant libraries on Ubuntu 7.10:
|
|
|
|
evolution-data-server-dbg libglib2.0-0-dbg evolution-dbg
|