Bug 302080, Mac products need to display EULA. New Mac dmg packager, EULA resources, dmg backgrounds, and icons. Also fixes 180837, 257854, 283598. r=josh sr=smfr sr=bryner

This commit is contained in:
mark%moxienet.com 2005-08-18 13:11:46 +00:00
parent 721d14908a
commit 4e19563146
27 changed files with 1595 additions and 74 deletions

View File

@ -1101,6 +1101,7 @@ calendar/sunbird/base/Makefile
MAKEFILES_macbrowser="
camino/Makefile
camino/installer/Makefile
"
MAKEFILES_sql="

View File

@ -269,6 +269,10 @@ endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/macbuild/firefox.icns $(DIST)/branding/firefox.icns
cp $(srcdir)/macbuild/document.icns $(DIST)/branding/document.icns
cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
cp $(srcdir)/macbuild/license.r $(DIST)/branding/license.r
endif
ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/mozicon128.png $(DIST)/branding/mozicon128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

BIN
browser/app/macbuild/dsstore Executable file

Binary file not shown.

View File

@ -74,6 +74,13 @@ $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
MOZ_PKG_MAC_DSSTORE=branding/dsstore
MOZ_PKG_MAC_BACKGROUND=branding/background.png
MOZ_PKG_MAC_ICON=branding/disk.icns
MOZ_PKG_MAC_RSRC=branding/license.r
endif
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
installer:

View File

@ -23,6 +23,7 @@
# Brian Ryner <bryner@brianryner.com>
# Jean-Jacques Enser <jj@netscape.com>
# Arthur Wiebe <artooro@gmail.com>
# Mark Mentovai <mark@moxienet.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
@ -50,11 +51,8 @@
# tip: use '-null-' for <eula-resource-file> if you only want to
# provide <.dsstore_file> and <background_image_file>
DMG_DIRNAME=`dirname $1`
DMG_DIR=`cd $DMG_DIRNAME; pwd`
DMG_NAME=`basename $1`
DMG_TEMP_NAME=${DMG_DIR}/rw.${DMG_NAME}
SRC_FOLDER=`cd $2; pwd`
DMG_PATH=$1
SRC_FOLDER=$2
VOLUME_NAME=$3
# optional arguments
@ -62,79 +60,24 @@ EULA_RSRC=$4
DMG_DSSTORE=$5
DMG_BKGND_IMG=$6
# Find the size of the folder contents
FOLDER_SIZE=`du -s $SRC_FOLDER | sed s/[^0-9].*//`
EXTRA_ARGS=
# Allow for partition table and other overhead (3%)
IMAGE_SIZE=$(($FOLDER_SIZE * 103/100))
# minimum size for an HFS+ partition is 4Mb
[ $IMAGE_SIZE -lt 8300 ] && IMAGE_SIZE=8300
# Make sure NEXT_ROOT is not set (if we're building with an SDK)
unset NEXT_ROOT
echo FOLDER_SIZE=$FOLDER_SIZE
echo IMAGE_SIZE=$IMAGE_SIZE
# Create the image
echo "creating disk image"
hdiutil create -sectors $IMAGE_SIZE -fs HFS+ $DMG_TEMP_NAME -volname $VOLUME_NAME
# mount it
echo "mounting disk image"
# `hdid -nomount rw.$DMG_NAME | grep "^/dev/disk.s2" | sed -e "s?^/dev/??" -e "s/[^0-9a-z].*//"`
DEV_NAME=`hdid $DMG_TEMP_NAME | sed 1q | awk '{print $1}'`
MOUNT_DIR=`hdid $DMG_TEMP_NAME | grep Apple_HFS | awk '{print $3}'`
# copy content via ditto
#
# ditto fails when target has no space left or is read-only. Let's capture
# that condition and cause the build to fail instead of silently moving ahead.
# - cmp
echo "copying content to disk image"
ditto -rsrcFork $SRC_FOLDER $MOUNT_DIR
rc=$?
if [ $rc != "0" ]; then
echo "ERROR: 'ditto -rsrcFork $SRC_FOLDER $MOUNT_DIR' failed ($rc)"
exit 1
if test -n "$EULA_RSRC" && test "$EULA_RSRC" != "-null-" ; then
EXTRA_ARGS="--resource $EULA_RSRC"
fi
# add optional Finder window layout and background image
if [ ! -z ${DMG_DSSTORE} ]; then
echo "adding .DS_Store"
cp -p ${DMG_DSSTORE} ${MOUNT_DIR}/.DS_Store
fi
if [ ! -z ${DMG_BKGND_IMG} ]; then
echo "adding background image"
mkdir ${MOUNT_DIR}/.background
cp -p ${DMG_BKGND_IMG} ${MOUNT_DIR}/.background/
if test -n "$DMG_DSSTORE" ; then
EXTRA_ARGS="$EXTRA_ARGS --copy $DMG_DSSTORE:/.DS_Store"
fi
# make sure it's not world writeable
echo "fixing permissions"
chmod -R go-w ${MOUNT_DIR}
# make the top window open itself on mount:
if [ -x /usr/local/bin/openUp ]; then
/usr/local/bin/openUp ${MOUNT_DIR}
if test -n "$DMG_BKGND_IMG" ; then
EXTRA_ARGS="$EXTRA_ARGS --mkdir /.background --copy $DMG_BKGND_IMG:/.background"
fi
# unmnount
echo "unmounting disk image"
hdiutil detach $DEV_NAME
echo `dirname $0`/pkg-dmg --target "$DMG_PATH" --source "$SRC_FOLDER" \
--volname "$VOLUME_NAME" $EXTRA_ARGS
# compress image
echo "compressing disk image"
hdiutil convert $DMG_TEMP_NAME -format UDZO -imagekey zlib-level=9 -o ${DMG_DIR}/${DMG_NAME}
rm -f $DMG_TEMP_NAME
`dirname $0`/pkg-dmg --target "$DMG_PATH" --source "$SRC_FOLDER" \
--volname "$VOLUME_NAME" $EXTRA_ARGS
# adding EULA resources
if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then
echo "adding EULA resources"
hdiutil unflatten ${DMG_DIR}/${DMG_NAME}
/Developer/Tools/ResMerger -a ${EULA_RSRC} -o ${DMG_DIR}/${DMG_NAME}
hdiutil flatten ${DMG_DIR}/${DMG_NAME}
fi
echo "disk image done"
exit 0
exit $?

1454
build/package/mac_osx/pkg-dmg Executable file

File diff suppressed because it is too large Load Diff

View File

@ -42,6 +42,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
APP_NAME = Camino
ifdef MOZ_DEBUG
BUILDSTYLE = Development
else
@ -76,9 +78,15 @@ ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
ln -fs $(srcdir)/Info-*.plist .
endif
clean clobber repackage::
rm -rf $(DIST)/$(APP_NAME).app
libs::
$(PBBUILD) -project Camino.xcode -target $(TARGET) -buildstyle $(BUILDSTYLE) $(PBBUILD_SETTINGS)
libs repackage::
rsync -a --copy-unsafe-links $(XCODE_PRODUCT_DIR)/Camino.app/ $(DIST)/$(APP_NAME).app
# convenience target for PB script build phases
echo_srcdir:
@echo $(srcdir)

View File

@ -0,0 +1,67 @@
# ***** 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 the Mozilla Browser code.
#
# The Initial Developer of the Original Code is
# IBM Corporation.
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Mark Mentovai <mark@moxienet.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
include $(topsrcdir)/config/rules.mk
CAMINO_VERSION=0.9a2
_RELNOTE_VERSION:=$(subst .,-,$(CAMINO_VERSION))
# The packager runs in the dist directory, paths must be relative to there.
MOZ_PKG_MAC_DSSTORE=../camino/resources/package/dsstore
MOZ_PKG_MAC_BACKGROUND=../camino/resources/package/background.jpg
MOZ_PKG_MAC_ICON=../camino/resources/package/disk.icns
MOZ_PKG_MAC_RSRC=../camino/resources/package/license.r
# The docs aren't copied into an objdir, chase them in the srcdir.
MOZ_PKG_MAC_EXTRA=--copy "$(topsrcdir)/camino/docs/ReadMe.rtf" --copy "$(topsrcdir)/camino/docs/Release Notes $(_RELNOTE_VERSION).rtf:Release Notes.rtf" --attribute "E:/ReadMe.rtf:/Release Notes.rtf"
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
# The core build system thinks it's Mozilla. Override what's necessary.
MOZ_APP_DISPLAYNAME=Camino
MOZ_PKG_APPNAME=camino
MOZ_PKG_VERSION=0.9a2
# Override toolkit/mozapps/installer/package-name.mk - we're Mac-only, and
# handle localizations differently, so just use name-version.
PKG_BASENAME=$(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION)

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Binary file not shown.

View File

@ -226,6 +226,10 @@ ifeq ($(OS_ARCH),WINNT)
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/macbuild/thunderbird.icns $(DIST)/branding/thunderbird.icns
cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
cp $(srcdir)/macbuild/license.r $(DIST)/branding/license.r
endif
ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
mail/app/macbuild/disk.icns Normal file

Binary file not shown.

BIN
mail/app/macbuild/dsstore Executable file

Binary file not shown.

View File

@ -102,6 +102,13 @@ $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
MOZ_PKG_MAC_DSSTORE=branding/dsstore
MOZ_PKG_MAC_BACKGROUND=branding/background.png
MOZ_PKG_MAC_ICON=branding/disk.icns
MOZ_PKG_MAC_RSRC=branding/license.r
endif
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
installer:

View File

@ -38,6 +38,10 @@ endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/firefox.icns $(DIST)/branding/firefox.icns
cp $(srcdir)/document.icns $(DIST)/branding/document.icns
cp $(srcdir)/dsstore $(DIST)/branding/dsstore
cp $(srcdir)/background.png $(DIST)/branding/background.png
cp $(srcdir)/disk.icns $(DIST)/branding/disk.icns
cp $(srcdir)/license.r $(DIST)/branding/license.r
endif
ifeq ($(OS_ARCH),WINNT)
cp $(srcdir)/firefox.ico $(DIST)/branding/app.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Binary file not shown.

View File

@ -45,6 +45,10 @@ export::
cp $(srcdir)/thunderbird-os2.ico $(DEPTH)/mail/app/icons/os2/messengerWindow.ico
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/thunderbird.icns $(DIST)/branding/thunderbird.icns
cp $(srcdir)/dsstore $(DIST)/branding/dsstore
cp $(srcdir)/background.png $(DIST)/branding/background.png
cp $(srcdir)/disk.icns $(DIST)/branding/disk.icns
cp $(srcdir)/license.r $(DIST)/branding/license.r
endif
cp $(srcdir)/thunderbird.ico $(DIST)/branding/app.ico
cp $(srcdir)/Header.bmp $(DIST)/branding/Header.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Binary file not shown.

View File

@ -22,6 +22,7 @@
# Contributor(s):
# Benjamin Smedberg <bsmedberg@covad.net>
# Arthur Wiebe <artooro@gmail.com>
# Mark Mentovai <mark@moxienet.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -95,8 +96,25 @@ else
_APPNAME = $(MOZ_APP_DISPLAYNAME).app
endif
PKG_SUFFIX = .dmg
_ABS_TOPSRCDIR = $(shell cd $(topsrcdir) && pwd)
MAKE_PACKAGE = $(_ABS_TOPSRCDIR)/build/package/mac_osx/make-diskimage $(PKG_BASENAME).dmg $(MOZ_PKG_APPNAME) $(MOZ_APP_DISPLAYNAME)
PKG_DMG_FLAGS =
ifneq (,$(MOZ_PKG_MAC_DSSTORE))
PKG_DMG_FLAGS += --copy "$(MOZ_PKG_MAC_DSSTORE):/.DS_Store"
endif
ifneq (,$(MOZ_PKG_MAC_BACKGROUND))
PKG_DMG_FLAGS += --mkdir /.background --copy "$(MOZ_PKG_MAC_BACKGROUND):/.background"
endif
ifneq (,$(MOZ_PKG_MAC_ICON))
PKG_DMG_FLAGS += --icon "$(MOZ_PKG_MAC_ICON)"
endif
ifneq (,$(MOZ_PKG_MAC_RSRC))
PKG_DMG_FLAGS += --resource "$(MOZ_PKG_MAC_RSRC)"
endif
ifneq (,$(MOZ_PKG_MAC_EXTRA))
PKG_DMG_FLAGS += $(MOZ_PKG_MAC_EXTRA)
endif
MAKE_PACKAGE = $(topsrcdir)/build/package/mac_osx/pkg-dmg \
--source "$(MOZ_PKG_APPNAME)" --target "$(PACKAGE)" \
--volname "$(MOZ_APP_DISPLAYNAME)" $(PKG_DMG_FLAGS)
UNMAKE_PACKAGE = \
set -e; \
unset NEXT_ROOT; \