Skip to content

Commit

Permalink
Require pilot-link >= 0.12.4 for Jpilot
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Wehbring committed Aug 11, 2009
1 parent 3b8761c commit 21ad35a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 722 deletions.
19 changes: 10 additions & 9 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
==============================================================================
Last updated: 23 Nov 2005 by rw
Last updated: 11 Aug 2009 by rw
==============================================================================

=== Web ======================================================================
Expand All @@ -10,7 +10,7 @@ http://www.jpilot.org

=== Documents ================================================================
Be sure to read the docs in the doc directory, or if installed from the RPM
in /usr/share/doc/jpilot-0.99.8/.
in /usr/share/doc/jpilot-1.6.4/.
==============================================================================


Expand All @@ -21,20 +21,21 @@ data just to be on the safe side.


=== Requirements =============================================================
To compile J-Pilot you need to have GTK+ 1.2 or higher installed.
You can find out what version you have by running "gtk-config --version".
GTK+ requires glib. The glib version probably should match the gtk version.
To compile J-Pilot you need to have GTK+ 2.0.3 or higher installed.
You can find out which version you have by running "gtk-config --version".
GTK+ requires glib. The glib version should probably match the gtk version.
You can also do a "glib-config --version".
You can get these tools at http://www.gtk.org

Pilot link must be installed and working.
Pilot-link 0.12.4 or higher must be installed and working.
http://www.pilot-link.org
RedHat users must also have the pilot-link-dev rpm installed for the header
files so that jpilot can compile. You don't need these if you install the
jpilot RPM.

If you want i18n support you should have gettext installed (preferably GNU
gettext). If you don't have, or want it, use "configure --disable-nls"
If you want i18n support you should have gettext 0.16.1 or higher installed
(preferably GNU gettext). If you don't have, or want it,
use "configure --disable-nls"
==============================================================================


Expand All @@ -55,7 +56,7 @@ To make an rpm just do rpm -tb jpilot-{version}.tar.gz
I have added an example plugin Expense to match the palm Expense application.
I have included 2 other plugins:
SyncTime - This sets the time on the pilot from the desktop clock.
KeyRing - KeyRing is a GNU licensed palm application to keep encrypted
KeyRing - KeyRing is a GNU licensed palm application to keep encrypted
passwords and other data.

configure --disable-plugins can be used if plugins aren't desired.
Expand Down
36 changes: 6 additions & 30 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -351,41 +351,17 @@ pl_patch=`$GREP "define PILOT_LINK_PATCH" "$pilot_incl/pi-version.h" | \
$CUT -d " " -f 3 | $SED -e 's/"//g'`
AC_MSG_RESULT([pi-version indicates $pl_version.$pl_major.$pl_minor])

dnl *** check for pilot-link 0.12 and up
dnl *** check for pilot-link 0.12.4 and up

if test $pl_version -eq 0 ; then
if test $pl_major -ge 12 ; then
pl_version_check_done=yes;
AC_MSG_RESULT([pilot-link has USB])
AC_MSG_RESULT([pilot-link has card support (>12.0)])
else
AC_MSG_ERROR([pilot-link version > 0.12.0 is required])
fi
fi

dnl *** In pilot-link 0.12.4 some #defines changed and jpilot's
dnl *** contacts code got merged with pilot-link's contacts code
if test $pl_version -eq 0 ; then
if test $pl_major -ge 12 ; then
if test $pl_minor -ge 4 ; then
AC_MSG_RESULT([pilot-link > 0.12.4 found (jpilot and pilot-link contacts code was merged)])
AC_DEFINE(PILOT_LINK_GT_0_12_4, 1, [ Pilot-link greater than 0.12.4 ])
fi
fi
fi

dnl ***
dnl *** check for broken pilot-links
dnl ***
if test $pl_version -eq 0 ; then
if test $pl_major -eq 12 ; then
if test $pl_minor -eq 0 ; then
if test "$pl_patch" = "-pre2" ; then
AC_MSG_RESULT([pilot-link 0.12.0-pre2 was found])
AC_MSG_ERROR([pilot-link 0.12.0-pre2 is not recommended, \
it has some bugs with not fetching the category app info])
fi
pl_version_check_done=yes;
AC_MSG_RESULT([pilot-link has USB])
AC_MSG_RESULT([pilot-link has card support (>12.0)])
fi
else
AC_MSG_ERROR([pilot-link version >= 0.12.4 is required])
fi
fi

Expand Down
14 changes: 1 addition & 13 deletions contact.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: contact.c,v 1.12 2009/05/29 04:50:58 judd Exp $ */
/* $Id: contact.c,v 1.13 2009/08/11 20:54:20 rikster5 Exp $ */

/*******************************************************************************
* contact.c
Expand Down Expand Up @@ -361,11 +361,7 @@ int copy_address_ai_to_contact_ai(const struct AddressAppInfo *aai, struct Conta

memcpy(&cai->category, &aai->category, sizeof(struct CategoryAppInfo));

#ifdef PILOT_LINK_GT_0_12_4
memset(&cai->internal, '\0', 26);
#else
memset(&cai->unknown1, '\0', 26);
#endif

for (i=0; i<NUM_CONTACT_ENTRIES; i++) {
c_entry = cont_addr_map[i*2];
Expand All @@ -381,20 +377,12 @@ int copy_address_ai_to_contact_ai(const struct AddressAppInfo *aai, struct Conta
}

/* The rest of the labels do not exist in address */
#ifdef PILOT_LINK_GT_0_12_4
if (cai->type==contacts_v10) {
#else
if (cai->version==10) {
#endif
for (i=NUM_CONTACT_ENTRIES; i<NUM_CONTACT_V10_LABELS; i++) {
cai->labels[i][0]='\0';
}
}
#ifdef PILOT_LINK_GT_0_12_4
if (cai->type==contacts_v11) {
#else
if (cai->version==11) {
#endif
for (i=NUM_CONTACT_ENTRIES; i<NUM_CONTACT_V11_LABELS; i++) {
cai->labels[i][0]='\0';
}
Expand Down
Loading

0 comments on commit 21ad35a

Please sign in to comment.