Re: mount .dmg and run file from there
Re: mount .dmg and run file from there
- Subject: Re: mount .dmg and run file from there
- From: Uli Kusterer <email@hidden>
- Date: Sun, 20 Feb 2011 07:58:47 +0100
On 19.02.2011, at 13:12, Crni Gorac wrote:
> Am working on a small application that would download given larger
> .dmg installer, showing download progress along the way, and then
> mount .dmg image and run .pkg file from this image. I have everything
> working properly, except for that last step. I'm using NSWorkspace
> openFile to mount the .dmg image after downloading it, but I don't
> know how to run the .pkg file from the mounted image (note that .dmg
> file name is varying, basically it's like ExampleApp-x.y.z.dmg, where
> "x", "y" and "z" are numbers). Any suggestions?
Sparkle does that. It calls the hdiutil command line tool using NSTask, which lets you not only mount the DMG, but also query/specify where it will be mounted. Then you just have to list the contents at that location to find the PKG to run.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.masters-of-the-void.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden