commit | 4cba97a86f2ae4ed47f0ec7fc4f5c25b6b5b5a5b | [log] [tgz] |
---|---|---|
author | Matthieu Darbois <mayeut@users.noreply.github.com> | Tue Apr 11 17:54:49 2017 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Tue Apr 11 17:54:49 2017 +0000 |
tree | cc5d3a3a90f5bf1c860b9851183979cc610d5f04 | |
parent | e6e62c33d2d2dfeb51103a2c28f03669a82a8849 [diff] | |
parent | 6abb30cb5b39d91e39ae85be5fbd83a0ddefd49e [diff] |
Backport 734d57d5f7842aa7c2c9f36d62131ab4d8bd6c87 from libopenjpeg20 am: 3e2c4b9394 am: 68ef92134c am: fdc91d98d6 am: a3c495c1ca am: f2f4cb09b7 am: 03bf2131b0 am: 147b756996 -s ours am: d93ebe91d1 am: 991b2d236a am: 7f6148da14 am: 8b4a216420 am: 6abb30cb5b Change-Id: I58bf6ab17a8c66033660b2614c33e93026fb161c
Get the chromium depot tools via the instructions at http://www.chromium.org/developers/how-tos/install-depot-tools (this provides the gclient utilty needed below).
Also install Python, Subversion, and Git and make sure they're in your path.
The name of the top-level directory does not matter. In our examples, we use "repo". This directory must not have been used before by gclient config
as each directory can only house a single gclient configuration.
mkdir repo cd repo gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git gclient sync cd pdfium
We use the GYP library to generate the build files.
At this point, you have two options. The first option is to use the [Ninja] (http://martine.github.io/ninja/) build system (also included with the depot_tools checkout). This is the default as of mid-September, 2015. Previously, the second option (platform-specific build files) was the default. Most PDFium developers use Ninja, as does our [continuous build system] (http://build.chromium.org/p/client.pdfium/).
build\gyp_pdfium
build/gyp_pdfium
The second option is to generate platform-specific build files, i.e. Makefiles on Linux, sln files on Windows, and xcodeproj files on Mac. To do so, set the GYP_GENERATORS environment variable appropriately (e.g. "make", "msvs", or "xcode") before running the above command.
If you would like to build using goma, pass use_goma=1
to gyp_pdfium
. If you installed goma in a non-standard location, you will also need to set gomadir
. e.g.
build/gyp_pdfium -D use_goma=1 -D gomadir=path/to/goma
If you used Ninja, you can build the sample program by: ninja -C out/Debug pdfium_test
You can build the entire product (which includes a few unit tests) by: ninja -C out/Debug
.
If you're not using Ninja, then building is platform-specific.
make pdfium_test
open build/all.xcodeproj
The pdfium_test program supports reading, parsing, and rasterizing the pages of a .pdf file to .ppm or .png output image files (windows supports two other formats). For example: out/Debug/pdfium_test --ppm path/to/myfile.pdf
. Note that this will write output images to path/to/myfile.pdf.<n>.ppm
.
There are currently several test suites that can be run:
It is possible the tests in the testing
directory can fail due to font differences on the various platforms. These tests are reliable on the bots. If you see failures, it can be a good idea to run the tests on the tip-of-tree checkout to see if the same failures appear.
The current health of the source tree can be found at http://build.chromium.org/p/client.pdfium/console
There are several mailing lists that are setup:
Note, the Reviews and Bugs lists are typically read-only.
We will be using this bug tracker, but for security bugs, please use [Chromium's security bug template] (https://code.google.com/p/chromium/issues/entry?template=Security%20Bug) and add the "Cr-Internals-Plugins-PDF" label.
For contributing code, we will follow Chromium's process as much as possible. The main exceptions are:
git cl land
There is a branch for a forthcoming feature called XFA that you can get by following the steps above, then:
git checkout origin/xfa build/gyp_pdfium ninja -C out/Debug
Merging to XFA requires:
git checkout origin/xfa git checkout -b merge_branch git branch --set-upstream-to=origin/xfa git cherry-pick -x <commit hash> git commit --amend # add Merge to XFA git cl upload
Then wait for approval, and git cl land