Bug 1407285 - Support spaces in MOZ_MACBUNDLE_NAME and in various Makefile and tools r=glandium

MozReview-Commit-ID: Eda1qiPCTJ0

--HG--
extra : rebase_source : c85c5e8bfb5a0f0dc673ea0b6fce1ac1162d9497
This commit is contained in:
Sylvestre Ledru 2017-11-28 23:21:54 +01:00
parent 545f2e85ea
commit 250a624c2a
7 changed files with 43 additions and 43 deletions

View file

@ -78,24 +78,24 @@ MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_A
.PHONY: repackage .PHONY: repackage
tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) features tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) features
rm -rf $(dist_dest) rm -rf $(dist_dest)
$(MKDIR) -p $(dist_dest)/Contents/MacOS $(MKDIR) -p '$(dist_dest)/Contents/MacOS'
$(MKDIR) -p $(dist_dest)/$(LPROJ) $(MKDIR) -p '$(dist_dest)/$(LPROJ)'
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(dist_dest) --exclude English.lproj rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents '$(dist_dest)' --exclude English.lproj
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/$(LPROJ) rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ '$(dist_dest)/$(LPROJ)'
sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' -e 's|%MOZ_DEVELOPER_REPO_PATH%|$(topsrcdir)|' -e 's|%MOZ_DEVELOPER_OBJ_PATH%|$(topobjdir)|' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' -e 's|%MOZ_DEVELOPER_REPO_PATH%|$(topsrcdir)|' -e 's|%MOZ_DEVELOPER_OBJ_PATH%|$(topobjdir)|' $(srcdir)/macbuild/Contents/Info.plist.in > '$(dist_dest)/Contents/Info.plist'
sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/$(LPROJ)/InfoPlist.strings sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > '$(dist_dest)/$(LPROJ)/InfoPlist.strings'
rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(dist_dest)/Contents/Resources rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ '$(dist_dest)/Contents/Resources'
rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(dist_dest)/Contents/MacOS rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'
$(RM) $(dist_dest)/Contents/MacOS/$(MOZ_APP_NAME) $(RM) '$(dist_dest)/Contents/MacOS/$(MOZ_APP_NAME)'
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) $(dist_dest)/Contents/MacOS rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
cp -RL $(DIST)/branding/firefox.icns $(dist_dest)/Contents/Resources/firefox.icns cp -RL $(DIST)/branding/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
cp -RL $(DIST)/branding/document.icns $(dist_dest)/Contents/Resources/document.icns cp -RL $(DIST)/branding/document.icns '$(dist_dest)/Contents/Resources/document.icns'
$(MKDIR) -p $(dist_dest)/Contents/Library/LaunchServices $(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices'
ifdef MOZ_UPDATER ifdef MOZ_UPDATER
mv -f $(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater $(dist_dest)/Contents/Library/LaunchServices mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
ln -s ../../../../Library/LaunchServices/org.mozilla.updater $(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
endif endif
printf APPLMOZB > $(dist_dest)/Contents/PkgInfo printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
endif endif
.PHONY: features .PHONY: features

View file

@ -110,19 +110,19 @@ include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
ifeq (bundle, $(MOZ_FS_LAYOUT)) ifeq (bundle, $(MOZ_FS_LAYOUT))
BINPATH = $(_BINPATH) BINPATH = $(_BINPATH)
DEFINES += -DAPPNAME=$(_APPNAME) DEFINES += -DAPPNAME='$(_APPNAME)'
else else
# Every other platform just winds up in dist/bin # Every other platform just winds up in dist/bin
BINPATH = bin BINPATH = bin
endif endif
DEFINES += -DBINPATH=$(BINPATH) DEFINES += -DBINPATH='$(BINPATH)'
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
RESPATH = $(_APPNAME)/Contents/Resources RESPATH = $(_APPNAME)/Contents/Resources
else else
RESPATH = $(BINPATH) RESPATH = $(BINPATH)
endif endif
DEFINES += -DRESPATH=$(RESPATH) DEFINES += -DRESPATH="$(RESPATH)"
LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD))) LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))

View file

@ -171,10 +171,10 @@ endif
ident: ident:
@printf 'fx_revision ' @printf 'fx_revision '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \ @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
$(STAGEDIST)/application.ini App SourceStamp '$(STAGEDIST)'/application.ini App SourceStamp
@printf 'buildid ' @printf 'buildid '
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \ @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py \
$(STAGEDIST)/application.ini App BuildID '$(STAGEDIST)'/application.ini App BuildID
# test target, depends on make package # test target, depends on make package
# try to repack x-test, with just toolkit/defines.inc being there # try to repack x-test, with just toolkit/defines.inc being there

View file

@ -4537,13 +4537,13 @@ MOZ_ARG_WITH_STRING(macbundlename-prefix,
Prefix for MOZ_MACBUNDLE_NAME], Prefix for MOZ_MACBUNDLE_NAME],
[ MOZ_MACBUNDLE_NAME_PREFIX="$withval"]) [ MOZ_MACBUNDLE_NAME_PREFIX="$withval"])
MOZ_MACBUNDLE_NAME=`echo $MOZ_APP_DISPLAYNAME | tr -d ' '` MOZ_MACBUNDLE_NAME=$MOZ_APP_DISPLAYNAME
if test "$MOZ_MACBUNDLE_NAME_PREFIX"; then if test "$MOZ_MACBUNDLE_NAME_PREFIX"; then
MOZ_MACBUNDLE_NAME="${MOZ_MACBUNDLE_NAME_PREFIX}${MOZ_MACBUNDLE_NAME}" MOZ_MACBUNDLE_NAME="${MOZ_MACBUNDLE_NAME_PREFIX} ${MOZ_MACBUNDLE_NAME}"
fi fi
if test "$MOZ_DEBUG"; then if test "$MOZ_DEBUG"; then
MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}Debug.app MOZ_MACBUNDLE_NAME="${MOZ_MACBUNDLE_NAME} Debug.app"
else else
MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}.app MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}.app
fi fi

View file

@ -46,7 +46,7 @@ stage-package: multilocale.json locale-manifest.in $(MOZ_PKG_MANIFEST) $(MOZ_PKG
$(if $(JARLOG_DIR),$(addprefix --jarlog ,$(wildcard $(JARLOG_FILE_AB_CD)))) \ $(if $(JARLOG_DIR),$(addprefix --jarlog ,$(wildcard $(JARLOG_FILE_AB_CD)))) \
$(if $(OPTIMIZEJARS),--optimizejars) \ $(if $(OPTIMIZEJARS),--optimizejars) \
$(addprefix --compress ,$(JAR_COMPRESSION)) \ $(addprefix --compress ,$(JAR_COMPRESSION)) \
$(MOZ_PKG_MANIFEST) $(DIST) $(DIST)/$(MOZ_PKG_DIR)$(if $(MOZ_PKG_MANIFEST),,$(_BINPATH)) \ $(MOZ_PKG_MANIFEST) '$(DIST)' '$(DIST)'/$(MOZ_PKG_DIR)$(if $(MOZ_PKG_MANIFEST),,$(_BINPATH)) \
$(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES))) $(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES)))
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/find-dupes.py $(DEFINES) $(ACDEFINES) $(MOZ_PKG_DUPEFLAGS) $(DIST)/$(MOZ_PKG_DIR) $(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/find-dupes.py $(DEFINES) $(ACDEFINES) $(MOZ_PKG_DUPEFLAGS) $(DIST)/$(MOZ_PKG_DIR)
ifndef MOZ_IS_COMM_TOPDIR ifndef MOZ_IS_COMM_TOPDIR

View file

@ -83,15 +83,15 @@ make_add_instruction() {
# before performing this add instruction. # before performing this add instruction.
testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/') testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/')
notice " add-if \"$testdir\" \"$f\"" notice " add-if \"$testdir\" \"$f\""
echo "add-if \"$testdir\" \"$f\"" >> $filev2 echo "add-if \"$testdir\" \"$f\"" >> "$filev2"
if [ ! $filev3 = "" ]; then if [ ! $filev3 = "" ]; then
echo "add-if \"$testdir\" \"$f\"" >> $filev3 echo "add-if \"$testdir\" \"$f\"" >> "$filev3"
fi fi
else else
notice " add \"$f\"$forced" notice " add \"$f\"$forced"
echo "add \"$f\"" >> $filev2 echo "add \"$f\"" >> "$filev2"
if [ ! $filev3 = "" ]; then if [ ! $filev3 = "" ]; then
echo "add \"$f\"" >> $filev3 echo "add \"$f\"" >> "$filev3"
fi fi
fi fi
} }
@ -138,12 +138,12 @@ make_patch_instruction() {
# before performing this add instruction. # before performing this add instruction.
testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/') testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/')
notice " patch-if \"$testdir\" \"$f.patch\" \"$f\"" notice " patch-if \"$testdir\" \"$f.patch\" \"$f\""
echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" >> $filev2 echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" >> "$filev2"
echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" >> $filev3 echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" >> "$filev3"
else else
notice " patch \"$f.patch\" \"$f\"" notice " patch \"$f.patch\" \"$f\""
echo "patch \"$f.patch\" \"$f\"" >> $filev2 echo "patch \"$f.patch\" \"$f\"" >> "$filev2"
echo "patch \"$f.patch\" \"$f\"" >> $filev3 echo "patch \"$f.patch\" \"$f\"" >> "$filev3"
fi fi
} }
@ -172,18 +172,18 @@ append_remove_instructions() {
if [ ! $(echo "$f" | grep -c '^#') = 1 ]; then if [ ! $(echo "$f" | grep -c '^#') = 1 ]; then
if [ $(echo "$f" | grep -c '\/$') = 1 ]; then if [ $(echo "$f" | grep -c '\/$') = 1 ]; then
notice " rmdir \"$f\"" notice " rmdir \"$f\""
echo "rmdir \"$f\"" >> $filev2 echo "rmdir \"$f\"" >> "$filev2"
echo "rmdir \"$f\"" >> $filev3 echo "rmdir \"$f\"" >> "$filev3"
elif [ $(echo "$f" | grep -c '\/\*$') = 1 ]; then elif [ $(echo "$f" | grep -c '\/\*$') = 1 ]; then
# Remove the * # Remove the *
f=$(echo "$f" | sed -e 's:\*$::') f=$(echo "$f" | sed -e 's:\*$::')
notice " rmrfdir \"$f\"" notice " rmrfdir \"$f\""
echo "rmrfdir \"$f\"" >> $filev2 echo "rmrfdir \"$f\"" >> "$filev2"
echo "rmrfdir \"$f\"" >> $filev3 echo "rmrfdir \"$f\"" >> "$filev3"
else else
notice " remove \"$f\"" notice " remove \"$f\""
echo "remove \"$f\"" >> $filev2 echo "remove \"$f\"" >> "$filev2"
echo "remove \"$f\"" >> $filev3 echo "remove \"$f\"" >> "$filev3"
fi fi
fi fi
fi fi

View file

@ -67,13 +67,13 @@ list_files files
popd popd
# Add the type of update to the beginning of the update manifests. # Add the type of update to the beginning of the update manifests.
> $updatemanifestv2 > "$updatemanifestv2"
> $updatemanifestv3 > "$updatemanifestv3"
notice "" notice ""
notice "Adding type instruction to update manifests" notice "Adding type instruction to update manifests"
notice " type complete" notice " type complete"
echo "type \"complete\"" >> $updatemanifestv2 echo "type \"complete\"" >> "$updatemanifestv2"
echo "type \"complete\"" >> $updatemanifestv3 echo "type \"complete\"" >> "$updatemanifestv3"
notice "" notice ""
notice "Adding file add instructions to update manifests" notice "Adding file add instructions to update manifests"