blob: b1260dfd5dc9fdf130e6beaf11950bdc157f5ccc [file] [log] [blame]
Linus Walleij0dd71e92006-05-04 18:47:07 +00001Building and Installing
2-----------------------
Linus Walleij6fd2f082006-03-28 07:19:22 +00003
Linus Walleij0dd71e92006-05-04 18:47:07 +00004See the "INSTALL" file.
5
6
7Heritage
8--------
9
10libmtp 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 Walleijfcf88912006-06-05 13:23:33 +000029 on before libmtp. When Linus took Richards initial port
Linus Walleij0dd71e92006-05-04 18:47:07 +000030 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
36Compiling programs for libmtp
37-----------------------------
38
39libmtp has support for the pkg-config script by adding a libmtp.pc
40entry in $(prefix)/lib/pkgconfig. To compile a libmtp program,
41"just" write:
42
43gcc -o foo `pkg-config --cflags --libs libmtp` foo.c
44
45This also simplifies compilation using autoconf and pkg-config: just
46write e.g.
47
48PKG_CHECK_MODULES(MTP, libmtp)
49AC_SUBST(MTP_CFLAGS)
50AC_SUBST(MTP_LIBS)
51
52To have libmtp LIBS and CFLAGS defined. Needless to say, this will
53only work if you have pkgconfig installed on your system, but most
54people have nowadays.
55
56If your library is installed in e.g. /usr/local you may have to tell
57this to pkgconfig by setting the PKG_CONFIG_PATH thus:
58
59export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
60
61
62Documentation
63-------------
64
65Read the API documentation that can be generated with doxygen.
66It will be output in doc/html if you have Doxygen properly
67installed. (It will not be created unless you have Doxygen!)
68
69For information about the Media Transfer Protocol, see:
70http://en.wikipedia.org/wiki/Media_Transfer_Protocol
71
72
73Contributing
74------------
75
76See the project page at http://libmtp.sourceforge.net/
77We always need your help.
Linus Walleij6fd2f082006-03-28 07:19:22 +000078
Linus Walleijfcf88912006-06-05 13:23:33 +000079If you happen upon a device which libmtp claims it cannot
80autodetect, please submit the vendor ID and device ID
81as a bug, patch or feature request on the Sourceforge
82bug tracker at our homepage.
83
Linus Walleij6fd2f082006-03-28 07:19:22 +000084
Linus Walleij3c16fe42006-04-30 07:53:41 +000085Calendar support:
86-----------------
Linus Walleijd3bdf762006-02-20 22:21:56 +000087
Linus Walleij3c16fe42006-04-30 07:53:41 +000088The Creative Zen series can read VCALENDAR2 (.ics) files
89from programs with the following limitations/conditions:
Linus Walleijd3bdf762006-02-20 22:21:56 +000090
Linus Walleij3c16fe42006-04-30 07:53:41 +000091- The file must be in DOS (CR/LF) format, use the unix2dos
92 program to convert if needed
93- Repeat events do not seem to be supported, entries will
94 only appear once.
95- Files should be stored in the folder "My Organizer" when
Linus Walleij80b2c722006-06-22 17:57:17 +000096 sent to the device (this directory should be autodetected
97 for use with calendar files, otherwise use the option
98 -f "My Organizer" to sendfile for this)