|
|
Universal Binary Backwards Compatible?
|
|
|
|
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status:
Offline
|
|
I'm updating a small screensaver I wrote to universal Binary, and I'm wondering about backwards compatiblity.
I wrote it origionally on 10.3 and found it works on 10.2 as well (so that's what I used as my cutoff under system requirements). I changed the compile opitons for Universal Binary and it built & works with no modifications (small screensaver).
What I'm wondering (since I can't easily test) is if it should still be compatible with 10.2 since the code was before hand...
Anybody know if it should???
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
If you compile as universal binary, you must use the 10.4u SDK. This makes it incompatible with anything less than 10.4. So "no", it will not work with 10.2, but even more significant, it will not work with 10.3 either.
Many developers now are building twice: once using the 10.3 SDK (PPC only) and once using the 10.4u SDK (PPC/Intel). It's a pain, but there's no other way around it that I'm aware of.
If there is, I'd be grateful to hear about it.
(I have simplified things a little by creating a build style for each, but you still have to manually change the SDK each time).
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Nov 2003
Status:
Offline
|
|
Originally Posted by Brass
If you compile as universal binary, you must use the 10.4u SDK. This makes it incompatible with anything less than 10.4. So "no", it will not work with 10.2, but even more significant, it will not work with 10.3 either.
Many developers now are building twice: once using the 10.3 SDK (PPC only) and once using the 10.4u SDK (PPC/Intel). It's a pain, but there's no other way around it that I'm aware of.
If there is, I'd be grateful to hear about it.
Yes, there is a way.
As you note, the SDK will affect what APIs are availble to your code, but unless you are using "fully deprecated" APIs (meaning APIs which are only present in in 10.3 SDK and not in the 10.4 SDK, of which I know of none), you can still compile code that runs on 10.3 with the 10.4u SDK. You simly have to do the following:
1) In your Build settings, set "Mac OS X Deployment Target" to "Max OS X 10.3"
2) If you use (or any of your Frameworks reference any 10.4-only Frameworks, make sure you specify them in your "Other Linker Flags" as "-weak_framework FrameWorkName"
3) DO NOT set "Accelerated Objective-C Dispatch"
Then Build: you get a Universal Binary that runs on OS X 10.3 and 10.4 (PPC and Intel).
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status:
Offline
|
|
Originally Posted by saddino
Yes, there is a way.
As you note, the SDK will affect what APIs are availble to your code, but unless you are using "fully deprecated" APIs (meaning APIs which are only present in in 10.3 SDK and not in the 10.4 SDK, of which I know of none), you can still compile code that runs on 10.3 with the 10.4u SDK. You simly have to do the following:
1) In your Build settings, set "Mac OS X Deployment Target" to "Max OS X 10.3"
2) If you use (or any of your Frameworks reference any 10.4-only Frameworks, make sure you specify them in your "Other Linker Flags" as "-weak_framework FrameWorkName"
3) DO NOT set "Accelerated Objective-C Dispatch"
Then Build: you get a Universal Binary that runs on OS X 10.3 and 10.4 (PPC and Intel).
Question: If I can compile for 10.3, and everything I use also works & compiles in the 10.2 SDK (it's a very small screensaver), can I set the target for 10.2 with the 10.4u.sdk???
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status:
Offline
|
|
Originally Posted by Bobby
Question: If I can compile for 10.3, and everything I use also works & compiles in the 10.2 SDK (it's a very small screensaver), can I set the target for 10.2 with the 10.4u.sdk???
You know what, nevermind...
I followed the link given above ( http://developer.apple.com/technotes/tn2005/tn2137.html ) and thoes directions make a little more sence to me... I'm just using this method...
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
Ah, I'm very glad to hear that I was wrong! I shall have to look into those suggestions.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Apr 2001
Location: Camarillo, CA
Status:
Offline
|
|
I'm glad I posted this thread, because I quickly discovered I wasn't even compiling Universal Binary to begin with. And My saver was never compiled for 10.2... The URL above helped me take care of all that...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|