Linus Walleij | 0dd71e9 | 2006-05-04 18:47:07 +0000 | [diff] [blame] | 1 | Building and Installing |
| 2 | ----------------------- |
Linus Walleij | 6fd2f08 | 2006-03-28 07:19:22 +0000 | [diff] [blame] | 3 | |
Linus Walleij | 0dd71e9 | 2006-05-04 18:47:07 +0000 | [diff] [blame] | 4 | See the "INSTALL" file. |
| 5 | |
| 6 | |
| 7 | Heritage |
| 8 | -------- |
| 9 | |
| 10 | libmtp is based on several ancestors: |
| 11 | |
| 12 | * libptp2 by Mariusz Woloszyn was the starting point used |
| 13 | by Richard A. Low for the initial starter port. You can |
| 14 | find it at http://libptp.sourceforge.net/ |
| 15 | |
| 16 | * libgphoto2 by Mariusz Woloszyn and Marcus Meissner was |
| 17 | used at a later stage since it was (is) more actively |
| 18 | maintained. libmtp tracks the PTP implementation in |
| 19 | libgphoto2 and considers it an upstream project. We will |
| 20 | try to submit anything generally useful back to libgphoto2 |
| 21 | and not make double efforts. In practice this means we |
| 22 | use ptp.c, ptp.h and ptp-pack.c verbatim from the libgphoto2 |
| 23 | source code. If you need to change things in these files, |
| 24 | make sure it is so general that libgphoto2 will want to |
| 25 | merge it to their codebase too. You find libgphoto2 as part |
| 26 | of gPhoto: http://gphoto.sourceforge.net/ |
| 27 | |
| 28 | * libnjb was a project that Richard and Linus were working |
Linus Walleij | fcf8891 | 2006-06-05 13:23:33 +0000 | [diff] [blame] | 29 | on before libmtp. When Linus took Richards initial port |
Linus Walleij | 0dd71e9 | 2006-05-04 18:47:07 +0000 | [diff] [blame] | 30 | and made an generic C API he re-used the philosophy and |
| 31 | much code from libnjb. Many of the sample programs are for |
| 32 | example taken quite literally from libnjb. You find it here: |
| 33 | http://libnjb.sourceforge.net/ |
| 34 | |
| 35 | |
| 36 | Compiling programs for libmtp |
| 37 | ----------------------------- |
| 38 | |
| 39 | libmtp has support for the pkg-config script by adding a libmtp.pc |
| 40 | entry in $(prefix)/lib/pkgconfig. To compile a libmtp program, |
| 41 | "just" write: |
| 42 | |
| 43 | gcc -o foo `pkg-config --cflags --libs libmtp` foo.c |
| 44 | |
| 45 | This also simplifies compilation using autoconf and pkg-config: just |
| 46 | write e.g. |
| 47 | |
| 48 | PKG_CHECK_MODULES(MTP, libmtp) |
| 49 | AC_SUBST(MTP_CFLAGS) |
| 50 | AC_SUBST(MTP_LIBS) |
| 51 | |
| 52 | To have libmtp LIBS and CFLAGS defined. Needless to say, this will |
| 53 | only work if you have pkgconfig installed on your system, but most |
| 54 | people have nowadays. |
| 55 | |
| 56 | If your library is installed in e.g. /usr/local you may have to tell |
| 57 | this to pkgconfig by setting the PKG_CONFIG_PATH thus: |
| 58 | |
| 59 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig |
| 60 | |
| 61 | |
| 62 | Documentation |
| 63 | ------------- |
| 64 | |
| 65 | Read the API documentation that can be generated with doxygen. |
| 66 | It will be output in doc/html if you have Doxygen properly |
| 67 | installed. (It will not be created unless you have Doxygen!) |
| 68 | |
| 69 | For information about the Media Transfer Protocol, see: |
| 70 | http://en.wikipedia.org/wiki/Media_Transfer_Protocol |
| 71 | |
| 72 | |
| 73 | Contributing |
| 74 | ------------ |
| 75 | |
| 76 | See the project page at http://libmtp.sourceforge.net/ |
Linus Walleij | ee73ef2 | 2006-08-27 19:56:00 +0000 | [diff] [blame] | 77 | We always need your help. There is a mailinglist and a |
| 78 | bug report system there. |
Linus Walleij | 6fd2f08 | 2006-03-28 07:19:22 +0000 | [diff] [blame] | 79 | |
Linus Walleij | fcf8891 | 2006-06-05 13:23:33 +0000 | [diff] [blame] | 80 | If you happen upon a device which libmtp claims it cannot |
| 81 | autodetect, please submit the vendor ID and device ID |
| 82 | as a bug, patch or feature request on the Sourceforge |
| 83 | bug tracker at our homepage. |
| 84 | |
Linus Walleij | 6fd2f08 | 2006-03-28 07:19:22 +0000 | [diff] [blame] | 85 | |
Linus Walleij | 15def33 | 2006-09-19 14:27:02 +0000 | [diff] [blame] | 86 | Calendar and contact support: |
| 87 | ----------------------------- |
Linus Walleij | d3bdf76 | 2006-02-20 22:21:56 +0000 | [diff] [blame] | 88 | |
Linus Walleij | 3c16fe4 | 2006-04-30 07:53:41 +0000 | [diff] [blame] | 89 | The Creative Zen series can read VCALENDAR2 (.ics) files |
Linus Walleij | 15def33 | 2006-09-19 14:27:02 +0000 | [diff] [blame] | 90 | and VCard (.vcf) files from programs like for example |
| 91 | Evolution with the following limitations/conditions: |
Linus Walleij | d3bdf76 | 2006-02-20 22:21:56 +0000 | [diff] [blame] | 92 | |
Linus Walleij | 3c16fe4 | 2006-04-30 07:53:41 +0000 | [diff] [blame] | 93 | - The file must be in DOS (CR/LF) format, use the unix2dos |
| 94 | program to convert if needed |
Linus Walleij | 15def33 | 2006-09-19 14:27:02 +0000 | [diff] [blame] | 95 | |
| 96 | - Repeat events in calendar files do not seem to be supported, |
| 97 | entries will only appear once. |
| 98 | |
| 99 | - Calendar (.ics) files should be stored in the folder "My Organizer" |
| 100 | when sent to the device (this directory should be autodetected |
Linus Walleij | 80b2c72 | 2006-06-22 17:57:17 +0000 | [diff] [blame] | 101 | for use with calendar files, otherwise use the option |
Linus Walleij | 15def33 | 2006-09-19 14:27:02 +0000 | [diff] [blame] | 102 | -f "My Organizer" to sendfile for this) Apparently this file can |
| 103 | also contain tasklists. |
| 104 | |
| 105 | - Contact (.vcf) files should be stored in the folder "My Contacts" |
| 106 | when sent to the device. (-f "My Contacts") |
| 107 | |
| 108 | - Some devices are picky about the name of the calendar and |
| 109 | contact files. For example the Zen Microphoto wants: |
| 110 | |
Linus Walleij | b1318d1 | 2006-09-25 14:59:26 +0000 | [diff] [blame] | 111 | Calendar: My Organizer/6651416.ics |
| 112 | Contacts: My Organizer/6651416.vcf |
| 113 | |
| 114 | |
| 115 | Syncing in with Evolution and Creative Devices |
| 116 | ---------------------------------------------- |
| 117 | |
| 118 | Evolution can easily export .ics an .vcf files, but you currently |
| 119 | need some command-line hacking to get you stuff copied over in |
| 120 | one direction host -> device. The examples/ directory contains a script |
| 121 | created for the Creative Zen Microphoto by Nicolas Tetreault. |
| 122 | |
Linus Walleij | 6e8cef4 | 2006-12-03 20:45:04 +0000 | [diff] [blame^] | 123 | |
| 124 | It's Not Our Bug! |
| 125 | ----------------- |
| 126 | |
| 127 | Some MTP devices have strange pecularities. We try to work around |
| 128 | these whenever we can, sometimes we cannot work around it or we |
| 129 | cannot test your solution. |
| 130 | |
| 131 | * The Zen Vision:M (possibly more Creative Zens) has a firmware bug |
| 132 | that makes it drop the last two characters off a playlist name. |
| 133 | It is fixed in later firmware. |
| 134 | |
| 135 | * The iRiver devices (possibly all of them) cannot handle the |
| 136 | enhanced GetObjectPropList MTP command (0x9805) properly. So |
| 137 | they have been banned from using it. |
| 138 | |
| 139 | * The Samsung Yepp T9 has several strange characteristics, some |
| 140 | that we've managed to work around. (For example it will return |
| 141 | multiple PTP packages in a single transaction.) |
| 142 | |
| 143 | * Very few devices that implement GetObjectPropList (0x9805) will |
| 144 | return the entire object list if you request a list for object |
| 145 | 0xffffffffu. (But they should.) So we're currently not using |
| 146 | that feature. |