• 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
Re: Run Script Build Phase and Copy Files Build Phase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run Script Build Phase and Copy Files Build Phase


  • Subject: Re: Run Script Build Phase and Copy Files Build Phase
  • From: Marc Epard <email@hidden>
  • Date: Thu, 8 May 2008 07:41:36 -0500

On May 8, 2008, at 12:02 AM, Duane Murphy wrote:

I'm trying to work out the best way to have a Run Script build phase
generate a file that needs to be used by a Copy Files build phase.

The Run Script build phase will process some files into a new file. This
new file is to be added to the Resources folder of the built project (a
framework). What is the best way to make that happen?


I can write the script to assemble the required file, but where should
it be put so that the file can be used for the Copy Files build phase?

How about the DERIVED_FILE_DIR?

And with a little more challenge, how do I handle different build
configurations? That is a different file is generated for the Debug
build than for the Release build. How do I generate a different file for
each build and have the right file get added to the Resources folder at
the end?

There is a DERIVED_FILE_DIR for each configuration.

It seems like this is an intermediate file (aka like an object file),
but how does the intermediate file get added to the Copy Files build phase?


Cause the Run Script to execute, then add the output file to the project. You might need to manually drag it to the Copy Files phase. I haven't done this for a while, but I think Xcode will recognize the per-configuration source. Someone else should jump in if I'm wrong.

Or you could just have the Run Script phase generate the file directly in the UNLOCALIZED_RESOURCES_FOLDER_PATH and skip the DERIVED_FILE_DIR.

-Marc

_______________________________________________
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


References: 
 >Run Script Build Phase and Copy Files Build Phase (From: "Duane Murphy" <email@hidden>)

  • Prev by Date: Re: where is the WebServicesCore.framework
  • Next by Date: multiple crt1.o link problems
  • Previous by thread: Re: Run Script Build Phase and Copy Files Build Phase
  • Next by thread: re: Run Script Build Phase and Copy Files Build Phase
  • Index(es):
    • Date
    • Thread