Bug 365785: Mac: Remove extra UTF-16 to UTF-8 conversion of InfoPlist.strings.in, r=lilmatt

This commit is contained in:
philringnalda%gmail.com 2007-01-06 04:05:35 +00:00
parent 88e2cda5e1
commit debe705b79
2 changed files with 6 additions and 8 deletions

View File

@ -352,16 +352,14 @@ libs repackage:: $(PROGRAM)
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 $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(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/@MAC_CREATOR_CODE@/$(MAC_CREATOR_CODE)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
# The application name shown in the upper left is found in the UTF-16 file:
# The application name shown in the upper left is found in the file:
# MyApp.app/Contents/Resources/English.lproj/InfoPlist.strings
# We use iconv to do the charset conversion to UTF-8, pipe it through sed for the
# find and replace, and then use iconv once more to convert it back to UTF-16.
# Since all future Macs are Intel-based, we make the file UTF-16LE with a BOM.
iconv -f UTF-16LE -t UTF-8 $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
sed -e "s/@APP_NAME@/$(APP_NAME)/" | \
iconv -f UTF-8 -t UTF-16LE > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
# We pipe this file through sed for the find and replace, and then use iconv
# to convert it to UTF-16.
sed -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/MacOS
rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS/mangle $(DIST)/$(APP_NAME).app/Contents/MacOS/shlibsign
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS