| OLD | NEW |
| 1 # PDFium | 1 # PDFium |
| 2 | 2 |
| 3 ## News |
| 4 |
| 5 As of 2016-02-04, the XFA branch is deprecated. Instead, see the section on |
| 6 configuration below. |
| 7 |
| 3 ## Prerequisites | 8 ## Prerequisites |
| 4 | 9 |
| 5 Get the chromium depot tools via the instructions at | 10 Get the chromium depot tools via the instructions at |
| 6 http://www.chromium.org/developers/how-tos/install-depot-tools (this provides | 11 http://www.chromium.org/developers/how-tos/install-depot-tools (this provides |
| 7 the gclient utilty needed below). | 12 the gclient utilty needed below). |
| 8 | 13 |
| 9 Also install Python, Subversion, and Git and make sure they're in your path. | 14 Also install Python, Subversion, and Git and make sure they're in your path. |
| 10 | 15 |
| 11 ## Get the code | 16 ## Get the code |
| 12 | 17 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 34 (http://build.chromium.org/p/client.pdfium/). | 39 (http://build.chromium.org/p/client.pdfium/). |
| 35 | 40 |
| 36 * On Windows: `build\gyp_pdfium` | 41 * On Windows: `build\gyp_pdfium` |
| 37 * For all other platforms: `build/gyp_pdfium` | 42 * For all other platforms: `build/gyp_pdfium` |
| 38 | 43 |
| 39 The second option is to generate platform-specific build files, i.e. Makefiles | 44 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 | 45 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 | 46 GYP\_GENERATORS environment variable appropriately (e.g. "make", "msvs", or |
| 42 "xcode") before running the above command. | 47 "xcode") before running the above command. |
| 43 | 48 |
| 49 ### Selecting build configuration |
| 50 |
| 51 PDFium may be built either with or without JavaScript support, and with |
| 52 or without XFA forms support. Both of these features are enabled by |
| 53 default. Also note that the XFA feature requires JavaScript. |
| 54 |
| 55 To build without XFA, set `pdf_enable_xfa=0` before running `gyp_pdfium`. |
| 56 To build without JavaScript, set `pdf_enable_v8=0 pdf_enable_xfa=0` before |
| 57 running `gyp_pdfium`. For example |
| 58 ``` |
| 59 GYP_DEFINES='pdf_enable_v8=0 pdf_enable_xfa=0' build/gyp_pdfium |
| 60 ``` |
| 61 gives the smallest possible build configuration. |
| 62 |
| 44 ### Using goma (Googlers only) | 63 ### Using goma (Googlers only) |
| 45 | 64 |
| 46 If you would like to build using goma, pass `use_goma=1` to `gyp_pdfium`. If | 65 If you would like to build using goma, pass `use_goma=1` to `gyp_pdfium`. If |
| 47 you installed goma in a non-standard location, you will also need to set | 66 you installed goma in a non-standard location, you will also need to set |
| 48 `gomadir`. e.g. | 67 `gomadir`. e.g. |
| 49 | 68 |
| 50 ``` | 69 ``` |
| 51 build/gyp_pdfium -D use_goma=1 -D gomadir=path/to/goma | 70 build/gyp_pdfium -D use_goma=1 -D gomadir=path/to/goma |
| 52 ``` | 71 ``` |
| 53 | 72 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 129 |
| 111 ## Contributing code | 130 ## Contributing code |
| 112 | 131 |
| 113 For contributing code, we will follow | 132 For contributing code, we will follow |
| 114 [Chromium's process](http://dev.chromium.org/developers/contributing-code) | 133 [Chromium's process](http://dev.chromium.org/developers/contributing-code) |
| 115 as much as possible. The main exceptions are: | 134 as much as possible. The main exceptions are: |
| 116 | 135 |
| 117 1. Code has to conform to the existing style and not Chromium/Google style. | 136 1. Code has to conform to the existing style and not Chromium/Google style. |
| 118 2. There is no commit queue, approved committers can land their changes via | 137 2. There is no commit queue, approved committers can land their changes via |
| 119 `git cl land` | 138 `git cl land` |
| 120 3. Changes must be merged to the XFA branch as well (see below). | |
| 121 | 139 |
| 122 ## Branches | 140 ## Branches |
| 123 | 141 |
| 124 There is a branch for a forthcoming feature called XFA that you can get by | 142 Prior to 2016-02-04, there existed an actively developed origin/xfa branch. |
| 125 following the steps above, then: | 143 The origin/xfa branch is now an evolutionary dead-end. Everything you need |
| 144 to build either with or without the XFA feature is on origin/master. |
| 126 | 145 |
| 127 ``` | |
| 128 git checkout origin/xfa | |
| 129 build/gyp_pdfium | |
| 130 ninja -C out/Debug | |
| 131 ``` | |
| 132 | |
| 133 Merging to XFA requires: | |
| 134 | |
| 135 ``` | |
| 136 git checkout origin/xfa | |
| 137 git checkout -b merge_branch | |
| 138 git branch --set-upstream-to=origin/xfa | |
| 139 git cherry-pick -x <commit hash> | |
| 140 git commit --amend # add Merge to XFA | |
| 141 git cl upload | |
| 142 ``` | |
| 143 | |
| 144 Then wait for approval, and `git cl land` | |
| OLD | NEW |