Re: XCode documentation index; executable runtime paths
Re: XCode documentation index; executable runtime paths
- Subject: Re: XCode documentation index; executable runtime paths
- From: Philip Lamb <email@hidden>
- Date: Fri, 11 Mar 2005 10:26:33 +1300
On 10/03/2005, at 6:57 AM, Mike Lazear wrote:
On Mar 8, 2005, at 7:20 PM, Philip Lamb wrote:
Mike,
Correct, I am referring to paths for executables. The strategy you
outlined is what I have been doing so far. However, this breaks if
the user to whom I send the project file puts it in a different place
in their home folder.
What I am looking for is something along the lines of a symbol that
XCode will interpret and replace with (for example) the project root,
so that I can build an executable working directory specification by
appending some sub-folder name. For example, I tried using
$SYMROOT/bin, but XCode doesn't recognise SYMROOT (or any other
symbols, it seems) in the executable path spec.
Here are another 2 to try:
$(PROJECT_DIR)
$(SRCROOT)
I have tried the latter, but not the former, although I'm not holding
out much hope for it to work. As far as I can tell, XCode just passes
the path spec directly to chdir() or something, without any
substitutions. Looking back, I filed a feature request on this with
Radar nearly a year ago (problem ID 3652862) but it is still open and
with no comments that I can see with a student ADC membership.
I'm not quite sure what you need to do with the working directory.
The code can always be written to find your unchanging data files
within the bundle of your application, thus it doesn't matter where
the executable is located. This is done with code in the program and
not some setting in Xcode. As far as data files you create they
should never go in the folder where your application is located. They
should go in the users folder as described previously. So the first
question is what kind of file are you trying to create and where does
it really belong?
Yes, I know, I know. Of course you are correct.. in an ideal world the
app would be a bundle and would have its data nicely packaged where it
could be found. BUT it is not an ideal world. The project is one with a
bastard heritage from linux and windows, and I am trying to do a nice
port to XCode so that people don't need to go the command line to run
the executables built by XCode.
I know this has been mostly an Xcode question but are your writing in
Cocoa or Carbon? Is this a command-line type app or does it have a
user interface?
The main thrust of the project is a set of libraries with some
demonstration command-line apps. The API is mixed, with some cross
platform pieces (mostly OpenGL) and some platform specific pieces
(Quicktime, Carbon AND Cocoa.)
Philip Lamb
Research Student,
Human Interface Technology Laboratory New Zealand,
University of Canterbury, Christchurch, NZ.
+64 3 3642987 x3070
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden