Last Comment Bug 714951 - [Mac] Aurora & Nightly icons incorrectly positioned in mounted DMG image's finder window
: [Mac] Aurora & Nightly icons incorrectly positioned in mounted DMG image's fi...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Build Config (show other bugs)
: Trunk
: All Mac OS X
: -- normal (vote)
: Firefox 12
Assigned To: Steven Michaud [:smichaud] (Retired)
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks: 696436
  Show dependency treegraph
 
Reported: 2012-01-03 13:58 PST by Daniel Holbert [:dholbert]
Modified: 2012-02-03 11:19 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
affected


Attachments
screenshot (406.34 KB, image/png)
2012-01-03 13:58 PST, Daniel Holbert [:dholbert]
no flags Details
Fix (3.77 KB, patch)
2012-01-06 09:03 PST, Steven Michaud [:smichaud] (Retired)
gavin.sharp: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2012-01-03 13:58:15 PST
Created attachment 585547 [details]
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)
Comment 1 Steven Michaud [:smichaud] (Retired) 2012-01-03 14:15:34 PST
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.
Comment 2 Steven Michaud [:smichaud] (Retired) 2012-01-03 14:22:01 PST
> I'll try to figure out what caused it.

Seems that it was the patch for bug 696436.
Comment 3 Daniel Holbert [:dholbert] 2012-01-03 14:29:06 PST
Ah yes, limi reported this in a comment on that bug:
 https://bugzilla.mozilla.org/show_bug.cgi?id=696436#c29
Comment 4 Daniel Holbert [:dholbert] 2012-01-03 14:38:41 PST
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.
Comment 5 Steven Michaud [:smichaud] (Retired) 2012-01-03 15:11:13 PST
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.
Comment 6 Steven Michaud [:smichaud] (Retired) 2012-01-03 15:14:39 PST
(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
Comment 7 Daniel Holbert [:dholbert] 2012-01-03 15:27:40 PST
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.
Comment 8 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-01-04 09:57:57 PST
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.
Comment 9 Steven Michaud [:smichaud] (Retired) 2012-01-04 10:08:36 PST
> 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.
Comment 10 Stephen Horlander [:shorlander] 2012-01-04 11:28:30 PST
(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.
Comment 11 Steven Michaud [:smichaud] (Retired) 2012-01-06 09:03:00 PST
Created attachment 586451 [details] [diff] [review]
Fix

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".
Comment 12 Steven Michaud [:smichaud] (Retired) 2012-01-06 09:05:30 PST
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.
Comment 13 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-01-06 12:09:55 PST
(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.
Comment 14 Steven Michaud [:smichaud] (Retired) 2012-01-06 12:21:00 PST
>> 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 15 Steven Michaud [:smichaud] (Retired) 2012-01-20 09:27:37 PST
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?
Comment 16 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-01-20 13:27:33 PST
Comment on attachment 586451 [details] [diff] [review]
Fix

looks good to me, thanks!
Comment 17 Steven Michaud [:smichaud] (Retired) 2012-01-23 14:20:12 PST
Comment on attachment 586451 [details] [diff] [review]
Fix

Landed on mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/80da2e1c26b6
Comment 18 Marco Bonardo [::mak] 2012-01-24 04:57:48 PST
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.

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