Re: Setting xcodeproj-relative working directory
Re: Setting xcodeproj-relative working directory
- Subject: Re: Setting xcodeproj-relative working directory
- From: Andreas Grosam <email@hidden>
- Date: Sun, 16 Dec 2012 22:16:28 +0100
On 16.12.2012, at 04:30, Tom Seddon wrote:
> Is it possible to set an xcodeproj-relative working directory in a scheme? The goal is just to have the program able to get access some test data using relative paths, without requiring each programmer to set up a working folder in the shared scheme.
You can set a working directory in the Options tab of the Run Scheme. I'm just not sure if build settings are available here.
If this isn't working, you can set program arguments - which are passed to the main function. There, build settings are available.
>
> I also tried adding a Copy Files build phase, to get the data into the build products folder. But a Copy Files build phase can't copy folders, it seems. (Well, I suppose it is called Copy *Files*.) The program is a command-line program, so there's no bundle for Copy Bundle Files to work with.
You can always add a script to the Build Scheme that will be executed before or after building. For more complex folder structures and large data, you may want to use the UNIX tool rsync, in order to avoid unnecessary copying data, and reliable get data files which are removed/deleted from the project folder also removed from the build products folder. Implementing a script that properly supports all build actions may a bit elaborate, though.
>
> Solutions or alternative suggestions sought!
_______________________________________________
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