• Home
Name Date Size #Lines LOC

..--

include/libaddressinput/03-May-2024-2,031701

res/03-May-2024-2,4172,374

src/03-May-2024-5,7784,081

test/03-May-2024-3,6922,631

LICENSE.chromiumD03-May-20241.5 KiB2827

READMED03-May-20242.3 KiB7553

grit.gypD03-May-20241.5 KiB5655

gtest.gypD03-May-20241.6 KiB5958

libaddressinput.gypD03-May-20243.6 KiB118117

rapidjson.gypD03-May-2024865 3029

re2.gypD03-May-20241 KiB3837

README

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