aboutsummaryrefslogtreecommitdiff
path: root/README.macosx
blob: 15e1c71cbd0efe16ff05e74c5b931686e302483b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
libextractor on Mac OS X
========================

libextractor has two installation methods on Mac OS X: it can be installed
as a Mac OS X framework or with the standard `./configure; make; make install'
shell commands. The framework package is self-contained, but currently omits
some of the extractor plugins that can be compiled in if libextractor is
installed with ./configure; make; make install' (provided that the required
dependencies exist.)

Installing and uninstalling the framework
=========================================

The binary framework is distributed as a disk image (Extractor-x.x.xx.dmg).
Installation is done by opening the disk image and clicking Extractor.pkg
inside it. The Mac OS X installer application will then run. The framework
is installed to the root volume's /Library/Frameworks folder and installing
will require admin privileges.

The framework can be uninstalled by dragging
/Library/Frameworks/Extractor.framework to Trash.

Using the framework
===================

In the framework, the 'extract' command line tool can be found at 
/Library/Frameworks/Extractor.framework/Versions/Current/bin/extract

The framework can be used in software projects as a framework or as a dynamic
library. 
Framework usage:
>>> hello.c
#include <Extractor/extractor.h>

int main()
{
	EXTRACTOR_ExtractorList *el;
	el = EXTRACTOR_loadDefaultLibraries ();
	EXTRACTOR_removeAll (el);
	return 0;
}
gcc -o hello hello.c -framework Extractor

Dynamic library usage:
>>> hello.c
#include <extractor.h>

int main()
{
	EXTRACTOR_ExtractorList *el;
	el = EXTRACTOR_loadDefaultLibraries ();
	EXTRACTOR_removeAll (el);
	return 0;
}
gcc -I/Library/Frameworks/Extractor.framework/Versions/Current/include -o hello hello.c -L/Library/Frameworks/Extractor.framework/Versions/Current/lib -lextractor

Notice the difference in the #include line.

When using the framework as a dynamic library in projects using autotools,
one would most likely want to add 
"-I/Library/Frameworks/Extractor.framework/Versions/Current/include"
to CPPFLAGS and 
"-L/Library/Frameworks/Extractor.framework/Versions/Current/lib"
to LDFLAGS.