Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Building 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 |
| 11 Optionally, you may want to install the [Ninja](http://martine.github.io/ninja/) | |
| 12 build system (recommended) rather than using your platform-specific build | |
|
dsinclair
2015/10/15 23:53:58
Ninja is shipped in depot_tools, so they should, i
Tom Sepez
2015/10/16 00:09:55
ok
Lei Zhang
2015/10/16 00:14:12
Yep. I may have shipped a few ninja binaries. :)
| |
| 13 system. | |
| 14 | |
| 15 ## Get the code | 11 ## Get the code |
| 16 | 12 |
| 17 ``` | 13 ``` |
| 18 mkdir pdfium | 14 mkdir pdfium |
| 19 cd pdfium | 15 cd pdfium |
| 20 gclient config --name . --unmanaged https://pdfium.googlesource.com/pdfium.git | 16 gclient config --name . --unmanaged https://pdfium.googlesource.com/pdfium.git |
| 21 gclient sync | 17 gclient sync |
| 22 ``` | 18 ``` |
| 23 | 19 |
| 24 ## Generate the build files | 20 ## Generate the build files |
| 25 | 21 |
| 26 Now we use the GYP library to generate the build files. | 22 We use the GYP library to generate the build files. |
| 27 | 23 |
| 28 At this point, you have two options. The first option is to use the [Ninja] | 24 At this point, you have two options. The first option is to use the [Ninja] |
| 29 (http://martine.github.io/ninja/) build system. This is the default as of | 25 (http://martine.github.io/ninja/) build system (also included with the |
| 30 mid-September, 2015. Previously, the second option was the default. Most PDFium | 26 depot_tools checkout). This is the default as of mid-September, 2015. |
| 31 developers use Ninja, as does our [continuous build system] | 27 Previously, the second option (platform-specific build files) was the default. |
| 28 Most PDFium developers use Ninja, as does our [continuous build system] | |
| 32 (http://build.chromium.org/p/client.pdfium/). | 29 (http://build.chromium.org/p/client.pdfium/). |
| 33 | 30 |
| 34 On Windows: `build\gyp_pdfium | 31 * On Windows: `build\gyp\_pdfium` |
| 35 ` For all other platforms: `build/gyp_pdfium | 32 * For all other platforms: `build/gyp\_pdfium` |
| 36 ` | |
| 37 | 33 |
| 38 The second option is to generate platform-specific build files, i.e. Makefiles | 34 The second option is to generate platform-specific build files, i.e. Makefiles |
| 39 on Linux, sln files on Windows, and xcodeproj files on Mac. To do so, set the | 35 on Linux, sln files on Windows, and xcodeproj files on Mac. To do so, set the |
| 40 GYP\_GENERATORS environment variable appropriately (e.g. "make", "msvs", or | 36 GYP\_GENERATORS environment variable appropriately (e.g. "make", "msvs", or |
| 41 "xcode") before running the above command. | 37 "xcode") before running the above command. |
| 42 | 38 |
| 43 ## Building the code | 39 ## Building the code |
| 44 | 40 |
| 45 If you used Ninja, you can build the sample program by: `ninja -C out/Debug | 41 If you used Ninja, you can build the sample program by: `ninja -C out/Debug |
| 46 pdfium_test | 42 pdfium\_test` You can build the entire product (which includes a few unit |
| 47 ` You can build the entire product (which includes a few unit tests) by: `ninja | 43 tests) by: `ninja -C out/Debug`. |
| 48 -C out/Debug | |
| 49 ` | |
| 50 | 44 |
| 51 If you're not using Ninja, then building is platform-specific. | 45 If you're not using Ninja, then building is platform-specific. |
| 52 | 46 |
| 53 On Linux: `make pdfium_test | 47 * On Linux: `make pdfium\_test` |
|
Lei Zhang
2015/10/16 00:14:12
Just drop pdfium_test ?
"make" by itself builds a
dsinclair
2015/10/16 00:41:26
I don't have a linux box to check at the moment. I
| |
| 54 ` | 48 * On Mac: `open build/all.xcodeproj` |
|
Tom Sepez
2015/10/16 00:09:55
nit: Is this code or a description of an action? s
dsinclair
2015/10/16 00:41:25
open is a program on osx. So, open build/all.xcode
| |
| 55 | 49 * On Windows: open build\all.sln |
| 56 On Mac, open build/all.xcodeproj | |
| 57 | |
| 58 On Windows, open build\all.sln | |
| 59 | 50 |
| 60 ## Running the sample program | 51 ## Running the sample program |
| 61 | 52 |
| 62 The pdfium\_test program supports reading, parsing, and rasterizing the pages of | 53 The pdfium\_test program supports reading, parsing, and rasterizing the pages of |
| 63 a .pdf file to .ppm or .png output image files (windows supports two other | 54 a .pdf file to .ppm or .png output image files (windows supports two other |
| 64 formats). For example: `out/Debug/pdfium_test --ppm path/to/myfile.pdf | 55 formats). For example: `out/Debug/pdfium\_test --ppm path/to/myfile.pdf`. Note |
| 65 ` | 56 that this will write output images to `path/to/myfile.pdf.<n>.ppm`. |
| 57 | |
| 58 ## Testing | |
| 59 | |
| 60 There are currently three test suites that can be run: | |
|
Lei Zhang
2015/10/16 00:14:12
There's more...
dsinclair
2015/10/16 00:41:26
Acknowledged.
| |
| 61 | |
| 62 * pdfium\_unittests | |
| 63 * pdfium\_embeddertests | |
| 64 * testing/tools/run_corpus_tests.py | |
|
Tom Sepez
2015/10/16 00:09:55
There's actually more than that. See what the bot
dsinclair
2015/10/16 00:41:25
Done.
| |
| 65 | |
| 66 The corpus tests can have different pixel output on the various platforms so | |
| 67 they are most reliable when executed by the bots. | |
| 66 | 68 |
| 67 ## Waterfall | 69 ## Waterfall |
| 68 | 70 |
| 69 The current health of the source tree can be found at | 71 The current health of the source tree can be found at |
| 70 http://build.chromium.org/p/client.pdfium/console | 72 http://build.chromium.org/p/client.pdfium/console |
| 71 | 73 |
| 74 ## Community | |
| 75 | |
| 76 There are several mailings that are setup: | |
| 77 | |
| 78 * [PDFium](https://groups.google.com/forum/#!forum/pdfium) | |
| 79 * [PDFium Reviews](https://groups.google.com/forum/#!forum/pdfium-reviews) | |
|
Lei Zhang
2015/10/16 00:14:12
Do you want to mention pdfium-reviews and pdfium-b
dsinclair
2015/10/16 00:41:25
Done.
| |
| 80 * [PDFium Bugs](https://groups.google.com/forum/#!forum/pdfium-bugs) | |
| 81 | |
| 72 ## Bugs | 82 ## Bugs |
| 73 | 83 |
| 74 We will be using this | 84 We will be using this |
| 75 [bug tracker](https://code.google.com/p/pdfium/issues/list), but for security | 85 [bug tracker](https://code.google.com/p/pdfium/issues/list), but for security |
| 76 bugs, please use [Chromium's security bug template] | 86 bugs, please use [Chromium's security bug template] |
| 77 (https://code.google.com/p/chromium/issues/entry?template=Security%20Bug) | 87 (https://code.google.com/p/chromium/issues/entry?template=Security%20Bug) |
| 78 and add the "Cr-Internals-Plugins-PDF" label. | 88 and add the "Cr-Internals-Plugins-PDF" label. |
| 79 | 89 |
| 80 ## Contributing code | 90 ## Contributing code |
| 81 | 91 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 104 ``` | 114 ``` |
| 105 git checkout origin/xfa | 115 git checkout origin/xfa |
| 106 git checkout -b merge_branch | 116 git checkout -b merge_branch |
| 107 git branch --set-upstream-to=origin/xfa | 117 git branch --set-upstream-to=origin/xfa |
| 108 git cherry-pick -x <commit hash> | 118 git cherry-pick -x <commit hash> |
| 109 git commit --amend # add Merge to XFA | 119 git commit --amend # add Merge to XFA |
| 110 git cl upload | 120 git cl upload |
| 111 ``` | 121 ``` |
| 112 | 122 |
| 113 Then wait for approval, and `git cl land` | 123 Then wait for approval, and `git cl land` |
| OLD | NEW |