Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

caveman_uk

Guest
Original poster
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
Hi,

I've got an xcode project with two targets - one is a cocoa app and the other is a shell tool which is called by the app to handle operations that require root access. Both build fine on their own.

One problem. I want the shell tool to compile as a resource in the bundle for the app. I know I could just copy the tool into the app bundle but I was wondering if there was a way in xcode to do it so only one bundle is produced with everything in the right place?

Thanks in advance for any ideas, links etc
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
I believe you need to do two things:

1. Make the command-line application dependent on the cocoa application (I know, in reality, it's the other way around)
2. Alter the build settings for the command line utility so that the executable ends up in the resources directory of the cocoa application.

Making sure the Cocoa application builds first by creating a dependency will ensure that the resources directory exists when the command line utility gets built.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.