JEDI-SDL, MacOS X and XCode Tutorial

I have finally managed to iron out all the bugs involved putting together an XCode 2.4.x compatible project template that works with JEDI-SDL and FreePascal on MacOS X. A big thank-you goes out to Jonas Maebe for pointing me in the right direction. Ok the basic instructions are as follows and are aimed towards developers who have never wrestled with MacOS X and or XCode before..

-= START TUTORIAL =-

1. Need 1 cup of MacOS X 10.4

2. An installation of XCode 2.4 which ships with Tiger, but the latest version can be downloaded by registering here - http://developer.apple.com/tools/download/ . Note the current version of 2.4.1 and weighs in at 924MB, so I hope you have broadband. This will give you a DMG ( Disk Image ) that will self mount. Follow the installation instructions.

3. Download and install the SDL disk image for MacOS X from - http://www.libsdl.org/release/SDL-1.2.11.dmg. Once this disk image has mounted you will find yourself in a folder with a Readme.txt a SDL.framework directory and a few other files.
To Install SDL:
Copy the SDL.framework to /Library/Frameworks
You can do the same thing for SDL_image, SDL_mixer, SDL_ttf and SDL_net.
/Library/Frameworks/ is the location for all private frameworks.
The standard OS frameworks are located in...
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks

4. Download and install FreePascal for MacOS X from - http://wiki.lazarus.freepascal.org/index..._Downloads I downloaded a 2.1.1 snapshot about a week ago, but note that this branch is under heavy development so is not considered stable. You can try using the more stable 2.0.4 release, but I cannot vouch for that. Again this should give you a *.dmg files that will mount instelf and in this case launch an installation. Follow the instructions and you should have a working FreePascal compiler for MasOS X at the end of it.

5. If the installation above went well you should now have some FreePascal project templates located at...
/Library/Application Support/Apple/Developer Tools/Project Templates/Pascal/
under which will be "FPC Standard Tool" and "FPC Carbon Application" project templates. Now download the JEDI-SDL 2D project template from http://www.pascalgamedevelopment.com/jed...L%202D.zip
or the 3D project template fromhttp://www.pascalgamedevelopment.com/jed...L%203D.zip
Unzip the archived "FPC JEDI-SDL 2D" or "FPC JEDI-SDL 3D" folder at the same level as the previous FPC project templates.

6. Now start up XCode. Select "File->New Project". A New Project wizard should appear listing all the project templates available. Scroll down the list until you get to "Pascal". Under this node you should see the 2 FPC Project Templates and the JEDI-SDL 2D project template. Select "FPC JEDI-SDL 2D" and click "Next". Now enter a Project Name and Directory. Note : If the directory does not exist, it will be created. When you happy click finish the newly created project will be opened and ready for editing within XCode.

7. Click the "Build and Go" icon and the compilation process will begin. Once completed ( it's a bit slower that Delphi ), you should see the JEDI-SDL logo ( thanks Jason ) bouncing around a native MacOS X window.

8. Hack this project around to get your baby working on MacOS X.

-= END TUTORIAL =-

This is the simplest way to get JEDI-SDL and XCode working together. A more indepth tutorial of how to create the project from scratch would include a lot of arcane magic and work arounds which Jonas has already had the misfortune of experiencing, hence why project templates are provided as a starting point when using XCode.

I will give feedback and maybe corrections, but have patience for two weeks. After that, I will have a go. (I have a deadline to meet.) Then I will also make a variant of your tutorial for another IDE, and it will be interesting to see if it is still slower than Delphi, i.e., if the slowness is in the compiler or in the IDE.