Skip to content

Commit 5ad44af

Browse files
committed
Bug 780561 - Use new packager code for packaging (packager.mk) r=ted
1 parent 4950cfa commit 5ad44af

File tree

10 files changed

+77
-391
lines changed

10 files changed

+77
-391
lines changed

b2g/installer/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ifdef MOZ_PKG_MANIFEST_P
5151
MOZ_PKG_MANIFEST = package-manifest
5252
endif
5353

54-
MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec $(PERL) -n -i -e 'print unless /^\#/' {} \;
54+
MOZ_PACKAGER_MINIFY=1
5555

5656
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
5757

browser/installer/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ ifdef MOZ_PKG_MANIFEST_P
152152
rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
153153
endif
154154

155-
installer:: removed-files
155+
installer::
156156
ifdef INSTALLER_DIR
157157
$(MAKE) -C $(INSTALLER_DIR)
158158
endif

browser/installer/removed-files.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,11 +884,11 @@ xpicleanup@BIN_SUFFIX@
884884
components/addonManager.js
885885
components/amContentHandler.js
886886
components/amWebInstallListener.js
887+
components/binary.manifest
887888
components/browser.xpt
888889
components/BrowserElementParent.js
889890
components/BrowserElementParent.manifest
890891
components/BrowserElementPromptService.jsm
891-
components/components.manifest
892892
components/contentAreaDropListener.js
893893
components/contentSecurityPolicy.js
894894
components/crypto-SDR.js

build/macosx/universal/flight.mk

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -22,69 +22,11 @@ core_abspath = $(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1))
2222

2323
DIST = $(OBJDIR)/dist
2424

25-
ifdef LIBXUL_SDK # {
26-
APP_CONTENTS = Contents/Frameworks/XUL.framework
27-
else # } {
28-
APP_CONTENTS = Contents/MacOS
29-
endif # } LIBXUL_SDK
30-
31-
ifeq ($(MOZ_BUILD_APP),camino) # {
32-
INSTALLER_DIR = camino/installer
33-
MOZ_PKG_APPNAME = camino
34-
APPNAME = Camino.app
35-
BUILDCONFIG_BASE = Contents/MacOS/chrome
36-
else # } {
37-
MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
38-
APPNAME = $(MOZ_MACBUNDLE_NAME)
39-
INSTALLER_DIR = $(MOZ_BUILD_APP)/installer
40-
ifeq ($(MOZ_BUILD_APP),xulrunner) # {
41-
APPNAME = XUL.framework
42-
APP_CONTENTS = Versions/Current
43-
endif # } xulrunner
44-
BUILDCONFIG_BASE = $(APP_CONTENTS)/chrome
45-
endif # } !camino
46-
47-
ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
48-
BUILDCONFIG = $(BUILDCONFIG_BASE)/toolkit.jar
49-
FIX_MODE = jar
50-
else
51-
BUILDCONFIG = $(BUILDCONFIG_BASE)/toolkit/
52-
FIX_MODE = file
53-
endif
54-
5525
postflight_all:
56-
# Build the universal package out of only the bits that would be released.
57-
# Call the packager to set this up. Set UNIVERSAL_BINARY= to avoid producing
58-
# a universal binary too early, before the unified bits have been staged.
59-
# Set SIGN_NSS= to skip shlibsign.
60-
$(MAKE) -C $(OBJDIR_ARCH_1)/$(INSTALLER_DIR) \
61-
UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
62-
$(MAKE) -C $(OBJDIR_ARCH_2)/$(INSTALLER_DIR) \
63-
UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
64-
# Remove .chk files that may have been copied from the NSS build. These will
65-
# cause unify to warn or fail if present. New .chk files that are
66-
# appropriate for the merged libraries will be generated when the universal
67-
# dmg is built.
68-
rm -f $(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk \
69-
$(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk
70-
# The only difference betewen the two trees now should be the
71-
# about:buildconfig page. Fix it up.
72-
$(TOPSRCDIR)/build/macosx/universal/fix-buildconfig $(FIX_MODE) \
73-
$(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG) \
74-
$(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG)
26+
ifdef ENABLE_TESTS
7527
mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
7628
rm -f $(DIST_ARCH_2)/universal
7729
ln -s $(call core_abspath,$(DIST_UNI)) $(DIST_ARCH_2)/universal
78-
rm -rf $(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
79-
$(TOPSRCDIR)/build/macosx/universal/unify \
80-
--unify-with-sort "\.manifest$$" \
81-
--unify-with-sort "components\.list$$" \
82-
$(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME) \
83-
$(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME) \
84-
$(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
85-
# A universal .dmg can now be produced by making in either architecture's
86-
# INSTALLER_DIR.
87-
ifdef ENABLE_TESTS
8830
# Now, repeat the process for the test package.
8931
$(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= CHROME_JAR= package-tests
9032
$(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= CHROME_JAR= package-tests

build/macosx/universal/mozconfig.common

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ mk_add_options MOZ_POSTFLIGHT_ALL+=build/macosx/universal/flight.mk
99
DARWIN_VERSION=`uname -r`
1010
ac_add_app_options i386 --target=i386-apple-darwin$DARWIN_VERSION
1111
ac_add_app_options x86_64 --target=x86_64-apple-darwin$DARWIN_VERSION
12+
ac_add_app_options i386 --with-unify-dist=../x86_64/dist
13+
ac_add_app_options x86_64 --with-unify-dist=../i386/dist
1214

1315
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk
1416

configure.in

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,23 @@ dnl when we can run target binaries.
907907
AC_SUBST(UNIVERSAL_BINARY)
908908
AC_SUBST(MOZ_CAN_RUN_PROGRAMS)
909909

910+
MOZ_ARG_WITH_STRING(unify-dist,
911+
[ --with-unify-dist=dir Location of the dist directory to unify with at packaging time (Mac OS X universal build only)],
912+
UNIFY_DIST=$withval)
913+
if test -n "$UNIVERSAL_BINARY"; then
914+
if test -z "$UNIFY_DIST"; then
915+
AC_MSG_ERROR([You need to provide the --with-unify-dist=dir argument when performing a universal build])
916+
fi
917+
case "$UNIFY_DIST" in
918+
/*)
919+
;;
920+
*)
921+
UNIFY_DIST="${MOZ_BUILD_ROOT}/${UNIFY_DIST}"
922+
;;
923+
esac
924+
fi
925+
AC_SUBST(UNIFY_DIST)
926+
910927
dnl ========================================================
911928
dnl Check for MacOS deployment target version
912929
dnl ========================================================
@@ -2367,6 +2384,8 @@ ia64*-hpux*)
23672384
RCFLAGS='-n'
23682385
MOZ_USER_DIR="Mozilla"
23692386
ZIP="$ZIP -X"
2387+
STRIP=lxlite
2388+
STRIP_FLAGS="/yua /ydd /yxd /ynl /anp /b- /cs+ /d /i- /ml1 /mr2 /mf2 /r+ /u+ /x- /zs:0 /zx /zd"
23702389

23712390
if test "$MOZTOOLS"; then
23722391
MOZ_TOOLS_DIR=`echo $MOZTOOLS | sed -e 's|\\\\|/|g'`
@@ -7711,18 +7730,20 @@ dnl done during packaging with omnijar.
77117730
if test "$MOZ_CHROME_FILE_FORMAT" = "omni"; then
77127731
MOZ_OMNIJAR=1
77137732
AC_DEFINE(MOZ_OMNIJAR)
7714-
if test "$OS_ARCH" = "WINNT" -o "$OS_ARCH" = "OS2" -o "$MOZ_WIDGET_TOOLKIT" = "android"; then
7715-
MOZ_CHROME_FILE_FORMAT=flat
7716-
else
7717-
MOZ_CHROME_FILE_FORMAT=symlink
7718-
fi
77197733
elif test "$MOZ_CHROME_FILE_FORMAT" = "jar"; then
77207734
AC_DEFINE(MOZ_CHROME_FILE_FORMAT_JAR)
77217735
fi
7736+
MOZ_PACKAGER_FORMAT="$MOZ_CHROME_FILE_FORMAT"
7737+
if test "$OS_ARCH" = "WINNT" -o "$OS_ARCH" = "OS2" -o "$MOZ_WIDGET_TOOLKIT" = "android"; then
7738+
MOZ_CHROME_FILE_FORMAT=flat
7739+
else
7740+
MOZ_CHROME_FILE_FORMAT=symlink
7741+
fi
77227742

77237743
OMNIJAR_NAME=omni.ja
77247744
AC_SUBST(OMNIJAR_NAME)
77257745
AC_SUBST(MOZ_OMNIJAR)
7746+
AC_SUBST(MOZ_PACKAGER_FORMAT)
77267747

77277748
dnl ========================================================
77287749
dnl = Define default location for MOZILLA_FIVE_HOME

mobile/android/installer/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ifdef MOZ_PKG_MANIFEST_P
4848
MOZ_PKG_MANIFEST = package-manifest
4949
endif
5050

51-
MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec $(PERL) -n -i -e 'print unless /^\#/' {} \;
51+
MOZ_PACKAGER_MINIFY=1
5252

5353
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
5454

mobile/xul/installer/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ifdef MOZ_PKG_MANIFEST_P
4848
MOZ_PKG_MANIFEST = package-manifest
4949
endif
5050

51-
MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec $(PERL) -n -i -e 'print unless /^\#/' {} \;
51+
MOZ_PACKAGER_MINIFY=1
5252

5353
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
5454

0 commit comments

Comments
 (0)