]> git.saurik.com Git - apple/cf.git/blob - README_CFLITE
CF-1153.18.tar.gz
[apple/cf.git] / README_CFLITE
1 What is CFLite?
2 **** **** **** **** ****
3
4 CFLite is an open source version of the CoreFoundation framework found on Mac OS X and iOS. It is designed to be simple and portable. For example, it can be used on other platforms to read and write property lists that may come from Mac OS X or iOS.
5
6 It is important to note that this version is not the exact same version as is used on Mac OS X or iOS, but they do share a significant amount of code.
7
8 How to Contact the CFLite Team
9 **** **** **** **** ****
10
11 If you have patches, or enhancement requests, please file a bug report here:
12 https://bugreport.apple.com
13
14 Please include as much detail as possible in your bug report, including platform, compiler, CFLite version, and a test case if appropriate. Mention that the bug should be sent to CoreFoundation in your descriptioon.
15
16
17 Building and Installing CFLite
18 **** **** **** **** ****
19
20 On Mac OS X / Darwin
21 ---- ---- ---- ---- ----
22
23 Use the default Makefile:
24
25 % make
26
27 This will create a CoreFoundation.framework, containing the shared library, header files, and resources. You can link to this library and use it at runtime by setting the DYLD_FRAMEWORK_PATH environment variable. 'man dyld' will give more information about this.
28
29 An application must not link both this version of CFLite and the installed version of CoreFoundation. They are not compatible. CFLite will also not work with Foundation or any higher-level Cocoa framework that depends on the installed CoreFoundation.
30
31 On Linux
32 ---- ---- ---- ---- ----
33
34 First, you will need to fetch a few dependencies of CoreFoundation.
35
36 * clang compiler 2.8 or later
37 http://clang.llvm.org/
38
39 CoreFoundation use the clang compiler to support modern features like Blocks.
40
41 * libBlocksRuntime
42 http://compiler-rt.llvm.org/
43
44 This small shared library supports Blocks at runtime. You will need the 'cmake' utility (http://www.cmake.org/) to build this. It is recommended to install this library in /usr/local/lib and put the headers in /usr/local/include.
45
46 * ICU 4.4 or later (ICU4C, the C version, not ICU4J, the Java version)
47 http://site.icu-project.org/download
48
49 ICU is used for locales, time zones, calendars, and unicode support in CoreFoundation. Again, it is recommended to install this library in /usr/local/lib.
50
51 Once you have the dependencies in place, build CFLite using the Linux Makefile:
52
53 % sudo make -f MakefileLinux install
54
55 This will create and install these files:
56
57 /usr/local/lib/libCoreFoundation.so
58 /usr/local/include/CoreFoundation/<header files>
59 /usr/local/include/TargetConditionals.h
60 /usr/local/share/CoreFoundation/<resource files>
61
62 Make sure to set LD_LIBRARY_PATH environment variable to include /usr/local/lib when using an executable that has linked CFLite.
63
64 On Windows
65 ---- ---- ---- ---- ----
66
67 CFLite does not yet fully support Windows. The primary missing dependency is a version of clang that can build a dynamically linked library (.DLL) that supports the Windows executable format.
68
69 Using CFLite
70 **** **** **** **** ****
71
72 The Mac OS X version of CFLite supports most of the functionality of the full CoreFoundation. The Linux version of CFLite focuses on strings, dates, collections, and other property-list related items.
73
74 There is an example of using CFLite on linux to process property lists in the 'plconvert.c' file.