summaryrefslogtreecommitdiffstats
path: root/b2g/app/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'b2g/app/Makefile.in')
-rw-r--r--b2g/app/Makefile.in66
1 files changed, 66 insertions, 0 deletions
diff --git a/b2g/app/Makefile.in b/b2g/app/Makefile.in
new file mode 100644
index 000000000..6b50b87f7
--- /dev/null
+++ b/b2g/app/Makefile.in
@@ -0,0 +1,66 @@
+# 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/.
+
+# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
+NSDISTMODE = copy
+
+include $(topsrcdir)/config/rules.mk
+
+APP_ICON = app
+
+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)
+
+ifeq (zh-TW,$(AB_CD))
+LPROJ_ROOT := $(subst -,_,$(AB_CD))
+else
+LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD)))
+endif
+LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj
+
+clean clobber repackage::
+ rm -rf $(DIST)/$(APP_NAME).app
+
+libs-preqs = \
+ $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/MacOS) \
+ $(call mkdir_deps,$(DIST)/$(APP_NAME).app/$(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/$(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/$(LPROJ)/InfoPlist.strings
+ rsync -a --exclude 'mangle' --exclude 'shlibsign' --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/Resources
+ rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS
+ $(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
+ rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
+ cp -RL $(DIST)/branding/app.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::
+ $(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
+
+# Copy the app icon for b2g-desktop
+ifeq ($(OS_ARCH),WINNT)
+ cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
+ cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/default.ico
+else ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
+ cp $(DIST)/branding/default.png $(DIST)/bin/chrome/icons/default/default.png
+endif
+
+endif