Bug 740795 part C - Don't ship pdf.js as an extension, build changes, r=ted
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 18 May 2012 12:42:01 -0400
changeset 96824 d50e4a17308b13c66ad800483fe9b69f304f9a5d
parent 96823 ffaf38d1e36d9eab5532b4ea20f48103cc96da27
child 96825 b6d88d5947835a10f9819154824ad2a45137f6e1
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs740795
milestone15.0a1
Bug 740795 part C - Don't ship pdf.js as an extension, build changes, r=ted
browser/Makefile.in
browser/extensions/Makefile.in
browser/extensions/pdfjs/LICENSE
browser/extensions/pdfjs/README.mozilla
browser/extensions/pdfjs/bootstrap.js
browser/extensions/pdfjs/components/PdfStreamConverter.js
browser/extensions/pdfjs/content/web/debugger.js
browser/extensions/pdfjs/content/web/images/bookmark.svg
browser/extensions/pdfjs/content/web/images/check.svg
browser/extensions/pdfjs/content/web/images/comment.svg
browser/extensions/pdfjs/content/web/images/document-print.svg
browser/extensions/pdfjs/content/web/images/download.svg
browser/extensions/pdfjs/content/web/images/go-down.svg
browser/extensions/pdfjs/content/web/images/go-up.svg
browser/extensions/pdfjs/content/web/images/loading-icon.gif
browser/extensions/pdfjs/content/web/images/nav-outline.svg
browser/extensions/pdfjs/content/web/images/nav-thumbs.svg
browser/extensions/pdfjs/content/web/images/pin-down.svg
browser/extensions/pdfjs/content/web/images/pin-up.svg
browser/extensions/pdfjs/content/web/images/zoom-in.svg
browser/extensions/pdfjs/content/web/images/zoom-out.svg
browser/extensions/pdfjs/content/web/viewer-snippet-firefox-extension.html
browser/extensions/pdfjs/content/web/viewer.css
browser/extensions/pdfjs/content/web/viewer.html
browser/extensions/pdfjs/content/web/viewer.js
browser/extensions/pdfjs/extension-files
browser/extensions/pdfjs/icon.png
browser/extensions/pdfjs/icon64.png
browser/extensions/pdfjs/install.rdf.in
browser/extensions/pdfjs/test/Makefile.in
browser/extensions/pdfjs/test/browser_pdfjs_main.js
browser/extensions/pdfjs/test/file_pdfjs_test.pdf
browser/installer/package-manifest.in
browser/makefiles.sh
js/src/config/nsinstall.py
--- a/browser/Makefile.in
+++ b/browser/Makefile.in
@@ -11,16 +11,17 @@ include $(topsrcdir)/config/config.mk
 
 PARALLEL_DIRS = \
   base \
   components \
   fuel \
   locales \
   modules \
   themes \
+  extensions \
   $(NULL)
 
 DIRS = \
   devtools \
   app \
   $(NULL)
 
 ifdef MAKENSISU
new file mode 100644
--- /dev/null
+++ b/browser/extensions/Makefile.in
@@ -0,0 +1,35 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEPTH      = ../..
+topsrcdir  = @top_srcdir@
+srcdir     = @srcdir@
+VPATH      = @srcdir@
+
+CHROMEDIR = $(call core_abspath,$(DIST))/bin/chrome
+
+include $(DEPTH)/config/autoconf.mk
+
+TEST_DIRS += pdfjs/test
+
+include $(topsrcdir)/config/rules.mk
+
+exclude_files = \
+  test \
+  install.rdf \
+  bootstrap.js \
+  icon.png \
+  icon64.png \
+  $(NULL)
+
+$(DIST)/bin/chrome/pdfjs.manifest: $(GLOBAL_DEPS)
+	printf "manifest pdfjs/chrome.manifest" > $@
+
+libs:: $(DIST)/bin/chrome/pdfjs.manifest
+	$(PYTHON) $(topsrcdir)/config/nsinstall.py \
+	  $(srcdir)/pdfjs \
+          $(foreach exclude,$(exclude_files), -X $(srcdir)/pdfjs/$(exclude)) \
+          $(DIST)/bin/chrome
+	$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
+	  $(DIST)/bin/chrome.manifest "manifest chrome/pdfjs.manifest"
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -475,18 +475,18 @@
 @BINPATH@/libGLESv2.dll
 @BINPATH@/@MOZ_D3DX9_DLL@
 @BINPATH@/@MOZ_D3DCOMPILER_DLL@
 #endif
 
 ; [Browser Chrome Files]
 @BINPATH@/chrome/browser@JAREXT@
 @BINPATH@/chrome/browser.manifest
-+@BINPATH@/chrome/pdfjs/*
-+@BINPATH@/chrome/pdfjs.manifest
+@BINPATH@/chrome/pdfjs.manifest
+@BINPATH@/chrome/pdfjs/*
 @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
 @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
 #ifdef SHIP_FEEDBACK
 @BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi
 #endif
 @BINPATH@/chrome/toolkit@JAREXT@
 @BINPATH@/chrome/toolkit.manifest
 #ifdef MOZ_GTK2
--- a/browser/makefiles.sh
+++ b/browser/makefiles.sh
@@ -42,16 +42,17 @@ browser/devtools/debugger/Makefile
 browser/devtools/highlighter/Makefile
 browser/devtools/scratchpad/Makefile
 browser/devtools/shared/Makefile
 browser/devtools/sourceeditor/Makefile
 browser/devtools/styleeditor/Makefile
 browser/devtools/styleinspector/Makefile
 browser/devtools/tilt/Makefile
 browser/devtools/webconsole/Makefile
+browser/extensions/Makefile
 browser/fuel/Makefile
 browser/fuel/public/Makefile
 browser/fuel/src/Makefile
 browser/installer/Makefile
 browser/locales/Makefile
 browser/modules/Makefile
 browser/themes/Makefile
 $MOZ_BRANDING_DIRECTORY/Makefile
--- a/js/src/config/nsinstall.py
+++ b/js/src/config/nsinstall.py
@@ -29,16 +29,18 @@ def nsinstall(argv):
   p.add_option('-d', action="store_true",
                help="Create directories in target")
   p.add_option('-R', action="store_true",
                help="Use relative symbolic links (ignored)")
   p.add_option('-l', action="store_true",
                help="Create link (ignored)")
   p.add_option('-L', action="store", metavar="linkprefix",
                help="Link prefix (ignored)")
+  p.add_option('-X', action="append", metavar="file",
+               help="Ignore a file when installing a directory recursively.")
 
   # The remaining arguments are not used in our tree, thus they're not
   # implented.
   def BadArg(option, opt, value, parser):
     parser.error('option not supported: %s' % opt)
     
   p.add_option('-C', action="callback", metavar="CWD",
                callback=BadArg,
@@ -70,22 +72,28 @@ def nsinstall(argv):
         os.chmod(args[0], options.m)
       sys.exit()
     if options.m:
       os.makedirs(args[0], options.m)
     else:
       os.makedirs(args[0])
     return 0
 
+  if options.X:
+    options.X = [os.path.abspath(p) for p in options.X]
+
   # nsinstall arg1 [...] directory
   if len(args) < 2:
     p.error('not enough arguments')
 
   def copy_all_entries(entries, target):
     for e in entries:
+      if options.X and os.path.abspath(e) in options.X:
+        continue
+
       dest = os.path.join(target,
                           os.path.basename(os.path.normpath(e)))
       handleTarget(e, dest)
       if options.m:
         os.chmod(dest, options.m)
 
   # set up handler
   if options.d: