diff options
Diffstat (limited to 'toolkit/mozapps/macos-frameworks')
5 files changed, 72 insertions, 6 deletions
diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/Makefile.in b/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/Makefile.in new file mode 100644 index 0000000000..5dcb0821cb --- /dev/null +++ b/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/Makefile.in @@ -0,0 +1,25 @@ +# vim:set ts=8 sw=8 sts=8 noet: +# 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/. + +include $(topsrcdir)/config/rules.mk + +# In a compile build, the moz.build stanzas produce a binary named +# `ChannelPrefs-localbuild`. We need to produce +# `dist/update_framework_artifacts/ChannelPrefs-localbuild.framework/ChannelPrefs` +# for consumption by artifact builds. +# +# In an artifact build, we already have upstream artifacts in +# `dist/update_framework_artifacts/ChannelPrefs-localbuild.framework`. + +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) +libs:: +ifneq (,$(COMPILE_ENVIRONMENT)) + rm -rf $(FINAL_TARGET)/ChannelPrefs-localbuild.framework + $(NSINSTALL) -D $(FINAL_TARGET)/ChannelPrefs-localbuild.framework + cp $(FINAL_TARGET)/ChannelPrefs-localbuild ChannelPrefs + $(NSINSTALL) ChannelPrefs $(FINAL_TARGET)/ChannelPrefs-localbuild.framework +endif # COMPILE_ENVIRONMENT + $(NSINSTALL) $(srcdir)/../ChannelPrefs/Info.plist $(FINAL_TARGET)/ChannelPrefs-localbuild.framework/Resources +endif # MOZ_WIDGET_TOOLKIT diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/moz.build b/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/moz.build new file mode 100644 index 0000000000..ff91833ad3 --- /dev/null +++ b/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/moz.build @@ -0,0 +1,21 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +with Files("**"): + BUG_COMPONENT = ("Toolkit", "Application Update") + +Framework("ChannelPrefs-localbuild") +FINAL_TARGET = "dist/update_framework_artifacts" + +DEFINES["MOZ_UPDATE_CHANNEL_OVERRIDE"] = "default" + +UNIFIED_SOURCES += [ + "../ChannelPrefs/ChannelPrefs.mm", +] + +OS_LIBS += [ + "-framework Foundation", +] diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm b/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm index f437bb857d..0428bbe8ab 100644 --- a/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm +++ b/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm @@ -6,7 +6,13 @@ #include "mozilla/HelperMacros.h" +#ifdef MOZ_UPDATE_CHANNEL_OVERRIDE +# define CHANNEL MOZ_UPDATE_CHANNEL_OVERRIDE +#else +# define CHANNEL MOZ_UPDATE_CHANNEL +#endif + NSString* ChannelPrefsGetChannel() { - return [NSString stringWithCString:MOZ_STRINGIFY(MOZ_UPDATE_CHANNEL) + return [NSString stringWithCString:MOZ_STRINGIFY(CHANNEL) encoding:NSUTF8StringEncoding]; } diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in b/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in index 43552a771e..7f3bfd1cc5 100644 --- a/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in +++ b/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in @@ -5,10 +5,23 @@ include $(topsrcdir)/config/rules.mk +# In a compile build, the moz.build stanzas produce a binary named +# `ChannelPrefs`. We need to produce +# `dist/bin/ChannelPrefs.framework/ChannelPrefs` for consumption by the +# build. +# +# In an artifact build, we copy upstream artifacts from +# `dist/update_framework_artifacts/ChannelPrefs-localbuild.framework` + ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) libs:: - rm -rf $(DIST)/bin/ChannelPrefs.framework - - $(NSINSTALL) $(DIST)/bin/ChannelPrefs $(DIST)/bin/ChannelPrefs.framework - $(NSINSTALL) $(srcdir)/Info.plist $(DIST)/bin/ChannelPrefs.framework/Resources -endif + rm -rf $(FINAL_TARGET)/ChannelPrefs.framework + $(NSINSTALL) -D $(FINAL_TARGET)/ChannelPrefs.framework +ifneq (,$(COMPILE_ENVIRONMENT)) + $(NSINSTALL) $(FINAL_TARGET)/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs.framework +endif # COMPILE_ENVIRONMENT +ifneq (,$(MOZ_ARTIFACT_BUILDS)) + $(NSINSTALL) $(DIST)/update_framework_artifacts/ChannelPrefs-localbuild.framework/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs.framework +endif # MOZ_ARTIFACT_BUILDS + $(NSINSTALL) $(srcdir)/Info.plist $(FINAL_TARGET)/ChannelPrefs.framework/Resources +endif # MOZ_WIDGET_TOOLKIT diff --git a/toolkit/mozapps/macos-frameworks/moz.build b/toolkit/mozapps/macos-frameworks/moz.build index b1a315500c..f7ad2d314f 100644 --- a/toolkit/mozapps/macos-frameworks/moz.build +++ b/toolkit/mozapps/macos-frameworks/moz.build @@ -11,6 +11,7 @@ FINAL_LIBRARY = "xul" DIRS += [ "ChannelPrefs", + "ChannelPrefs-localbuild", ] EXPORTS += [ |