[vlc-devel] [PATCH] Make the Mac DMG prettier.

Rafaël Carré rafael.carre at gmail.com
Tue Dec 27 17:00:00 CET 2011


Le 2011-12-27 04:16, Felix Paul Kühne a écrit :
>
> Am 27.12.2011 um 05:04 schrieb Rafaël Carré:
>
>>> The mounted dmg is only present for a few seconds while this script is running, so there is a high chance of not conflicting with anything running on the dev's box.
>>
>> Using a path relative to our build directory, there is infinitely less chances of a conflict.
> True, but I think this would solve a non-existing problem. Since 2004, I never heard a single person complaining about this...
>
>> Also no knowledge of MacOSX internals is required since the mount point is explicited on the command line.
> So, you guess that people try to compile who don't know /Volumes? Well, could be possible, but chances aren't that high I guess..

It happened to me, I built VLC without knowing that mounts went in /Volumes

mount command needs a mountpoint since the early days of unix:
http://www.unix.com/man-page/FreeBSD/8/mount/

>>> Additionally, the needed option "-mountroot" (for the attach command) only understands path up to a total length of 90  characters, a limit which was only recently moved to 1024 characters…
>>
>> Relative paths work: "a" is 1 character, it fits the lowest limit easily; but we can use something more explicit like "./mount" or whatever.
>>
>> Did I convince you ?
> Not really, since you need to pass an absolute path ;-)

I tested that relative paths worked before sending this mail, what 
doesn't work for you?

> More seriously, it's because of this:
> The make script passes the dmg volume's name as an argument to osascript blabla. Within the AppleScript, 3rd line, there is "tell disk" which resolves to "tell disk "VLC-1.2.x"". I doubt that AS can resolve in a custom location as a volume correctly, but feel free to prove me wrong. Note that Brendon uses the Finder's AS suite here, which behaves the same way and can do the exact same things a user can do, just faster.
> Let's push this some more: on the Mac, there's always exactly one volume with the exact same name. Let's say you open 2 VLC dmgs of the same version, both called "VLC-1.2.x". In the Finder, you'll see 2 volumes with the same name. Within /Volumes, you'll see one of them with a " 1" prefix.

I'll check

>If you want to manipulate the you mounted later on, it'll be the one 
with the " 1" suffix. You can't guess this from any public API. You need 
to know that.

That's why specifying the mount point feels better.

> So, whatever you do with the custom mount point, the Finder will not be your friend here, but it's the only guy in this game who can do what you want: make the design more pretty..



>>> There is another problem with Brendon's script which he mentioned in the related trac ticket: it requires the accessibility settings to be enabled on the box creating the dmg to let the AppleScript do the stuff he wants it to do.
>>> At present, this script doesn't check for the enabled accessibility stuff and will utterly fail on Macs with the default configuration.
>>
>> Will it fail with bad side effects?
> Sorry, I withdraw that statement. I'll check another time on a clean account, but to my surprise, it works. Must have been the sleep deprivation last night...

Ok, let's see



More information about the vlc-devel mailing list