b2g/app/Makefile.in
author B2G Bumper Bot <release+b2gbumper@mozilla.com>
Wed, 27 Aug 2014 20:25:29 -0700
changeset 202062 b6d16bdb7c1d70e00e481906704356a172d04c4d
parent 198615 0f37cf9a01fde2619038d2af2c2b4bf80bb59390
child 207879 47c2f60b1174d44e948e341628274908b2ef21db
permissions -rw-r--r--
Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/2c168dab2546 Author: Rudy Lu <me@rudy.lu> Desc: Merge pull request #23359 from RudyLu/keyboard/Bug1019472 Bug 1019472 - [Keyboard] [ZhuYin] ZhuYin Keyboard should follow the reco... r=rudylu. ======== https://hg.mozilla.org/integration/gaia-central/rev/773aac4df6bc Author: dxue <dxue@mozilla.com> Desc: Bug 1019472 - [Keyboard] [ZhuYin] ZhuYin Keyboard should follow the recommendation

# 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/.

USE_RCS_MK := 1
include $(topsrcdir)/config/makefiles/rcs.mk

PREF_JS_EXPORTS = $(srcdir)/b2g.js

UA_UPDATE_FILE = ua-update.json

$(UA_UPDATE_FILE): % : %.in
	# strip out comment lines, which are not valid in JSON
	sed -e '/^ *\/\//d' -e '/^ *$$/d' $^ > $@

UA_UPDATE_FILES = $(UA_UPDATE_FILE)
UA_UPDATE_DEST  = $(FINAL_TARGET)
INSTALL_TARGETS += UA_UPDATE

# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
NSDISTMODE = copy

include $(topsrcdir)/config/rules.mk

APP_ICON = b2g

ifeq ($(OS_ARCH),WINNT)
REDIT_PATH = $(LIBXUL_DIST)/bin
endif

APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))

APP_NAME = $(MOZ_APP_DISPLAYNAME)
APP_VERSION = $(MOZ_APP_VERSION)

ifdef MOZ_DEBUG
APP_NAME := $(APP_NAME)Debug
endif

AB_CD = $(MOZ_UI_LOCALE)

AB := $(firstword $(subst -, ,$(AB_CD)))

clean clobber repackage::
	rm -rf $(DIST)/$(APP_NAME).app

ifdef LIBXUL_SDK
APPFILES = Resources
else
APPFILES = MacOS
endif

libs-preqs = \
  $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/MacOS) \
  $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj) \
  $(NULL)

.PHONY: repackage
tools repackage:: $(libs-preqs)
	rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
	rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
	sed -e 's/%MOZ_APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/' -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' -e 's/%APP_BINARY%/$(APP_BINARY)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
	sed -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
	rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
	$(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
ifdef LIBXUL_SDK
	cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
	rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
else
	$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
	rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
endif
	cp -RL $(srcdir)/b2g.icns $(DIST)/$(APP_NAME).app/Contents/Resources/$(MOZ_APP_NAME).icns
	printf APPLMOZB > $(DIST)/$(APP_NAME).app/Contents/PkgInfo

else # MOZ_WIDGET_TOOLKIT != cocoa

libs::
ifdef LIBXUL_SDK
	cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY)
	$(NSINSTALL) -D $(DIST)/bin/xulrunner
	(cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
endif
	$(NSINSTALL) -D $(DIST)/bin/chrome/icons/default

# Copy the app icon for b2g-desktop
ifeq ($(OS_ARCH),WINNT)
	cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
	$(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(srcdir)/$(APP_ICON).ico
	cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/default.ico
else ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
	cp $(srcdir)/default.png $(DIST)/bin/chrome/icons/default/default.png
endif

endif