1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Changes to allowed versioned building of Chrome extension that meets new

Chrome extension security requirements
This commit is contained in:
Michael Payne 2012-09-06 08:33:07 -07:00
parent d6d4fc8046
commit 6ca9245a39
6 changed files with 111 additions and 26 deletions

View file

@ -52,7 +52,6 @@ target.all = function() {
// Files that need to be included in every build.
var COMMON_WEB_FILES =
['web/viewer.css',
'web/inline.js',
'web/images',
'web/debugger.js'],
COMMON_WEB_FILES_PREPROCESS =
@ -582,7 +581,9 @@ target.chrome = function() {
defines: defines,
copy: [
[COMMON_WEB_FILES, CHROME_BUILD_CONTENT_DIR + '/web'],
[['extensions/chrome/*.json', 'extensions/chrome/*.html', 'extensions/chrome/*.js'],
[['extensions/chrome/*.json',
'extensions/chrome/*.html',
'extensions/chrome/*.js'],
CHROME_BUILD_DIR],
[BUILD_TARGET, CHROME_BUILD_CONTENT_DIR + BUILD_TARGET],
['external/webL10n/l10n.js', CHROME_BUILD_CONTENT_DIR + '/web']
@ -594,6 +595,10 @@ target.chrome = function() {
};
builder.build(setup);
// Update the build version number
sed('-i', /PDFJSSCRIPT_VERSION/, EXTENSION_VERSION,
CHROME_BUILD_DIR + '/manifest.json');
// Bundle the files to a Chrome extension file .crx if path to key is set
var pem = env['PDFJS_CHROME_KEY'];
if (!pem) {