PDA

View Full Version : MacBook and JEDI-SDL v1.0



savage
04-11-2006, 07:02 AM
Hi all,
One of the guys on the JEDI-SDL mailing list ( Simon Rushton ) has lent me a brand new MacBook for a month to try to make sure that JEDI-SDL v1.0 and MacOS X work together with as little hassle as possible.

I have to give this baby back before I fly out to Australia on December the 9th so the plan is to get JEDI-SDL working and also test out a few games with it once it's all set-up. For a small fee I may be convinced to compile other people's games as well ;P.

This post is being made from the MacBook in question, via the Safari browser.

savage
06-11-2006, 10:07 PM
Woo hoo, got my first MacOS X JEDI-SDL app up and running using XCode.

If anyone can tell me how to grab a screen shot on MacOS X, I would post it here.

savage
06-11-2006, 10:34 PM
http://upload4.postimage.org/1582468/JEDI_MACOSX.jpg (http://upload4.postimage.org/1582468/photo_hosting.html)

Here is a work in progress screen shot. I think the next thing to do is to create some XCode template projects as is really is simple to get your project working under MacOS X once you know where all the bits go.

billy1380
06-11-2006, 10:46 PM
So I guess you figured out how to use Grab... sorry, I did not get to you in time! :(

Looks like you have done a mighty fine job though so well done! 8)

I keep looking at the screen shot trying to remove the game window and look behind it at your XCode setup! :lol:

WILL
06-11-2006, 11:00 PM
Hey, you did it Dom! Nice work. ;)

Any major changes to the JEDI-SDL libraries that you can predict after this?

savage
06-11-2006, 11:01 PM
Maybe you can tell me some more things about MacOS X...

I can run the application without any problems from the command line, but how do I
1. Assign an Icon to my application
2. Allow it to run via double click from within Finder? Currently if I double click the executable from within Finder it tells me the application ended unexpectedly. While from the command line it's fine.

savage
06-11-2006, 11:06 PM
Hey, you did it Dom! Nice work. ;)

Any major changes to the JEDI-SDL libraries that you can predict after this?

No major changes to JEDI-SDL. Currently it compiles with 2 warnings, but these can be IFDEFed I think. The major hassle was trying to get the SDLMain issue sort. But that turned out to be super simple Add SDL.h and SDLMain.m to the project file and everything compiles and runs. Easy once you know how :).

Once we have some XCode project templates it will be super easy for any new developers to start using JEDI-SDL on MacOS X.

billy1380
06-11-2006, 11:36 PM
OK... so here is what you have to do...

1- Create a directory and call it YourGameName.app
2- It will change appearance st away
3- Right click on it and select Show Package Contents
4- In the open directory create a directory called Contents
5- Open Contents up and create two directories in there: MacOS and Resources
6- Stick the Game executable under MacOS
7- All the images and music used in the game should go under Resources
8- In Contents add a text file called PkgInfo with the word APPL in it
9- In Contents add a text file called Info.plist this file should contain


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http&#58;//www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Execuable Name as in MacOS</string>
<key>CFBundleGetInfoString</key>
<string>Copyrights © Your Company - 2006.</string>
<key>CFBundleIconFile</key>
<string>your application icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.yourgamename</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Yourgamename as used in yourgamename.app</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleSignature</key>
<string>pick a signiture</string>
<key>CFBundleVersion</key>
<string>Your game name Mac OS X Intel v0.1</string>
<key>LSHasLocalizedDisplayName</key>
<false>
<key>NSPrincipalClass</key>
<string>SDLApplication</string>
</dict>
</plist>

10- you need to create yourgame.icns and place it in the Resources directory.
11- and finally right click on the yourgame.app and select get info, do the same for your created yourgame.icns, copy the image from the icns file in the top left hand corner of the dialog and paste it onto the image on the dialog from yourgame.app.

If this does not make any sense, I think I need to talk you through it over an im session.

billy1380
07-11-2006, 12:17 AM
for some reason the xml, document type and plist are loosing all of their attributes in a the post... not sure what to do! :evil:

WILL
07-11-2006, 12:43 AM
Hmm... try disabling HTML in your post... if you leave the BBCode then it should still display as a Code block, but without the HTML parser getting in the way.

billy1380
07-11-2006, 10:13 AM
Hmm... try disabling HTML in your post... if you leave the BBCode then it should still display as a Code block, but without the HTML parser getting in the way.

Worked a treat :) Thanks...

savage
16-11-2006, 10:25 PM
Hi all,
Trying to create a basic Nehe OpenGL tutorial 3 using JEDI-SDL. The good news is that everything compiles beautifully. The bad news is that the first OpenGL command it encounters crashes the application. My guess is that OpenGL is not properly initiated, so when it tries to make an OpenGL call, the bindings aren't pointing to anything. Anyone got any ideas?

billy1380
17-11-2006, 11:16 AM
Are you running this from within an application bundle e.g. MyApp.app? If so do you have a Contents\frameworks directory that contains a copy of OpenGl.framework???

savage
17-11-2006, 11:27 AM
I'm running it from within the XCode IDE. OpenGL.framework is part of the project.

savage
18-11-2006, 12:29 AM
OK the 2D XCode Project template is 99% working. I should be able to sort out the 1% left tomorrow. You select the template from within XCode point it to a Directory and it generates everthing for you. Click Build and Run and it off it goes. A basic 2D application up and running.

I have also created a 3D project template. This second problem about it crashing on the first OpenGL call it makes still has me a bit stumped, unless it's a compiler issue ( yeah blame the compiler guys ;) ).

savage
27-11-2006, 09:42 PM
In case anyone missed it, I posted information about the Disk Image I created that contains the JEDI-SDL framework and the 2D and 3D project templates over @ http://www.pascalgamedevelopment.com/viewtopic.php?t=3819.

All I need to do now is work out a way to automate the double clicky stuff Billy mentioned.