• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Creating a dmg (was Re: NSWorkspace)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: NSWorkspace (From: Bret Kurth <email@hidden>)

  • Prev by Date: Re: Where does NSTableView get a cell's size from, if not from cellSize?
  • Next by Date: Re: Need CVS Advice
  • Previous by thread: Re: NSWorkspace
  • Next by thread: NSArrayController duplicate display
  • Index(es):
    • Date
    • Thread