Installing Barry
Introduction

Barry is a GPL C++ library to interface with USB BlackBerry handheld devices on Linux. This is one of Net Direct Inc.'s (http://www.netdirect.ca) open source projects.

The SourceForge project page can be found at:

http://sourceforge.net/projects/barry/

Barry is currently in early development, but is reaching stages of usefulness. For example, it is possible to:

- retrieve Address Book, Email, Calendar, Service Book, Memos, Tasks, PIN Messages, Saved Email, and Folders
- export Address Book contacts in text or LDAP LDIF format
- make full data backups and restores of your device using a GUI
- synchronize contacts and calendar items using the OpenSync framework (experimental)

Dependencies

You need:

- pkg-config (for configure to autodetect library locations)
- libusb, stable (0.1.x) http://libusb.sourceforge.net/
- openssl (needed for password hashing) http://www.openssl.org/
- boost 1.33 (optional, needed for the serialization library, which you need if you want to save downloads for later uploads to the device, using btool) http://www.boost.org

If building directly from CVS instead of from a release tarball, you also need:

- automake (1.9)
- autoconf (2.61)

If you want to generate doxygen documentation, run 'doxygen' from within the src/ directory. The resulting files will be in doc/doxygen/html/. This has been tested with Doxygen 1.4.5

The top level configure script has two options:

- --enable-gui
- --enable-opensync-plugin

Each option will recurse into the gui/ (Backup application) and opensync-plugin/ directories respectively, and build the subprojects located there automatically. For each of these projects, they have additional dependencies:

GUI:

- gtkmm 2.4 - C++ GTK+ wrapper library
- glademm 2.4 - C++ glade wrapper library
- glibmm 2.4 - C++ glib wrapper library
- libtar 1.2.x - TAR file library
- zlib - compression library
- libbarry itself

Opensync plugin:

- libopensync-0.22 - OpenSync framework library
- sqlite, glib2, and libxml2 - Required by OpenSync
- libbarry itself

Building Barry

If starting from CVS, run `buildgen.sh` with no arguments.

Assuming all dependencies are available, the following commands will build and install Barry on your system, with all available compenents. The doxygen docs will be placed in doc/doxygen/html/.

    	./configure --with-boost=/usr --enable-gui --enable-opensync-plugin
    	make
    	make install
    	cd src && doxygen

This will give you a set of command line tools (bcharge, btool, breset), as well as the backup GUI (barrybackup), and will install the opensync plugin into the system directory for opensync plugins (usually /usr/lib/opensync/plugins). Man pages are available for bcharge and btool.

You can use 'btool' to explore your device from the command line. Use the -h switch for help on its command line options. Some good ones to start with are `-l` to list the devices found, and `-t` to list the Database Database.

Enjoy!

Building Barry RPMs from CVS

Paul Dugas reports on the mailing list that he uses the following steps for building RPMs from CVS:

    	$ cd ~/work
    	$ cvs ... login
    	$ cvs ... co barry
    	$ cd barry
    	$ ./buildgen.sh
    	$ ./configure
    	$ make dist
    	$ rpmbuild -tb barry-0.12.tar.gz --with gui --with opensync

    	I prefer running rpmbuild from the tarball as it's typically the way
    	non-developers would build them.  I have ~/.rpmmacros setting %_topdir
    	to %(echo $HOME)/.rpmbuild so the RPM building can run as me and not
    	root.  The resulting RPMs end up in ~/.rpmbuild/RPMS/x86_64.

Dependency Packages for Common Distros

The following is a list of packages you'll need to install to build Barry, if you are using one of the below common distributions. Other distributions should have similar package names.

Fedora 5 and 6:

Use the yum package manager to install the following:

- pkgconfig
- libusb-devel
- openssl-devel
- boost-devel (optional)
- libtar (libtar-devel on Fedora 6)
- gtkmm24-devel
- glibmm24-devel
- libglademm24-devel
- zlib-devel

Debian stable:

Use the apt-get package manager to install the following:

- pkg-config
- libusb-dev
- libssl-dev
- libboost-serialization-dev
- libtar-dev
- libgtkmm-2.4-dev
- libglibmm-2.4-dev
- libglademm-2.4-dev
- zlib1g-dev

Copyright © 2008 - Net Direct Inc.