Makefile.in 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # ***** BEGIN LICENSE BLOCK *****
  2. # Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3. #
  4. # The contents of this file are subject to the Mozilla Public License Version
  5. # 1.1 (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. # http://www.mozilla.org/MPL/
  8. #
  9. # Software distributed under the License is distributed on an "AS IS" basis,
  10. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. # for the specific language governing rights and limitations under the
  12. # License.
  13. #
  14. # The Original Code is Mozilla.
  15. #
  16. # The Initial Developer of the Original Code is
  17. # the Mozilla Foundation <http://www.mozilla.org/>.
  18. # Portions created by the Initial Developer are Copyright (C) 2007
  19. # the Initial Developer. All Rights Reserved.
  20. #
  21. # Contributor(s):
  22. # Dave Townsend <dtownsend@oxymoronical.com>
  23. # Matthew Gertner <matthew@allpeers.com>
  24. #
  25. # Alternatively, the contents of this file may be used under the terms of
  26. # either the GNU General Public License Version 2 or later (the "GPL"), or
  27. # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28. # in which case the provisions of the GPL or the LGPL are applicable instead
  29. # of those above. If you wish to allow use of your version of this file only
  30. # under the terms of either the GPL or the LGPL, and not to allow others to
  31. # use your version of this file under the terms of the MPL, indicate your
  32. # decision by deleting the provisions above and replace them with the notice
  33. # and other provisions required by the GPL or the LGPL. If you do not delete
  34. # the provisions above, a recipient may use your version of this file under
  35. # the terms of any one of the MPL, the GPL or the LGPL.
  36. #
  37. # ***** END LICENSE BLOCK *****
  38. DEPTH = ../..
  39. topsrcdir = @top_srcdir@
  40. srcdir = @srcdir@
  41. VPATH = @srcdir@
  42. include $(DEPTH)/config/autoconf.mk
  43. DIRS = stub
  44. DIST_FILES = application.ini
  45. include $(topsrcdir)/config/rules.mk
  46. GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
  47. GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
  48. APP_UA_NAME = $(shell echo $(MOZ_APP_DISPLAYNAME) | sed -e's/[^A-Za-z]//g')
  49. 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)
  50. APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
  51. ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
  52. APP_NAME = $(MOZ_APP_DISPLAYNAME)
  53. APP_VERSION = $(MOZ_APP_VERSION)
  54. ifdef MOZ_DEBUG
  55. APP_NAME := $(APP_NAME)Debug
  56. endif
  57. AB_CD = $(MOZ_UI_LOCALE)
  58. AB := $(firstword $(subst -, ,$(AB_CD)))
  59. clean clobber repackage::
  60. rm -rf $(DIST)/$(APP_NAME).app
  61. APPFILES = Resources
  62. XUL_FRAMEWORK = $(DIST)/$(APP_NAME).app/Contents/Frameworks/XUL.framework
  63. libs repackage:: application.ini
  64. mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
  65. rsync -a --exclude .svn --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
  66. mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
  67. rsync -a --exclude .svn --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
  68. 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
  69. 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
  70. mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/branding
  71. cp $(srcdir)/../chrome/locale/en-US/brand/brand.dtd $(DIST)/$(APP_NAME).app/Contents/Resources/branding/
  72. cp $(srcdir)/../chrome/locale/en-US/brand/brand.properties $(DIST)/$(APP_NAME).app/Contents/Resources/branding/
  73. cp $(DIST)/bin/$(APP_BINARY) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
  74. rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
  75. $(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/$(APP_BINARY)
  76. $(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
  77. mkdir -p $(DIST)/$(APP_NAME).app/Contents/Frameworks
  78. rsync -a --copy-unsafe-links --exclude nsinstall $(LIBXUL_DIST)/XUL.framework/Versions/Current/. $(DIST)/$(APP_NAME).app/Contents/Frameworks/XUL.framework
  79. cd $(XUL_FRAMEWORK) && $(RM) -f $(SDK_STRIP)
  80. cp $(srcdir)/../chrome/locale/$(MOZ_UI_LOCALE)/updater.ini $(XUL_FRAMEWORK)/updater.app/Contents/MacOS
  81. # remove .svn dirs from packaged app
  82. find $(DIST)/$(APP_NAME).app -type d -name ".svn" -prune -exec rm -rf {} \;
  83. else
  84. libs::
  85. ifeq ($(OS_ARCH),WINNT)
  86. cp $(srcdir)/winbuild/regprot.nsi $(DIST)/bin
  87. cp $(srcdir)/winbuild/UAC.nsh $(DIST)/bin
  88. cp $(srcdir)/winbuild/UAC.dll $(DIST)/bin
  89. makensis $(DIST)/bin/regprot.nsi
  90. rm $(DIST)/bin/regprot.nsi
  91. rm $(DIST)/bin/UAC.nsh
  92. endif
  93. $(NSINSTALL) -D $(DIST)/bin/xulrunner
  94. (cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
  95. cd $(DIST)/bin/xulrunner && $(RM) -f $(SDK_STRIP)
  96. cp $(srcdir)/../chrome/locale/$(MOZ_UI_LOCALE)/updater.ini $(DIST)/bin/xulrunner
  97. endif