Jump to content

A guide to porting PPC aplications.


4 posts in this topic

Recommended Posts

I hope this is of any help to anyone, I've written a basic guide on porting apps, and here it is, if you don't understand it and would like a more Complete guide, then i suggest you download the Guide in pdf format, which includes pictures, the reason for not including them here is simply that i don't want to find a place to host each picture, and well I'm just lazy.

 

note: you can get the guide in pdf format from the attachment at the bottom of the post.

 

Well on to the guide now.

 

EDIT: Note there will always be one file in the project window that will be of color red: 'filename.app' or in case of Acqlite it was 'acqlite.app', the reason is that your compiling that file, so don't worry about that.

 

Porting OSX PPC applications to OSX Intel

 

 

 

First of all I’m no expert, so all I’m writing here, is from reading Apple guidelines on compiling Universal binaries, and some basic knowledge I have in programming (and I really mean basic).

 

Will this work for porting all apps to OSX86? The answer is ‘no’ since some or many times you will need to modify the code itself to compile it properly, however this will work for those apps that require minor change or no change at all.

 

Ok so here we go, oh and one more thing, English is my second language so.... well you know the rest.

 

 

The first thing you need to do is make sure that you have installed all the required software, that is Xcode and the Cross-Development 1.4 (Universal) SDK. If you did not install this when you were setting up OsX then you can install it from the Dev-DVD.

 

Dev-DVD ----> System----> Installation------> Packages-------> Packages---> CrossDevelopment.mpkg

 

 

Now that you have all the requirements let’s get down to compiling the application.

 

1. Open Up the Project in Xcode, it’s usually a file followed by the extension ‘.xcode’ or ‘xcodeproj’.

 

If the file is followed by the extension ‘.xcode’ then you will get a warning message from Xcode stating that the application was saved with an older version of xcode…….. , Just press the button “Upgrade a Copy”, and then click ‘Save’.

 

 

2. Once the Project Window appears, on the left hand column, under Group and Files select the first file, right click it and choose Get Info.

 

A new window will pop up, in this window click the General tab, at the bottom in “Cross-Develop Using target SDK”: choose Mac Os X 10.4 (Universal), if it’s not available (which happens when you run Xcode for the first time), you need to browser and look for it, for this click on the Choose button, a message will popup asking you if you would like to “Change the SDK root directory” just click change, and now browser to 10.4 SDK which is located at;

 

/Volume/Developer/SDKs/

Select MacOSX10.4u.sdk and click choose.

 

Note: Volume = directory where you installed OSX

 

 

2a. If you wish to only build an Intel binary, then you won’t need to make anymore changes (in this section), you can go on to the next step, however if you wish to build a Universal Binary that runs on both PPC and X86 machines then:

 

Click on the build tab, under Settings select Architecture, then click the Edit button at the bottom; here you may select Intel and/or PowerPC.

 

3. Deployment Version

 

What you want to do next is compile a Deployment Version, why? Simply because you want other people to be able to run your application (which is the main point for this guide)

 

Ok enough talk, this is really simple go to:

 

Xcode menu bar ? Project ? Set Active Build Configuration ? Deployment

 

That’s basically it, you can now either click the Build or Build and Go button, if successful then you should get a message at left bottom of the project window “Build succeeded for target “ ”.

 

 

Well that’s about it, I do want to point out a couple of things, if you see that there are missing files in the project window (if you see files in red) then chances are that the file path is wrong, or the source code of another app is required.

 

What you can do is right click the file in the project window and click Get Info, check if the file exists in the source code directory and then point Xcode to where its located at, also read the README if available (actually you should always do this), many times the developer will tell you what other software you need.

 

EDIT: Note there will always be one file in the project window that will be of color red: 'filename.app' or in case of Acqlite it was 'acqlite.app', the reason is that your compiling that file, so don't worry about that.

Link to comment
Share on other sites

Thanks so much - I think this guide will definitely help people get started.

 

If someone else has ported some apps, add what you've learned here, or make your own guide with the things you've learned!

 

Great job lmaurad.

Link to comment
Share on other sites

Guest OSx86er

Very nice guide. I will try this on some apps when I get home and see if I can actually do this. I am not even close to being great at coding but this doesn't look that bad. Thanks a lot.

Link to comment
Share on other sites

 Share

×
×
  • Create New...