finished SDL game: creating installers?

mnajera
Unregistered
 
Post: #1
A recent game that I've finished uses SDL and SDL_mixer (along with OpenGL and GLUT). The game obviously needs the SDL and SDL_mixer frameworks installed on the system to run. Although it is possible to direct the user to install these frameworks on their own, it would be a lot more convenient if an install program could include these files along with the game.

I've noticed that a few of you use SDL in your programs. Have any of you tackled this problem before?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
You should include the frameworks inside your application's bundle. That way you don't have to have an installer (evil), you have drag-install and -remove (good), and you still satisfy the LGPL (necessary).

See the tutorial on CocoaDevCentral.com
Quote this message in a reply
deekpyro
Unregistered
 
Post: #3
I'm just wondering why would you use GLUT and SDL together?

I second the request to stick it in the app bundle, it's not very difficult to setup and it's streamlines things greatly.

Derek
Quote this message in a reply
mnajera
Unregistered
 
Post: #4
Quote:Originally posted by deekpyro
I'm just wondering why would you use GLUT and SDL together?

Hehe... long story.

In school I made a pretty cool game on the PC with GLUT, and for the school's big engineering fair I wanted to display it with music and sound... so I quickly added some SDL_mixer (and, by extension, SDL) code to it. The end result (vortex) worked, but as you can guess, it's a mess inside.

So, here I'm stuck with a bunch of GLUT programs that I'm trying to move over to SDL. It's not really a hard thing to do. After two years of GLUT, it's just a habit with me.

Thanks for the tip on adding the framework to the app bundle. On the PC its as simple as adding the DLL, but I've never released a mac game before.
Quote this message in a reply
mnajera
Unregistered
 
Post: #5
Thanks for the help, guys! Today I figured out how to add in the frameworks, and to test it out I burned it onto a cd and copied the folder onto my older iMac (one which just has a basic panther install), and the game worked perfectly.

I'd like to be able to post the game here (it isn't much, but it works), but I don't know what the proper prodecure is for "packaging" the game. I don't have the other half of the stuffit expander program, and I barely know how to make a disk image of it (giving me a mygame.dmg file - is that enough?). Any help would be appreciated.

As soon as I figure it out, I'll post the file here, along with the source for sdltris, my quick and dirty tetris clone which uses OpenGL, SDL and SDL_mixer.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
There are two problems with dmg -- one is that the compression is somewhere between "nonexistent" and "not good", depending on what options you chose when you created the disk image, and the other is that many web servers are not configured with the correct mime type to serve 'em up.

It's usual to compress .dmgs in some other way to work around these problems, for example .dmg.gz, .dmg.sit, .dmg.bz2 or even (and easiest on Panther) .dmg.zip.
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #7
Quote:Originally posted by OneSadCookie
(and easiest on Panther) .dmg.zip.
No kidding! I just found out the other day that if I right-click on a file there's a menu option to "create archive"! Whoah! Cool. And zips get unzipped automatically through a Safari download now too. Even cooler!
Quote this message in a reply
Member
Posts: 304
Joined: 2002.04
Post: #8
Quote:Originally posted by OneSadCookie
.dmg.gz, .dmg.sit, .dmg.bz2 or even (and easiest on Panther) .dmg.zip.

why? If youre already going to use stuffit why is myGame.dmg.sit better than just myGame.sit (or for that matter myGame.zip, or myGame.gz, etc...)?
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #9
Quote:Originally posted by codemattic
why? If youre already going to use stuffit why is myGame.dmg.sit better than just myGame.sit (or for that matter myGame.zip, or myGame.gz, etc...)?
'Cause .dmg's are special-looking and stuff. Eject it or do something with it. This isn't content, this is an application.

Compression on top of compression doesn't necessarily mean that it's going to compress more if at all. Really what you want is that the client that downloads or holds the file knows what to do with it. Ala,

"many web servers are not configured with the correct mime type to serve 'em up."

It gets worse. Some "in-between" severs on the wild and willy web will downright dump a .dmg because they don't like Apple. For reals. It gets messy.

We've been able to get past certain server/router/evil/etc. MIME type restrictions by just appending .zip without actually compressing the file. Unfortunately, unless you tell the person who's downloading it to just remove the file extension sometimes an automatic decompression utility can really get confused. Better to just compress it and say it's the real deal and let nature do its thing.

That said, I like a single, compressed folder ( or directory, if you're pickeee ) over an image. But a folder just doesn't stand out as something containing an application anymore it seems.

Use a compressed disk image if you're sending an application as a finished package.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #10
.dmg.sit seems to me to be useful for one reason only -- work around the broken version of stuffit everyone seems to have that destroys applications as it unpacks them.

Personally, I'm in the "stuffit is evil" camp, and would never use sit for anything Cool
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #11
Yeah, stuffit officially blows now as far as I'm concerned. But I don't understand how .dmg.sit is a work around anything. Why not just .dmg.zip? I'm a little brain-dead right now, so sorry if I missed something. Right-click, 'Create Archive of "blah"', game over... I'm wondering if Alladin isn't somehow making me conspiratorial right now with their crippled crap at the moment.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #12
Lots of people have dropstuff, sit compresses much better than zip, and bzip2 requires the command-line.
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #13
Told you I was brain-dead last night. Derrr...
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #14
Personally I like bz2. It seems to compress very well, and the command line tools are very easy to use.

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Post Reply