123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- # ***** 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):
- # Dave Townsend <dtownsend@oxymoronical.com>
- # Matthew Gertner <matthew@allpeers.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
- DIRS = stub
- 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
- XUL_FRAMEWORK = $(DIST)/$(APP_NAME).app/Contents/Frameworks/XUL.framework
- libs repackage:: application.ini
- mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
- rsync -a --exclude .svn --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 .svn --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
- mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/branding
- cp $(srcdir)/../chrome/locale/en-US/brand/brand.dtd $(DIST)/$(APP_NAME).app/Contents/Resources/branding/
- cp $(srcdir)/../chrome/locale/en-US/brand/brand.properties $(DIST)/$(APP_NAME).app/Contents/Resources/branding/
- cp $(DIST)/bin/$(APP_BINARY) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
- rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
- $(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/$(APP_BINARY)
- $(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
- mkdir -p $(DIST)/$(APP_NAME).app/Contents/Frameworks
- rsync -a --copy-unsafe-links --exclude nsinstall $(LIBXUL_DIST)/XUL.framework/Versions/Current/. $(DIST)/$(APP_NAME).app/Contents/Frameworks/XUL.framework
- cd $(XUL_FRAMEWORK) && $(RM) -f $(SDK_STRIP)
- cp $(srcdir)/../chrome/locale/$(MOZ_UI_LOCALE)/updater.ini $(XUL_FRAMEWORK)/updater.app/Contents/MacOS
- # remove .svn dirs from packaged app
- find $(DIST)/$(APP_NAME).app -type d -name ".svn" -prune -exec rm -rf {} \;
- else
- libs::
- ifeq ($(OS_ARCH),WINNT)
- cp $(srcdir)/winbuild/regprot.nsi $(DIST)/bin
- cp $(srcdir)/winbuild/UAC.nsh $(DIST)/bin
- cp $(srcdir)/winbuild/UAC.dll $(DIST)/bin
- makensis $(DIST)/bin/regprot.nsi
- rm $(DIST)/bin/regprot.nsi
- rm $(DIST)/bin/UAC.nsh
- endif
- $(NSINSTALL) -D $(DIST)/bin/xulrunner
- (cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
- cd $(DIST)/bin/xulrunner && $(RM) -f $(SDK_STRIP)
- cp $(srcdir)/../chrome/locale/$(MOZ_UI_LOCALE)/updater.ini $(DIST)/bin/xulrunner
- endif
|