Bug 1328164 - Enable artifact builds, part 1: build config; r=rjl
authorGeoff Lankow <geoff@darktrojan.net>
Mon, 20 May 2019 22:43:44 +1200
changeset 35893 3a3901fff903bd544059fb8dbc2a37b387fae827
parent 35892 4eac5c4c23a31f05af4f150d51a47e474cf99925
child 35894 252ff46d7f01b00c53f758130347de18536c3804
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersrjl
bugs1328164
Bug 1328164 - Enable artifact builds, part 1: build config; r=rjl
mail/app/Makefile.in
mail/config/mozconfigs/common
mail/config/mozconfigs/win64/debug
mail/config/mozconfigs/win64/nightly
mail/installer/Makefile.in
mail/installer/package-manifest.in
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -134,27 +134,29 @@ LPROJ_ROOT := $(subst -,_,$(AB_CD))
 else
 LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD)))
 endif
 LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj
 
 clean clobber repackage::
 	$(RM) -r '$(DIST)/$(MOZ_MACBUNDLE_NAME)'
 
-tools repackage:: $(PROGRAM)
+.PHONY: repackage
+tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME)
+	rm -rf '$(DIST)/$(MOZ_MACBUNDLE_NAME)'
 	$(MKDIR) -p '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS'
 	rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents '$(DIST)/$(MOZ_MACBUNDLE_NAME)' --exclude English.lproj
 	$(MKDIR) -p '$(DIST)/$(MOZ_MACBUNDLE_NAME)/$(LPROJ)'
 	rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ '$(DIST)/$(MOZ_MACBUNDLE_NAME)/$(LPROJ)'
 	sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Info.plist.in > '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist'
 	sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > '$(DIST)/$(MOZ_MACBUNDLE_NAME)/$(LPROJ)/InfoPlist.strings'
 	rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources'
 	rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS'
-	$(RM) '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)'
-	rsync -aL $(PROGRAM) '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS'
+	$(RM) '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(MOZ_APP_NAME)'
+	rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS'
 	$(MKDIR) -p '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight'
 	rsync -a --copy-unsafe-links $(DIST)/package/thunderbird.mdimporter '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight'
 	cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/thunderbird.icns '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/thunderbird.icns'
 	$(MKDIR) -p '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/LaunchServices'
 ifdef MOZ_UPDATER
 	mv -f '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/LaunchServices'
 	ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
 endif
--- a/mail/config/mozconfigs/common
+++ b/mail/config/mozconfigs/common
@@ -1,7 +1,9 @@
 ac_add_options --enable-application=comm/mail
 ac_add_options --enable-calendar
 
 # Disable enforcing that add-ons are signed by the trusted root.
 # This is the default on trunk, but it is toggled for beta causing
 # MozMill to fail since its add-ons aren't signed. So we force it here.
 MOZ_REQUIRE_SIGNING=0
+
+. "$topsrcdir/build/mozconfig.common.override"
--- a/mail/config/mozconfigs/win64/debug
+++ b/mail/config/mozconfigs/win64/debug
@@ -1,23 +1,28 @@
 . "$topsrcdir/build/mozconfig.win-common"
 . "$topsrcdir/build/mozconfig.common"
 . "$topsrcdir/build/mozconfig.stylo"
 . "$topsrcdir/comm/mail/config/mozconfigs/common"
 . "$topsrcdir/comm/mail/config/mozconfigs/win64/common-win64"
 
 ac_add_options --enable-debug
+if test -n "$USE_ARTIFACT"; then
+ac_add_options --disable-mapi
+fi
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Package js shell
 export MOZ_PACKAGE_JSSHELL=1
 
 # Disable enforcing that add-ons are signed by the trusted root
 MOZ_REQUIRE_ADDON_SIGNING=0
 
 . "$topsrcdir/comm/build/mozconfig.sccache"
 
+if test -z "$USE_ARTIFACT"; then
 . $topsrcdir/build/win64/mozconfig.vs-latest
 
 # Set up mapi includes (must be done after visual studio setup)
 export INCLUDE=$INCLUDE:$(cd "$TOOLTOOL_DIR" && pwd)/mapiheader
+fi
--- a/mail/config/mozconfigs/win64/nightly
+++ b/mail/config/mozconfigs/win64/nightly
@@ -1,29 +1,36 @@
 . "$topsrcdir/build/mozconfig.win-common"
 . "$topsrcdir/build/mozconfig.common"
 . "$topsrcdir/build/mozconfig.stylo"
 . "$topsrcdir/comm/mail/config/mozconfigs/common"
 . "$topsrcdir/comm/mail/config/mozconfigs/win64/common-win64"
 
 ac_add_options --enable-update-channel="${MOZ_UPDATE_CHANNEL}"
+ac_add_options --enable-profiling
+if test -z "$USE_ARTIFACT"; then
 ac_add_options --enable-jemalloc
-ac_add_options --enable-profiling
+fi
+if test -n "$USE_ARTIFACT"; then
+ac_add_options --disable-mapi
+fi
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 # Disable enforcing that add-ons are signed by the trusted root
 MOZ_REQUIRE_ADDON_SIGNING=0
 
 # Package js shell
 export MOZ_PACKAGE_JSSHELL=1
 
 . "$topsrcdir/comm/build/mozconfig.sccache"
 
+if test -z "$USE_ARTIFACT"; then
 . $topsrcdir/build/win64/mozconfig.vs-latest
 
 # Set up mapi includes (must be done after visual studio setup)
 export INCLUDE=$INCLUDE:$(cd "$TOOLTOOL_DIR" && pwd)/mapiheader
 
 mk_add_options "export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=c:/builds/crash-stats-api.token"
+fi
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -57,16 +57,20 @@ endif
 ifdef MOZ_SYSTEM_NSS
 DEFINES += -DMOZ_SYSTEM_NSS=1
 endif
 
 ifdef NSS_DISABLE_DBM
 DEFINES += -DNSS_DISABLE_DBM=1
 endif
 
+ifdef MOZ_ARTIFACT_BUILDS
+DEFINES += -DMOZ_ARTIFACT_BUILDS=1
+endif
+
 DEFINES += -DJAREXT=
 
 ifdef MOZ_ANGLE_RENDERER
 DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER)
 ifdef MOZ_D3DCOMPILER_VISTA_DLL
 DEFINES += -DMOZ_D3DCOMPILER_VISTA_DLL=$(MOZ_D3DCOMPILER_VISTA_DLL)
 endif
 endif
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -107,16 +107,28 @@
 #ifdef MOZ_GTK
 @BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
 @BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
 #ifdef MOZ_WAYLAND
 @BINPATH@/@DLL_PREFIX@mozwayland@DLL_SUFFIX@
 #endif
 #endif
 
+; We don't have a complete view of which dlls to expect when doing an artifact
+; build because we haven't run the relevant parts of configure, so we guess
+; here and trust what came from our source build.
+#if defined(MOZ_ARTIFACT_BUILDS) && defined(XP_WIN)
+@BINPATH@/api-ms-win-*.dll
+@BINPATH@/ucrtbase.dll
+@BINPATH@/vcruntime*.dll
+@BINPATH@/msvcp*.dll
+@BINPATH@/libEGL.dll
+@BINPATH@/libGLESv2.dll
+#endif
+
 ; Optional RSS extension
 [newsblog]
 @RESPATH@/chrome/newsblog@JAREXT@
 @RESPATH@/chrome/newsblog.manifest
 @RESPATH@/components/newsblog.js
 @RESPATH@/components/newsblog.manifest
 
 [mail]