Creating a dmg (was Re: NSWorkspace)
Creating a dmg (was Re: NSWorkspace)
- Subject: Creating a dmg (was Re: NSWorkspace)
- From: m <email@hidden>
- Date: Thu, 4 Aug 2005 14:09:29 -0700
On Aug 4, 2005, at 11:40 AM, Bret Kurth wrote:
I've been fiddling about for a few days (unsuccessfully) trying to
figure out the proper AppleEvent for telling the Finder to compress
a path. Any chance there is a bit of sample code or documentation
lying about that shows how to do this? Thanks in advance.
Here's some code I harvested from a project of mine. It should be
enough to get you somewhere.
NSTask* makeImageTask = [[[NSTask alloc]init]autorelease];
[makeImageTask setLaunchPath: @"/bin/sh"];
NSString* cmdString = [NSString stringWithFormat: @"echo -n %@ |
hdiutil create '%@' -srcfolder '%@' -encryption -stdinpass",
imagePassword,
imagePath,
directoryPath];
NSArray *args = [NSArray arrayWithObjects: @"-c", cmdString, nil];
[makeImageTask setArguments:args];
[makeImageTask launch];
[makeImageTask waitUntilExit];
_murat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden