Closed Bug 714951 Opened 13 years ago Closed 12 years ago

[Mac] Aurora & Nightly icons incorrectly positioned in mounted DMG image's finder window

Categories

(Firefox Build System :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(firefox11 affected)

RESOLVED FIXED
mozilla12
Tracking Status
firefox11 --- affected

People

(Reporter: dholbert, Assigned: smichaud)

References

Details

Attachments

(2 files)

Attached image screenshot
In the mounted DMG images' Finder windows for Nightly and Aurora, the icon is mispositioned -- it's at the upper-left, covering up the application name.  It's correctly positioned in Beta, though.

See attached screenshot, using the latest nightly, aurora, and beta DMG files available at
 http://nightly.mozilla.org/
 http://firefox.com/channel/

Saw this on a friend's Mac last night, and confirmed it on my mac mini today.

I'm running OS X 10.6.8.

(Widget: Cocoa is probably the wrong component, but I'm hoping it at least will get this on the radar of the right person.)
(sorry if this is a dupe -- I suspect someone must've filed this already, but I didn't see any obvious dups in a quick search)
This started with the 2011-12-17 mozilla-central and aurora nightlies, testing on both OS X 10.6.8 and 10.5.8.  I'll try to figure out what caused it.
OS: Linux → Mac OS X
Hardware: x86_64 → All
> I'll try to figure out what caused it.

Seems that it was the patch for bug 696436.
Blocks: 696436
Ah yes, limi reported this in a comment on that bug:
 https://bugzilla.mozilla.org/show_bug.cgi?id=696436#c29
Note that bug 696436's patch specifically targets Nightly- & Aurora-branded builds -- so this bug shouldn't affect any beta or release builds, ever.

So, while Firefox 10 & 11 are technically affected by this, we don't necessarily need to backport a fix to those branches.
browser/branding/dsstore (a binary file) needs to be regenerated to fix this bug (to accommodate the name change).  I don't know how to do that.
(Following up comment #5)

Oops, it's both of the following files that need to be regenerated:

browser/branding/aurora/dsstore
browser/branding/nightly/dsstore
The command "strings browser/branding/aurora/dsstore" brings up three distinct mentions of the username "stephen":
> Users/stephen/Desktop/Aurora.dmg
> (Storage:Users:stephen:Desktop:Aurora.dmg
> -Macintosh HD:Users:stephen:Desktop:Aurora.dmg

That suggests to me that a "Stephen" (probably shorlander?) generated those files & would know how to re-generate them.
Yes, shorlander regenerated these last time we needed them. IIRC this file format is undocumented, and the easiest way to generate them is to make changes using the Finder UI to a mounted DMG in the oldest version of OS X that you care to support, and then copy the generated dsstore from that.
Component: Widget: Cocoa → Build Config
Product: Core → Firefox
QA Contact: cocoa → build.config
> make changes using the Finder UI to a mounted DMG in the oldest
> version of OS X that you care to support

A mounted DMG is read-only.  Anyone know how to simulate a mounted DMG
so that the copy is writable?

I have OS X 10.5.8.  So I can do this once I know how to do it.
(In reply to Steven Michaud from comment #9)
> > make changes using the Finder UI to a mounted DMG in the oldest
> > version of OS X that you care to support
> 
> A mounted DMG is read-only.  Anyone know how to simulate a mounted DMG
> so that the copy is writable?
> 
> I have OS X 10.5.8.  So I can do this once I know how to do it.

The DMG needs to be converted from Read to Read/Write using Disk Utility.

Probably the easiest way would be to download the Nightly and Aurora DMGs, convert them to Read/Write, mount them, reposition the icon, eject them and convert them back to compressed. Then use the resulting .DS_Store.
Attached patch FixSplinter Review
Thanks, Stephen!

I regenerated the .DS_Store files for the mozilla-central and aurora
nightlies.  This patch updates the tree's corresponding dsstore files.

Here are tryserver builds to test with:

mozilla-central
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/smichaud@pobox.com-d39b969a52bd/try-macosx64/firefox-12.0a1.en-US.mac.dmg

aurora
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/smichaud@pobox.com-a791fe66e63f/try-macosx64/firefox-11.0a2.en-US.mac.dmg

For future reference, here's how I regenerated the .DS_Store files.  I
did it by hand on a laptop using the track pad.  This probably isn't
the best way -- it can't achieve perfect accuracy.  But I did what I
could to keep the icon's position the same as it was before the patch
for bug 696436 landed.  And in any case I don't have access to better
tools.

1) Boot	into OS	X 10.5.8.

2) Download the DMG file for the appropriate nightly (mozilla-central
   or aurora).

3) Use Disk Utility to convert (Images : Convert) the DMG file from
   "compressed" to "read/write".

4) Double-click on the converted DMG file to mount it.

5) Drag the app icon (FirefoxNightly or AuroraNightly) to the correct
   position.  Be sure not to change the	Nightly/Aurora window's
   position or size, and to leave it open.

6) At a Terminal prompt, change to the directory where the DMG file is
   mounted (usually /Volumes/Nightly or /Volumes/Aurora).  Then copy
   the top-level .DS_Store file to a dsstore file located elsewhere.

There are other, similar problems that this patch doesn't fix, which
will also require some code changes.  Here are two that I've found
(one of which has already been mentioned above).  I'll open bugs on
each of these additional problems as necessary, and provide fixes.

1) The app icon is also incorrectly positioned in the debug nightlies.

2) The app in the beta debug nightlies is named "FirefoxFirefoxDebug".
Assignee: nobody → smichaud
Comment on attachment 586451 [details] [diff] [review]
Fix

I don't know who should review this patch.

If you think someone else is more appropriate, Stephen, please request that person to do the review.
Attachment #586451 - Flags: review?(shorlander)
(In reply to Steven Michaud from comment #11)
> 1) The app icon is also incorrectly positioned in the debug nightlies.

This would be trickier to fix, I think, since it would require using a different dsstore for debug builds. But it's an existing problem, right? We've always used different bundle names for debug builds. I don't think we need to worry much about how they look when packaged in a DMG.

> 2) The app in the beta debug nightlies is named "FirefoxFirefoxDebug".

We never ship nightly builds from the beta branch, as far as I know, so this is also a low priority to fix, I think.
>> 1) The app icon is also incorrectly positioned in the debug
>> nightlies.
>
> This would be trickier to fix, I think, since it would require using
> a different dsstore for debug builds.

Every build with a different app name requires its own dsstore.  So to
fix the	app icon location problem with debug builds would require at
least two additional dsstore files (one for "NightlyDebug" and one for
"AuroraDebug").	 And code changes too, of course.

> But it's an existing problem, right?

Yes.  The problem with debug builds existed before the patch for bug
696436 landed.

> I don't think we need to worry much about how they look when
> packaged in a DMG.

>> 2) The app in the beta debug nightlies is named
>> "FirefoxFirefoxDebug".
>
> We never ship nightly builds from the beta branch, as far as I know,
> so this is also a low priority to fix, I think.

This is fine with me :-)  I'm happy to leave these problems for someone
else to fix.
Comment on attachment 586451 [details] [diff] [review]
Fix

Shorlander apparently doesn't have time for this.

Gavin, could you do the review?  Or find someone else to do it?
Attachment #586451 - Flags: review?(shorlander) → review?(gavin.sharp)
Comment on attachment 586451 [details] [diff] [review]
Fix

looks good to me, thanks!
Attachment #586451 - Flags: review?(gavin.sharp) → review+
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/80da2e1c26b6

As a side note, setting [inbound] in the whiteboard is no more needed, unless you use it for your own tracking purposes.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 12
Component: Build Config → General
Product: Firefox → Firefox Build System
Target Milestone: Firefox 12 → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: