mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Using pdfjs-dist as a library for b2g viewer.
This commit is contained in:
parent
1da0b3a363
commit
1b847df2f3
8 changed files with 400 additions and 240 deletions
28
make.js
28
make.js
|
@ -979,7 +979,8 @@ target.mozcentral = function() {
|
|||
};
|
||||
|
||||
target.b2g = function() {
|
||||
target.locale();
|
||||
target.generic();
|
||||
target.components();
|
||||
|
||||
echo();
|
||||
echo('### Building B2G (Firefox OS App)');
|
||||
|
@ -991,9 +992,11 @@ target.b2g = function() {
|
|||
cd(ROOT_DIR);
|
||||
rm('-Rf', B2G_BUILD_DIR);
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR);
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR + BUILD_DIR);
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR + '/web');
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR + '/web/cmaps');
|
||||
// Simulating pdfjs-dist structure in the pdfjs-components folder.
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR + '/pdfjs-components/web');
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR + '/pdfjs-components/build');
|
||||
mkdir('-p', B2G_BUILD_CONTENT_DIR + '/pdfjs-components/cmaps');
|
||||
|
||||
var setup = {
|
||||
defines: defines,
|
||||
|
@ -1001,14 +1004,21 @@ target.b2g = function() {
|
|||
['extensions/b2g/images', B2G_BUILD_CONTENT_DIR + '/web'],
|
||||
['extensions/b2g/viewer.html', B2G_BUILD_CONTENT_DIR + '/web'],
|
||||
['extensions/b2g/viewer.css', B2G_BUILD_CONTENT_DIR + '/web'],
|
||||
['extensions/b2g/viewer.js', B2G_BUILD_CONTENT_DIR + '/web'],
|
||||
['web/locale', B2G_BUILD_CONTENT_DIR + '/web'],
|
||||
['external/bcmaps/*', B2G_BUILD_CONTENT_DIR + '/web/cmaps'],
|
||||
['external/webL10n/l10n.js', B2G_BUILD_CONTENT_DIR + '/web']
|
||||
['build/generic/build/pdf.js',
|
||||
B2G_BUILD_CONTENT_DIR + '/pdfjs-components/build'],
|
||||
['build/generic/build/pdf.worker.js',
|
||||
B2G_BUILD_CONTENT_DIR + '/pdfjs-components/build'],
|
||||
['build/components/pdf_viewer.js',
|
||||
B2G_BUILD_CONTENT_DIR + '/pdfjs-components/web'],
|
||||
['build/components/pdf_viewer.css',
|
||||
B2G_BUILD_CONTENT_DIR + '/pdfjs-components/web'],
|
||||
['build/components/images',
|
||||
B2G_BUILD_CONTENT_DIR + '/pdfjs-components/web'],
|
||||
['external/bcmaps/*', B2G_BUILD_CONTENT_DIR + '/pdfjs-components/cmaps']
|
||||
],
|
||||
preprocess: [
|
||||
['web/viewer.js', B2G_BUILD_CONTENT_DIR + '/web'],
|
||||
[BUILD_TARGETS, B2G_BUILD_CONTENT_DIR + BUILD_DIR]
|
||||
]
|
||||
preprocess: []
|
||||
};
|
||||
builder.build(setup);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue