blueZync

Synchronize Bluetooth phone with Thunderbird

Building blueZync

This is the building page for building blueZync out of SVN. See also Building blueZync 0.1.6.

Building blueZync

blueZync currently only builds on Linux.

But see Building blueZync on Windows below, to see the current status of windows porting - and maybe help porting!

Packages

The following packages are needed to build blueZync and the prerequisites (libwbxml, libsyncml, and OpenSync). Install them using your distro's package manager:

Ubuntu
8.04 8.10 9.04 9.10
Debian 4.0 etch Debian 5.0 Lenny openSUSE 11.0
lsb
subversion subversion subversion subversion
cmake cmake cmake cmake
build-essential g++ make
g++
gcc-c++
check check check check-devel
libglib2.0-dev libglib2.0-dev libglib2.0-dev glib2-devel
libexpat1-dev libexpat1-dev libexpat1-dev
libxslt1-dev libxslt1-dev libxslt1-dev libxslt-devel
libopenobex1-dev libopenobex1-dev libopenobex1-dev libopenobex-devel
libsqlite3-dev libsqlite3-dev libsqlite3-dev sqlite3-devel
thunderbird-dev icedove-dev icedove-dev MozillaThunderbird-devel
debian-backports-keyring
sunbird-dev See Debian 4.0 Etch below.
iceowl-dev
See Debian 5.0 Lenny below.
iceowl-dev
See openSUSE below.
MozillaSunbird and devel packages

See also blueZync compatibility

Debian 4.0 Etch

In "Synaptic Package Manager" under Settings -> Repositories -> Third-Party software you need to add: deb http://www.backports.org/debian etch-backports main and then install iceowl-dev.

Also, in the file /usr/lib/pkgconfig/iceowl-xpcom.pc change nspr to iceowl-nspr

Debian 5.0 Lenny

In versions before 5.0.3:

In "Synaptic Package Manager" under Settings -> Repositories -> Third-Party software you need to add: deb ftp://ftp.debian.org/debian sid main and then install iceowl-dev.

You probably want to remove the repository afterwards, to avoid getting hundreds of updates from the sid branch.

openSUSE

openSUSE does not provide a sunbird-devel
Instead, get the header files from ubuntu:

wget ftp://ftp.ubuntu.com/ubuntu/pool/universe/l/lightning-sunbird/sunbird-dev_0.8+nobinonly-0ubuntu1~hardy1_i386.deb
ar -x sunbird-dev_0.8+nobinonly-0ubuntu1~hardy1_i386.deb data.tar.gz
tar -xz -C / -f data.tar.gz 

See also https://sourceforge.net/forum/forum.php?thread_id=2294691&forum_id=748961
msynctool with mozilla-sync does not work, but blueZync from Thunderbird does work

Check out the source

Most of the time, checking out from the head of the SVN should work:

svn co http://svn.opensync.org/plugins/mozilla-sync/trunk mozilla-sync
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/blueZync4thunderbird blueZync4thunderbird
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/utils utils

However, you may want to check the Developers forum for "SVN STATUS" messages, and maybe check out an older revision:

svn co http://svn.opensync.org/plugins/mozilla-sync/trunk mozilla-sync
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/blueZync4thunderbird -r<revision> blueZync4thunderbird
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/utils -r<revision> utils

Generally, you should check Developers forum for messages, in particular "SVN STATUS" messages to get an idea of the stability of the revision you are about to build.

Download and build libsyncml and OpenSync

blueZync needs the following prerequisites:

as well as OpenSync including a number of plugins and tools.

blueZync will NOT work with older versions of those provided by main Linux distibutions, neither will blueZync necessarily work with specific versions offered upstream.

Instead you need to download and install the exact versions that blueZync needs:

cd utils
./download-prereqs.sh
./download-opensync.sh

The versions of libwbxml, libsyncml and OpenSync are defined in common.shinc

Build libsyncml and OpenSync:

./build-install-prereqs.sh
./build-install-opensync.sh

Hopefully, as blueZync, OpenSync, and the prerequisites grow mature, suitable packages can be provided by the Linux distributions.

Build blueZync

./build-install-bluezync.sh

Install the blueZync4thunderbird extension

The easiest way to "install" the extension into Thunderbird is to create a symbolic link from Thunderbird's profile directory to the unpacked extension (substitute the name of your profile directory for 1xy2abcd):

cd ~/.mozilla-thunderbird/1xy2abcd/extensions
ln -s /usr/local/share/blueZync/ThunderbirdExtension blueZync@KaarPoSoft.dk

Test blueZync

Before testing blueZync you must have the Lightning extension installed.

Also, you must define an address-book named __test_abook__ and a calendar named __test_calendar___

That is two underscores in the beginning and end, and one underscore in the middle.
This might look strange, but hopefully nobody have used those names for their own address-books and calendars.

Now you can test blueZync:

./test-bluezync.sh

Problems building build blueZync?

Please see Reporting blueZync bugs

Building blueZync packages

In addition to the abovementioned packages, you must install fakeroot.

Then run

./build-packages.sh

Building blueZync documentation

In addition to the abovementioned packages, you must install doxygen and graphviz.

Then run

svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/doc doc
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/branches/0.1.6/doc doc-0.1.6
cd utils
./build-bluezync-doc.sh

Using blueZync build from SVN

Hint: To use the Thunderbird extension without installing the xpi file, try:
cd /home/xxx/.mozilla-thunderbird/yyyyyyy.default/extensions/
ln -s /usr/local/share/blueZync/ThunderbirdExtension/ blueZync@KaarPoSoft.dk

Building blueZync on Windows

We are in the process of porting blueZync to windows using MinGW - Minimalist GNU for Windows and MSYS - Minimal System.

Most of the work is actually in porting and building the prerequisites for blueZync

Please note that following the instructions below will not yet give you a working windows version of blueZync.
But please try it out, and help us port!

Building blueZync on Windows: MinGW and MSYS

Install MinGW:
cd utils
./build-install-bluezync.sh

(The Automated MinGW Installer is not maintained anymore)

Download and install the MSYS: Minimal System

Download and install the MSYS Developer Tool Kit

Dowload wget: http://downloads.sourceforge.net/mingw/wget-1.9.1-mingwPORT.tar.bz2 and extract wget.exe into /mingw/bin

Download a command line zip program such as: ftp://ftp.info-zip.org/pub/infozip/win32/unz600xn.exe and extract unzip.exe into a windows directory in your path, e.g. c:\windows

Download a SVN command line client such as: http://www.collab.net/servlets/OCNDirector?id=CSVN1.6.5WINC and follow the installation instructions. Copy the .exe and .dll's to mingw/bin

Downloading for windows

Check out the source:
cd blueZync/src
svn co http://svn.opensync.org/plugins/mozilla-sync/trunk mozilla-sync
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/blueZync4thunderbird blueZync4thunderbird
svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/utils utils

Building blueZync on Windows: Installation directories

  • Most precompiled packages are extracted directly in the / root directory of MSYS. So they will install into /bin, /lib, /include, etc. Remember that on MSYS /usr points to /.

Building blueZync on Windows: Installing MSYS packages

cd utils
./download-install-msys-precompiled.sh
./download-msys-prereqs.sh
./build-install-msys-prereqs.sh

Note that ./download-msys-prereqs.sh includes a patch for the check library

Building blueZync on Windows: Download and build libsyncml and OpenSync

Download libwbxml, libsyncml and OpenSync:
cd utils
./download-prereqs.sh
./download-opensync.sh

Build libsyncml and OpenSync

cd utils
./build-install-prereqs.sh
./build-install-opensync.sh

libsyncml may fail to build on Windows, so you may have to check libsyncml out from SVN and build that version.

Note that MinGW expects .dll's to be in .../bin whereas OpenSync installs into /usr/local/lib So:

export PATH="/usr/local/lib:${PATH}"

At this point, OpenSync should be operational, so you should be able to:

osynctool --help
osynctool --listformats
osynctool --listplugins
osynctool --listgroups
... etc

Unfortunately check does not support fork on windows, so it is not possible to run the test cases for OpenSync

Building blueZync on Windows: Mozilla

Canonical build instructions for Mozilla can be found here: http://developer.mozilla.org/en/Build_Documentation

The instructions below will build 3.0b4

Note that blueZync will currently only work with a custom build version of Mozilla as described below, not with the official downloadable installers.

Building blueZync on Windows: Prepare Mozilla build

Download http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.4.exe and install it into C:\mozilla

(This includes a version of MSYS - including some nice prerequisites - but unfortunately it cannot be used to build OpenSync above, as it uses some old versions of prerequisites needed for OpenSync).

Download and install Microsoft Visual C++ 2008
from http://www.microsoft.com/express/download/

Download and install Microsoft Windows SDK for Windows 7 (works for XP and Vista as well) from
http://www.microsoft.com/downloads/details.aspx?familyid=C17BA869-9671-4330-A63E-1FD44E0E2505

Download and install Microsoft Windows Server 2003 R2 Platform SDK from
http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb
(Note that Windows SDK for Windows Server 2008 will not work)

Building blueZync on Windows: Build Mozilla

Download ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0b4/source/thunderbird-3.0b4.source.tar.bz2 and extract into C:\mozilla

Build Thunderbird:

Create C:\mozilla\comm-central\.mozconfig

ac_add_options --enable-application=mail
ac_add_options --disable-static
ac_add_options --disable-libxul
ac_add_options --disable-tests
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-tb-@CONFIG_GUESS@

Build with

make -f client.mk
cd mail\installer
make
make make-sdk

Now do the same for Sunbird:

Create C:\mozilla\comm-central\.mozconfig

ac_add_options --enable-application=calendar
ac_add_options --disable-static
ac_add_options --disable-libxul
ac_add_options --disable-tests
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-sb-@CONFIG_GUESS@

Build with

make -f client.mk
cd calendar\installer
make
make make-sdk

Note that you must build with --disable-static (which is not the default). Otherwise the calendar and addressbook components will not be available for blueZync.

Now extract mozilla into /usr/local:

cd utils
source set-mingw-path.sh
./install-mozilla.sh

Building blueZync on Windows: blueZync

Open an MSDOS command prompt. Navigate to your Visual Studio binary directory, and execute vcvars32.bat, i.e. something like:
cd C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
vcvars32.bat

Now cd into the directory where OpenSync was installed and create a library file

cd c:\msys\1.0\local\lib
lib /def:libopensync.def

(this cannot be done in MSYS, due to the way MSYS converts paths on the command line).

Open an MSYS promt (inside the MSDOS prompt) and build blueZync:

c:\msys\1.0\msys.bat
utils/build-install-bluezync.sh

Building blueZync on Windows: Current status

Linking currently fails...