Making a macos x app

Can anybody point me to a HOWTO or other FM on creating a self-contained
.app file from an SDL program?

-brad

I’m not on OS X mysef, but I think Kobo Deluxe sort of gets it right.
The autotools scripts hook into the ‘install’ target to build the
.app, picking the files out of the (temporary) Un*x style install
tree. The Win32 “bundle” is built in a similar way.

I’ve considered wiring in a default that builds that temporary tree in
some temp dir, since you normally don’t have write access to the
default autotools paths, but I haven’t gotten around to that yet.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Wednesday 28 May 2003 06.29, Bradley Bell wrote:

Can anybody point me to a HOWTO or other FM on creating a
self-contained .app file from an SDL program?

Can anybody point me to a HOWTO or other FM on creating a self-contained
.app file from an SDL program?

Quickest thing to do is build “hello world” with Project Builder and see
what it spits out. That got me 90% of the way there. There are official
Apple documents (but developer.apple.com is down at the moment for me, so
look for something like “Anatomy of a Bundle” on there later), but it’s
easier to see what project builder does, and then look at other
applications installed on the system, imho.

You basically need:

MyApplication.app
Contents
Info.plist file, which pretty much points to everything else.
PkgInfo file
MacOS
your application binary file
Resources
An icon file in .icns format, if you like.

Plus whatever game specific stuff you want somewhere inside the .app
directory. Remember that your current working directory is “/” if launched
from the Finder (but you can parse argv[0] or use a Carbon call to get the
appbundle’s location).

–ryan.

While we are at the subject… I don’t have a mac and I don’t have (easy) access to a mac. I may be interested in compiling and releasing some projects for mac. Is there any sort of emulator, virtual machine, anything, in which I can compile and test such an application?

Thanks
–Gabriel

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy> ----- Original Message -----

From: Ryan C. Gordon [mailto:icculus@icculus.org]
Sent: Mi?rcoles, 28 de Mayo de 2003 08:19 a.m.
To: sdl at libsdl.org
Subject: Re: [SDL] making a macos x app

Can anybody point me to a HOWTO or other FM on creating a
self-contained .app file from an SDL program?

Quickest thing to do is build “hello world” with Project Builder and see what it spits out. That got me 90% of the way there. There are official Apple documents (but developer.apple.com is down at the moment for me, so look for something like “Anatomy of a Bundle” on there later), but it’s easier to see what project builder does, and then look at other applications installed on the system, imho.

You basically need:

MyApplication.app
Contents
Info.plist file, which pretty much points to everything else.
PkgInfo file
MacOS
your application binary file
Resources
An icon file in .icns format, if you like.

Plus whatever game specific stuff you want somewhere inside the .app directory. Remember that your current working directory is “/” if launched from the Finder (but you can parse argv[0] or use a Carbon call to get the appbundle’s location).

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Nope. Apple is very, uh, conscientious about protecting the secrets of
their hardware platform.

Just make some really neat projects and hopefully someone will be nice
enough to port/test it for you.On Wed, May 28, 2003 at 10:03:23AM -0300, Gabriel Gambetta wrote:

While we are at the subject… I don’t have a mac and I don’t have
(easy) access to a mac. I may be interested in compiling and releasing
some projects for mac. Is there any sort of emulator, virtual machine,
anything, in which I can compile and test such an application?

Quoting David Olofson :> On Wednesday 28 May 2003 06.29, Bradley Bell wrote:

Can anybody point me to a HOWTO or other FM on creating a
self-contained .app file from an SDL program?

I’m not on OS X mysef, but I think Kobo Deluxe sort of gets it right.
The autotools scripts hook into the ‘install’ target to build the
.app, picking the files out of the (temporary) Un*x style install
tree. The Win32 “bundle” is built in a similar way.

I’ve considered wiring in a default that builds that temporary tree in
some temp dir, since you normally don’t have write access to the
default autotools paths, but I haven’t gotten around to that yet.

Thanks, I’ve kind of got it now. I wonder if these “hooks” will be integrated
into automake at some point…

-brad

While we are at the subject… I don’t have a mac and I don’t have
(easy) access to a mac. I may be interested in compiling and releasing
some projects for mac. Is there any sort of emulator, virtual machine,
anything, in which I can compile and test such an application?

There’s an emulator called basilisk that emulates motorola 68k running
macos. You still have the problem with rom and software though,
basically you’ll need the roms from an original mac and the original
macos install discs. Older macintoshes should be fairly cheap though.
Even if they’re too slow to actually run anything you only need their
roms… :slight_smile:

Basilisk:
http://www.uni-mainz.de/~bauec002/B2Main.html

/jOn onsdag, maj 28, 2003, at 15:03 Europe/Stockholm, Gabriel Gambetta wrote:

There’s an emulator called basilisk that emulates motorola 68k running
macos. You still have the problem with rom and software though,
basically you’ll need the roms from an original mac and the original
macos install discs. Older macintoshes should be fairly cheap though.
Even if they’re too slow to actually run anything you only need their
roms… :slight_smile:

 I have a bunch of old macs (performas, quadras, etc).  If you or 

anyone needs a ROM dump from any of them I’d be more than welcome to
help. For the install CD’s, well I have them but I doubt it would be…
legal, to send them around to everyone. You can find old Mac OS install
CD’s on the internet though (ebay and such). If you need a ROM dump
though, e-mail me and I’ll send 'em. =)

  • Andrew

Quoting Andrew1300 at aol.com:

There’s an emulator called basilisk that emulates motorola 68k running
macos. You still have the problem with rom and software though,
basically you’ll need the roms from an original mac and the original
macos install discs. Older macintoshes should be fairly cheap though.
Even if they’re too slow to actually run anything you only need their
roms… :slight_smile:

 I have a bunch of old macs (performas, quadras, etc).  If you or 

anyone needs a ROM dump from any of them I’d be more than welcome to
help. For the install CD’s, well I have them but I doubt it would be…
legal, to send them around to everyone. You can find old Mac OS install
CD’s on the internet though (ebay and such). If you need a ROM dump
though, e-mail me and I’ll send 'em. =)

Versions of MacOS prior to 7.6 can be freely downloaded from Apple:
http://www.info.apple.com/support/oldersoftwarelist.html#system

-brad

There’s some guidance in the README.MacOSX file distributed with
the SDL sources:

//begin
…to produce a “real” MacOS X binary
that you can distribute to users, you need to put the generated binary into a
so called “bundle”, which basically is a fancy folder with a name like
"MyCoolGame.app".

To get this build automatically, add something like the following rule to
your Makefile.am:

bundle_contents = APP_NAME.app/Contents
APP_NAME_bundle: EXE_NAME
mkdir -p $(bundle_contents)/MacOS
mkdir -p $(bundle_contents)/Resources
echo “APPL???” > $(bundle_contents)/PkgInfo
$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/

You should replace EXE_NAME with the name of the executable. APP_NAME is what
will be visible to the user in the Finder…
//end

Hope this helps…

-danielOn Tue, May 27, 2003 at 09:29:36PM -0700, Bradley Bell wrote:

Can anybody point me to a HOWTO or other FM on creating a self-contained
.app file from an SDL program?