OLD | NEW |
1 # PDFium | 1 # PDFium |
2 | 2 |
3 ## Prerequisites | 3 ## Prerequisites |
4 | 4 |
5 Get the chromium depot tools via the instructions at | 5 Get the chromium depot tools via the instructions at |
6 http://www.chromium.org/developers/how-tos/install-depot-tools (this provides | 6 http://www.chromium.org/developers/how-tos/install-depot-tools (this provides |
7 the gclient utilty needed below). | 7 the gclient utilty needed below). |
8 | 8 |
9 Also install Python, Subversion, and Git and make sure they're in your path. | 9 Also install Python, Subversion, and Git and make sure they're in your path. |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 We use the GYP library to generate the build files. | 27 We use the GYP library to generate the build files. |
28 | 28 |
29 At this point, you have two options. The first option is to use the [Ninja] | 29 At this point, you have two options. The first option is to use the [Ninja] |
30 (http://martine.github.io/ninja/) build system (also included with the | 30 (http://martine.github.io/ninja/) build system (also included with the |
31 depot\_tools checkout). This is the default as of mid-September, 2015. | 31 depot\_tools checkout). This is the default as of mid-September, 2015. |
32 Previously, the second option (platform-specific build files) was the default. | 32 Previously, the second option (platform-specific build files) was the default. |
33 Most PDFium developers use Ninja, as does our [continuous build system] | 33 Most PDFium developers use Ninja, as does our [continuous build system] |
34 (http://build.chromium.org/p/client.pdfium/). | 34 (http://build.chromium.org/p/client.pdfium/). |
35 | 35 |
36 * On Windows: `build\gyp\_pdfium` | 36 * On Windows: `build\gyp_pdfium` |
37 * For all other platforms: `build/gyp\_pdfium` | 37 * For all other platforms: `build/gyp_pdfium` |
38 | 38 |
39 The second option is to generate platform-specific build files, i.e. Makefiles | 39 The second option is to generate platform-specific build files, i.e. Makefiles |
40 on Linux, sln files on Windows, and xcodeproj files on Mac. To do so, set the | 40 on Linux, sln files on Windows, and xcodeproj files on Mac. To do so, set the |
41 GYP\_GENERATORS environment variable appropriately (e.g. "make", "msvs", or | 41 GYP\_GENERATORS environment variable appropriately (e.g. "make", "msvs", or |
42 "xcode") before running the above command. | 42 "xcode") before running the above command. |
43 | 43 |
44 ## Building the code | 44 ## Building the code |
45 | 45 |
46 If you used Ninja, you can build the sample program by: `ninja -C out/Debug | 46 If you used Ninja, you can build the sample program by: `ninja -C out/Debug |
47 pdfium\_test` You can build the entire product (which includes a few unit | 47 pdfium_test` You can build the entire product (which includes a few unit |
48 tests) by: `ninja -C out/Debug`. | 48 tests) by: `ninja -C out/Debug`. |
49 | 49 |
50 If you're not using Ninja, then building is platform-specific. | 50 If you're not using Ninja, then building is platform-specific. |
51 | 51 |
52 * On Linux: `make pdfium\_test` | 52 * On Linux: `make pdfium_test` |
53 * On Mac: `open build/all.xcodeproj` | 53 * On Mac: `open build/all.xcodeproj` |
54 * On Windows: open build\all.sln | 54 * On Windows: open build\all.sln |
55 | 55 |
56 ## Running the sample program | 56 ## Running the sample program |
57 | 57 |
58 The pdfium\_test program supports reading, parsing, and rasterizing the pages of | 58 The pdfium\_test program supports reading, parsing, and rasterizing the pages of |
59 a .pdf file to .ppm or .png output image files (windows supports two other | 59 a .pdf file to .ppm or .png output image files (windows supports two other |
60 formats). For example: `out/Debug/pdfium\_test --ppm path/to/myfile.pdf`. Note | 60 formats). For example: `out/Debug/pdfium_test --ppm path/to/myfile.pdf`. Note |
61 that this will write output images to `path/to/myfile.pdf.<n>.ppm`. | 61 that this will write output images to `path/to/myfile.pdf.<n>.ppm`. |
62 | 62 |
63 ## Testing | 63 ## Testing |
64 | 64 |
65 There are currently several test suites that can be run: | 65 There are currently several test suites that can be run: |
66 | 66 |
67 * pdfium\_unittests | 67 * pdfium\_unittests |
68 * pdfium\_embeddertests | 68 * pdfium\_embeddertests |
69 * testing/tools/run\_corpus\_tests.py | 69 * testing/tools/run\_corpus\_tests.py |
70 * testing/tools/run\_javascript\_tests.py | 70 * testing/tools/run\_javascript\_tests.py |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ``` | 125 ``` |
126 git checkout origin/xfa | 126 git checkout origin/xfa |
127 git checkout -b merge_branch | 127 git checkout -b merge_branch |
128 git branch --set-upstream-to=origin/xfa | 128 git branch --set-upstream-to=origin/xfa |
129 git cherry-pick -x <commit hash> | 129 git cherry-pick -x <commit hash> |
130 git commit --amend # add Merge to XFA | 130 git commit --amend # add Merge to XFA |
131 git cl upload | 131 git cl upload |
132 ``` | 132 ``` |
133 | 133 |
134 Then wait for approval, and `git cl land` | 134 Then wait for approval, and `git cl land` |
OLD | NEW |