Re: [Cocoadev] Problem becoming a good citizen and backwards compatible
Re: [Cocoadev] Problem becoming a good citizen and backwards compatible
- Subject: Re: [Cocoadev] Problem becoming a good citizen and backwards compatible
- From: Brian Smith <email@hidden>
- Date: Mon, 15 Aug 2005 14:24:53 +0800
As another suggestion that I haven't tried, bundles seem to be more
flexible than frameworks and they are easy to load at run time with
NSBundle. You may want to factor out the code that calls the
DiskArbitration framework into a facade class that you put into the
bundle then compile the bundle into two versions-one for panther and
one for tiger. The advantage of a facade would be you can handle any
renaming, missing functionality, or additions you want. In the main
program you would check for the public version of the DiskArbitration
framework, and load the bundle that is linked to the correct version
of the framework. (Check using the normal way to check weak linked
frameworks and functionality.)
Regards,
Brian
On Aug 15, 2005, at 9:04 AM, Aaron Burghardt wrote:
Here are a couple ideas I haven't tried:
1. Do your own custom linking. Add the flag "-v" to Other Linker
Flags and you will see in the build details the actual command that
libtool uses to invoke ld. You might be able to delete the
executable that Xcode produces and link the product with a custom
ld to get the PrivateFrameworks path.
2. Factor out your DiskArbitration code to a framework and build
just that framework on Panther. Hopefully you can keep that code
small so you don't need to recompile often.
3. Edit the executable with a hex editor to change the path to the
PrivateFrameworks.
On Aug 13, 2005, at 3:59 AM, Alexander Griekspoor wrote:
Hi all!
I have the following problem: under Panther our program disctop
made use of private APIs from the Diskarbitration framework, ouch.
However, these have becoming public under Tiger, hooray! The
problem is that the framework thus moved from /System/Library/
PrivateFrameworks under Panther to /System/Library/Frameworks
under Tiger. For compatibility reasons there's still a symbolic
link in the private frameworks folder to the new location.
The problem is that I can't get my app to work under Panther while
building it on my Tiger machine using the current OS SDK. The
console reports that it can't find the framework. If I have it
build using the 10.3.9 SDK it starts to complain that it can't
find the framework already during compile time. Does anyone have
experience with this kind of situation? Should it normally work to
link to private frameworks and target previous OS's?
Any suggestions are more than welcome, the last option is always
to ship a Tiger and Panther version of my app, but I would like to
avoid at all costs, plus at this moment I can't any Panther
version at all on my Tiger machine...
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden