JEDI-SDL, MacOS X and XCode Tutorial

Posts: 21
Joined: 2006.11
Post: #1
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..


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 - . 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 - 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...

4. Download and install FreePascal for MacOS X from - 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
or the 3D project template from
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.


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.

Any feedback or corrections welcome.
Quote this message in a reply
Posts: 260
Joined: 2005.05
Post: #2
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.
Quote this message in a reply
Posts: 21
Joined: 2006.11
Post: #3
A Disk image of the JEDI-SDL bindings and template projects can now be downloaded from - Please refer to the embeded ReadMe.txt for installation instructions.
Quote this message in a reply
Posts: 21
Joined: 2006.11
Post: #4
No one else tried it out then??
Quote this message in a reply
Post: #5
I have installed it on my intel based MACBOOK without problem.
Little different with step 5.

Following is my summary for SDL installation:
Install SDL
launch SDL-1.2.11.dmg
copy SDL.framework to /Library/Frameworks [You can do the same thing for SDL_image, SDL_mixer, SDL_ttf and SDL_net. ]

Install JEDI-SDL
Create folder Pascal under /Library/Application Support/Apple/Developer Tools/Project Templates/
launch JEDI-SDLv1.0.dmg
copy JEDI-SDL.framework to /Library/Frameworks
copy FPC JEDI-SDL 3D Cocoa to /Library/Application Support/Apple/Developer Tools/Project Templates/Pascal
copy FPC JEDI-SDL 2D Cocoa to /Library/Application Support/Apple/Developer Tools/Project Templates/Pascal
Quote this message in a reply
Posts: 21
Joined: 2006.11
Post: #6
Thanks for the feedback. I'll updated the instructions.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Xcode 4 SDL/OpenGL MacOS -> iOS Recompilation SparkyNZ 4 11,665 Apr 4, 2011 01:33 PM
Last Post: SparkyNZ
  OpenSource game need a MacOs porter... m3xican 16 14,001 Dec 18, 2005 11:43 AM
Last Post: m3xican