Set app name in InfoPlist.strings during build

RESOLVED FIXED

Status

SeaMonkey
Build Config
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Robert Kaiser, Assigned: stefanh)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

12 years ago
We should probably do the same as FF/TB did in bug 343931 for SeaMonkey's files in suite/app/macbuild, esp. for InfoPlist.strings (even if we're normally using the same brand name everywhere, that solution is cleaner than just hardcoding.
(Assignee)

Comment 1

12 years ago
Created attachment 234271 [details] [diff] [review]
Set appname etc during build and make a utf-16 InfoPlist.strings

This is basically the same patch as the one in bug 343931. Well, I had to escape the "@":s and we use a MOZ prefix. I also removed the period at the copyright line and changed "Mozilla.org" to "mozilla.org" (it looks like we where the only ones using capital "M"). Note that the InfoPlist.strings in suite/app/macbuild/Contents/Resources/English.lproj/ should be cvs removed.

I don't know who should review this - KaiRo?
Assignee: nobody → stefanh
Status: NEW → ASSIGNED
Attachment #234271 - Flags: review?(kairo)
(Assignee)

Comment 2

12 years ago
Created attachment 234276 [details] [diff] [review]
Correct version

Bah, forgot one copyright line. This one should be ok.
Attachment #234271 - Attachment is obsolete: true
Attachment #234276 - Flags: review?(kairo)
Attachment #234271 - Flags: review?(kairo)
(Assignee)

Comment 3

12 years ago
Comment on attachment 234276 [details] [diff] [review]
Correct version

Mark, could you take a quick look at this? You should recognize the code... :-)

This is for the forthcoming suiterunner, so  we don't use it in our regular trunk builds (ie, not part of any "official" build).
Attachment #234276 - Flags: review?(kairo) → review?(mark)

Comment 4

12 years ago
Comment on attachment 234276 [details] [diff] [review]
Correct version

>+++ suite/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in	Wed Aug 16

>+NSHumanReadableCopyright = "Copyright © 1998-2006 Contributors to mozilla.org";

Don't we usually just use "Contributors" these days?

>Index: suite/app/Makefile.in

>+	sed -e "s/\@MOZ_APP_NAME\@/$(MOZ_APP_NAME)/" -e "s/\@MOZ_APP_DISPLAYNAME\@/$(MOZ_APP_DISPLAYNAME)/" -e "s/\@MOZ_APP_VERSION\@/$(MOZ_APP_VERSION)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist

What's with the backslashes?
(Reporter)

Comment 5

12 years ago
> What's with the backslashes?

That's tricky ;-)
We need them so that the .in preprocessing step doesn't already replace @MOZ_APP_NAME@ et al. with the vars themselves. We apparently use them for the same reason in other Makefile.ins as well.
(Assignee)

Comment 6

12 years ago
(In reply to comment #4)
> (From update of attachment 234276 [details] [diff] [review] [edit])
> >+++ suite/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in	Wed Aug 16
> 
> >+NSHumanReadableCopyright = "Copyright © 1998-2006 Contributors to mozilla.org";
> 
> Don't we usually just use "Contributors" these days?

Even though I prefer to just use "Contributors" it looks like Gerv wants "Contributors to mozilla.org", see https://bugzilla.mozilla.org/show_bug.cgi?id=299581#c14. Don't ask me why.
 
> >Index: suite/app/Makefile.in
> 
> >+	sed -e "s/\@MOZ_APP_NAME\@/$(MOZ_APP_NAME)/" -e "s/\@MOZ_APP_DISPLAYNAME\@/$(MOZ_APP_DISPLAYNAME)/" -e "s/\@MOZ_APP_VERSION\@/$(MOZ_APP_VERSION)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
> 
> What's with the backslashes?
> 

See comment #5. As KaiRo points out, not escaping the "@" makes the preprocessing replace @MOZ_APP_NAME@ with the value of MOZ_APP_NAME. So, sed never do any substitution and you end up with a InfoPlist.strings file with @MOZ_APP_NAME@ etc. It almost made me insane..

Comment 7

12 years ago
Comment on attachment 234276 [details] [diff] [review]
Correct version

OK, looks good, then.
Attachment #234276 - Flags: review?(mark) → review+
(Assignee)

Comment 8

12 years ago
Checked in by Mark Banner (thanks).
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 9

12 years ago
> > What's with the backslashes?
> 
> See comment #5. As KaiRo points out, not escaping the "@" makes the
> preprocessing replace @MOZ_APP_NAME@ with the value of MOZ_APP_NAME. So, sed
> never do any substitution and you end up with a InfoPlist.strings file with
> @MOZ_APP_NAME@ etc. It almost made me insane..

That should be worth a comment in the respective file... 

You need to log in before you can comment on or make changes to this bug.