mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
30ae66ac14
--HG-- branch : mobile extra : convert_revision : svn%3A4eb1ac78-321c-0410-a911-ec516a8615a5/projects/fennec/mobile%4012383
99 lines
4.4 KiB
Makefile
99 lines
4.4 KiB
Makefile
# ***** BEGIN LICENSE BLOCK *****
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
#
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
# the License. You may obtain a copy of the License at
|
|
# http://www.mozilla.org/MPL/
|
|
#
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
# for the specific language governing rights and limitations under the
|
|
# License.
|
|
#
|
|
# The Original Code is Mozilla.
|
|
#
|
|
# The Initial Developer of the Original Code is
|
|
# the Mozilla Foundation <http://www.mozilla.org/>.
|
|
# Portions created by the Initial Developer are Copyright (C) 2007
|
|
# the Initial Developer. All Rights Reserved.
|
|
#
|
|
# Contributor(s):
|
|
# Mark Finkle <mfinkle@mozilla.com>
|
|
#
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
# the provisions above, a recipient may use your version of this file under
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
#
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
DEPTH = ../..
|
|
topsrcdir = @top_srcdir@
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
PREF_JS_EXPORTS = $(srcdir)/mobile.js
|
|
DIST_FILES = application.ini
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
|
|
GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
|
|
APP_UA_NAME = $(shell echo $(MOZ_APP_DISPLAYNAME) | sed -e's/[^A-Za-z]//g')
|
|
|
|
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID) -DAPP_NAME=$(MOZ_APP_DISPLAYNAME) -DAPP_VERSION=$(MOZ_APP_VERSION) -DAPP_UA_NAME=$(APP_UA_NAME)
|
|
|
|
APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
|
|
|
ifneq (,$(filter mac 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
|
|
|
|
APPFILES = Resources
|
|
|
|
libs repackage:: application.ini
|
|
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
|
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
|
|
mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
|
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
|
sed -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
|
|
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
|
|
echo -n APPLMOZB > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
|
|
# remove CVS dirs from packaged app
|
|
find $(DIST)/$(APP_NAME).app -type d -name "CVS" -prune -exec rm -rf {} \;
|
|
|
|
else
|
|
|
|
libs::
|
|
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
|