PowerPC App Making
So you want to build a PowerPC application on your MacTel computer
using Xcode. I wish the process was as intuitive as most of the
software Apple makes, but it isn't. The main parts to doing this
involve setting a few build settings. This tutorial's ultimate goal is
for you to create an application that can run on Mac OS 10.1 or higher.
But the first part will concentrate on Mac OS 10.3 or higher because it
is easier to target.
There is a list of stuff that is needed in order to follow the
directions included here. First I assume you have Xcode 3. I am using
Xcode 3.2.5, but I don't expect you to have this exact version. The
next thing you should have is the Mac OS 10.3 SDK. This should be on
the Developer CD that you used to install Xcode. You can do a quick
check for this SDK by looking in the folder /Developer/SDKs/. It
probably will be called MacOSX10.3.9.sdk.
Directions:
1) Start Xcode.
2) Make a new cocoa application project.
3) Erase all Objective-C 2.0 code.
* @synthesize and @property must go because they only work on Mac OS
10.5 and up.
* NSApplicationDelegate is only available on Mac OS 10.6 and up.
Delete the line pointed to by the green arrow.
The "<NSApplicationDelegate>" can simply be deleted.
Also delete the text "@property (assign)".
4) Click on the project file in the Groups & Files area. Then push
Command-i to bring up the Project Info window.
5) Create a new configuration.
- Click on the "Configurations" tab.
- Select the "Release" configuration.
- Push the "Duplicate" button.
- Name the new configuration "ppc only".
6) Add ppc to Architecture setting.
- Click on the "Build" tab at the top of the Project Info window.
- Select "ppc only" under the Configuration popup menu.
- Click on the value field for Architectures. Then click on
"Other...". A
window will then display.
Remove the other architectures by clicking on one of them, then push
the button with the minus sign on it.
Repeat this action until all other architectures are gone. Then push
the button with the plus sign and type "ppc". Click the "OK" button.
7) Check the box next to "Build Active Architecture Only".
* Located beneath the Base SDK setting.
* Prevents other architectures like x86 from being built.
8) Set Base SDK to Mac OS 10.3.
* This SDK will only show up on the list if it has been installed.
* Applications compiled with this SDK can still run on Mac OS 10.1 and
10.2.
9) Set the Deployment target to Mac OS X 10.3 or lower if you like.
* This setting will determine the minimum version of Mac OS X your
application can run on.
10) Close the Project Info window.
11) Choose "ppc only" as the Active Configuration from the popup menu
in
the upper left corner of the window.
12) Setting the deployment target for you nib file
- Double click on the MainMenu.xib to open it up in Interface
Builder
- In Interface Builder select the "Window" menu then choose
"Document Info".
- Select your target Mac OS X version you wish to support under the
"Deployment Target" popup menu.
13) Build the program by pushing Command-b.
* Xcode can not run the PowerPC application.
In order to test out your program, you will have to find it in your
project's "Build" folder. It should be in a folder called "ppc only".
This folder will have the same name as your configuration you used to
build the program.
You should be able to build the program, and run it on a computer that
uses Mac OS 10.2 by setting the Deployment target to Mac OS 10.2, but
it will probably not work. This is because of the nib file. Apple has
"improved" Interface Builder so that it produces nib files that are not
compatible with anything that is less than Mac OS 10.3. You might be
thinking that it should work because Interface Builder has an option
for setting the Deployment Target of the nib file to be Mac OS 10.2.
This deployment target does exist, but it doesn't work. From personal
experience I know that any nib file produced with Interface Builder 3
will only work on Mac OS 10.3 or higher.
Do I have to give up on supporting Mac OS 10.2 or under? Not at all.
There is still a way make such a compatible program. That part of the
tutorial will be up soon...
Contact me