• Home
  • History
  • Annotate
  • only in /external/chromium_org/third_party/libaddressinput/src/cpp/
NameDateSize

..12-Mar-20154 KiB

grit.gyp12-Mar-20151.5 KiB

gtest.gyp12-Mar-20151.6 KiB

include/12-Mar-20154 KiB

libaddressinput.gyp12-Mar-20152.4 KiB

libaddressinput.gypi12-Mar-20153.1 KiB

LICENSE.chromium12-Mar-20151.5 KiB

rapidjson.gyp12-Mar-2015865

re2.gyp12-Mar-2015903

README12-Mar-20152.7 KiB

res/12-Mar-20154 KiB

src/12-Mar-20154 KiB

test/12-Mar-20154 KiB

README

1Intro
2=====
3
4The C++ version of libaddressinput library provides UI layout information and
5validation for address input forms.
6
7The library does not provide a UI. The user of the library must provide the user
8interface that uses libaddressinput. The user of the library must also provide a
9way to store data on disk and download data from the internet.
10
11The first client of the library is Chrome web browser. This motivates not
12providing UI or networking capabilities. Chrome will provide those.
13
14When including the library in your project, you can override the dependencies
15and include directories in libaddressinput.gypi to link with your own
16third-party libraries.
17
18Dependencies
19============
20
21The library depends on these tools and libraries:
22
23GYP: Generates the build files.
24Ninja: Executes the build files.
25GTest: Used for unit tests.
26Python: Used by GRIT, which generates localization files.
27RE2: Used for validating postal code format.
28
29Most of these packages are available on Debian-like distributions. You can
30install them with this command:
31
32$ sudo apt-get install gyp ninja-build libgtest-dev python libre2-dev
33
34Make sure that your version of GYP is at least 0.1~svn1395. Older versions of
35GYP do not generate the Ninja build files correctly. You can download a
36new-enough version from http://packages.ubuntu.com/saucy/gyp.
37
38Make sure that your version of RE2 is at least 20140111+dfsg-1. Older versions
39of RE2 don't support set_never_capture() and the packages don't provide shared
40libraries.
41
42If your distribution does not include the binary packages for the dependencies,
43you can download them from these locations:
44
45http://packages.ubuntu.com/saucy/gyp
46http://packages.ubuntu.com/saucy/ninja-build
47http://packages.ubuntu.com/saucy/libgtest-dev
48http://packages.ubuntu.com/saucy/python
49http://packages.ubuntu.com/utopic/libre2-1
50http://packages.ubuntu.com/utopic/libre2-dev
51
52Alternatively, you can download, build, and install these tools and libraries
53from source code. Their home pages contain information on how to accomplish
54that.
55
56https://code.google.com/p/gyp/
57http://martine.github.io/ninja/
58https://code.google.com/p/googletest/
59http://python.org/
60https://code.google.com/p/re2/
61
62Build
63=====
64
65Building the library involves generating an out/Default/build.ninja file and
66running ninja:
67
68$ export GYP_GENERATORS='ninja'
69$ gyp --depth .
70$ ninja -C out/Default
71
72Overriding paths defined in the *.gyp files can be done by setting the
73GYP_DEFINES environment variable before running gyp:
74
75$ export GYP_DEFINES="gtest_dir='/xxx/include' gtest_src_dir='/xxx'"
76
77Test
78====
79
80This command will execute the unit tests for the library:
81
82$ out/Default/unit_tests
83
84Discussion
85==========
86
87Do you need help with libaddressinput?
88https://groups.google.com/forum/#!forum/libaddressinput-discuss
89