Resources and dependencies
Resources and dependencies
- Subject: Resources and dependencies
- From: "Kevin Meaney" <email@hidden>
- Date: Tue, 24 Jan 2006 11:08:37 +0000
- Organization: Softpress
G'day all,
We are still building our resources using codewarrior because the
codewarrior resource compiler can cope with enums and we have used this
extensively so that we can have common header files for our c++ source
files and the resource .r files.
I have added a "run script phase" to the Xcode target that gets
codewarrior to build the resources. In this circumstance it is up to
codewarrior to decide if the resources need to be recompiled.
Because we have slightly different resources for our debug version
compared to our release version, I have added to our Xcode project a .r
file that loads the appropriate resource file. See as follows:
#if APP_XCODE_DEBUG
include "../Binaries/ApplicationDebug.rsrc" not 'carb';
#else
include "../Binaries/Application.rsrc" not 'carb';
#endif
This file is compiled as part of the Build ResourceManager Resources phase.
What is not happening is when the .rsrc files are rebuilt, Xcode is not
picking up that the .r file in the Build ResourceManager Resources needs
to be compiled again.
Is there an alternative solution, that will get the dependencies right?
A couple of options that have been considered:
In the applescript that gets codewarrior to build the resources, check
to see if a new resource file is generated, and if it has get Xcode via
applescript to either touch or compile the individual resource file.
Unfortunately I couldn't find in the Xcode applescript dictionary a
command to either touch or compile an individual file. Also I don't
think the compile option would work anyway because Xcode will be in the
middle of a build (It will be running the Run Script build phase at this
time), so a compile command will probably just be ignored.
Touching the .r file in the command line, or applescripting finder is
not an option because that will just confuse cvs.
Kevin
_______________________________________________
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