• 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: How to copy correct framework for build configuration?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to copy correct framework for build configuration?


  • Subject: Re: How to copy correct framework for build configuration?
  • From: Rippit the Ogg Frog <email@hidden>
  • Date: Fri, 07 Jul 2006 01:13:25 -0300

Scott Tooker wrote:
> I believe you'll want to use $(BUILT_PRODUCTS_DIR) to reference the
> location of the frameworks per-configuration. As long as all three
> targets build into the same base built products directory and share
> the same set of configuration names, this should work (the copy files
> build phase should be on the application target).

I think that should work, but it doesn't in my case. Either there's still something wrong with my configuration or I've discovered a bug in XCode 2.3. Maybe my unusual configuration is stimulating one:

I'm writing what is meant to be a massively a cross-platform application. I've configured my projects so that all the build products for all the platforms go in a subdirectory of a directory named "Arch", like this:

./Arch/mac-os-x/10.3/Debug
./Arch/mac-os-x/10.3/Release
./Arch/mac-os-x/10.4/Debug
./Arch/mac-os-x/10.4/Release
./Arch/win32-i386/Debug
...

I have the projects for the different development environments all in a subdirectory of "Projects"

./Projects/XCode/OggFrog
./Projects/XCode/Vorbis
./Projects/CW8/OggFrog (CodeWarrior 8, for Windows)
./Projects/CW8/Vorbis

What makes me think there's a bug in XCode is that I would expect that for a framework search path of $(BUILT_PRODUCTS_DIR) to achieve the goal of copying the right framework for the build configuration, that when I add them to my project I should set the reference type to "Relative to Build Product". But that doesn't work: the items get added, but their names are shown in red, and their icons are blank rectangles rather than framework icons. Also if I select more than one and press the Info button, it says: "Full Path: Multiple selection, some don't exist on disk".

Then the Copy Files build phase doesn't allow me to drag 'n drop any of the frameworks - it doesn't show the black line while my mouse is hovering over the drop location; I can add them just fine when the reference is relative to the project.

What's crazy is that the inspector shows the correct path for the build-relative frameworks, but in red!

If you think this could be a bug, I'd be happy to create a test case and file a bug report. Alternatively, I could send you my entire source code - it's a GPLed Free Software project.

Could this still be a misconfiguration?  Let me explain how I've set it up:

In each of my projects' General Info panes, I've set both the "Place Build Products In" and "Place Intermediate Build Files" items to:

../../../Arch/mac-os-x

I have two targets in each project, one to deploy on 10.4, and the other to deploy on 10.3. In each project's Build Info, I have Build Products Path set to:

$(SYMROOT)/$(MACOSX_DEPLOYMENT_TARGET)

or ../../../Arch/mac-os-x/10.4

The Intermediate Build Files is set to just:

$(SYMROOT)/build

It seems to get the new value of $(SYMROOT) from the item above, because it correctly resolves to ../../../Arch/mac-os-x/10.4, and all my targets and configurations are built in the right directories, but I'm wondering if the fact that defining SYMROOT in terms of an earlier SYMROOT is creating a loop that screws XCode up when I use build-product relative references.

The initial value of SYMROOT is set to the "Place Build Products In" item from the project's General Info.

Could there be a better way to configure this that would work for me?

For now, I can live with documenting this in my source code's build instructions, and always copying the debug frameworks while I'm coding, then changing it to always copy the release frameworks when I'm getting ready to issue a release.

Could I work around this by doing the copy with a Run Script phase? Maybe I'll try that.

Thanks for your help.

Rippit the Ogg Frog
email@hidden
http://www.oggfrog.com/






_______________________________________________ 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
  • Prev by Date: Xcode crashes when compiling a PowerPlant file...
  • Next by Date: Re: Building docs from source: doxygen and HeaderDoc
  • Previous by thread: Re: How to copy correct framework for build configuration?
  • Next by thread: Corrupt project file?
  • Index(es):
    • Date
    • Thread