Bug 740795 part C - Don't ship pdf.js as an extension, build changes, r=ted
--- 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: