2001-04-26 16:45:43 +00:00
|
|
|
==============================================================================
|
|
|
|
Using the Simple DirectMedia Layer with Mac OS X
|
|
|
|
==============================================================================
|
|
|
|
|
|
|
|
These instructions are for people using Apple's Mac OS X (pronounced
|
|
|
|
"ten").
|
|
|
|
|
|
|
|
From the developer's point of view, OS X is a sort of hybrid Mac and
|
|
|
|
Unix system, and you have the option of using either traditional
|
2004-12-06 04:17:56 +00:00
|
|
|
command line tools or Apple's IDE Xcode.
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2004-03-04 05:39:17 +00:00
|
|
|
To build SDL using the command line, use the standard configure and make
|
2001-04-26 16:45:43 +00:00
|
|
|
process:
|
|
|
|
|
|
|
|
./configure
|
|
|
|
make
|
2004-03-04 05:39:17 +00:00
|
|
|
sudo make install
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-04-22 19:49:37 +00:00
|
|
|
You can also build SDL as a Universal library (a single binary for both
|
|
|
|
PowerPC and Intel architectures), on Mac OS X 10.4 and newer, by using
|
|
|
|
the fatbuild.sh script in build-scripts:
|
|
|
|
sh build-scripts/fatbuild.sh
|
|
|
|
sudo build-scripts/fatbuild.sh install
|
2006-05-16 07:26:48 +00:00
|
|
|
This script builds SDL with 10.2 ABI compatibility on PowerPC and 10.4
|
|
|
|
ABI compatibility on Intel architectures. For best compatibility you
|
|
|
|
should compile your application the same way. A script which wraps
|
|
|
|
gcc to make this easy is provided in test/gcc-fat.sh
|
2001-04-26 16:45:43 +00:00
|
|
|
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
To use the library once it's built, you essential have two possibilities:
|
2006-04-22 19:50:23 +00:00
|
|
|
use the traditional autoconf/automake/make method, or use Xcode.
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
Using the Simple DirectMedia Layer with a traditional Makefile
|
|
|
|
==============================================================================
|
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
An existing autoconf/automake build system for your SDL app has good chances
|
2006-04-13 13:08:26 +00:00
|
|
|
to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary
|
2001-11-02 18:12:52 +00:00
|
|
|
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".
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
To get this build automatically, add something like the following rule to
|
|
|
|
your Makefile.am:
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-09-23 22:33:19 +00:00
|
|
|
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/
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
You should replace EXE_NAME with the name of the executable. APP_NAME is what
|
|
|
|
will be visible to the user in the Finder. Usually it will be the same
|
|
|
|
as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME
|
|
|
|
usually is "TestGame". You might also want to use @PACKAGE@ to use the package
|
|
|
|
name as specified in your configure.in file.
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
If your project builds more than one application, you will have to do a bit
|
|
|
|
more. For each of your target applications, you need a seperate rule.
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
If you want the created bundles to be installed, you may want to add this
|
|
|
|
rule to your Makefile.am:
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-09-23 22:33:19 +00:00
|
|
|
install-exec-hook: APP_NAME_bundle
|
|
|
|
rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
|
|
|
|
mkdir -p $(DESTDIR)$(prefix)/Applications/
|
|
|
|
cp -r $< /$(DESTDIR)$(prefix)Applications/
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
This rule takes the Bundle created by the rule from step 3 and installs them
|
|
|
|
into $(DESTDIR)$(prefix)/Applications/.
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-11-02 18:12:52 +00:00
|
|
|
Again, if you want to install multiple applications, you will have to augment
|
|
|
|
the make rule accordingly.
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2004-03-04 05:39:17 +00:00
|
|
|
But beware! That is only part of the story! With the above, you end up with
|
|
|
|
a bare bone .app bundle, which is double clickable from the Finder. But
|
|
|
|
there are some more things you should do before shipping yor product...
|
|
|
|
|
|
|
|
1) The bundle right now probably is dynamically linked against SDL. That
|
|
|
|
means that when you copy it to another computer, *it will not run*,
|
|
|
|
unless you also install SDL on that other computer. A good solution
|
|
|
|
for this dilemma is to static link against SDL. On OS X, you can
|
|
|
|
achieve that by linkinag against the libraries listed by
|
|
|
|
sdl-config --static-libs
|
|
|
|
instead of those listed by
|
|
|
|
sdl-config --libs
|
|
|
|
Depending on how exactly SDL is integrated into your build systems, the
|
|
|
|
way to achieve that varies, so I won't describe it here in detail
|
|
|
|
2) Add an 'Info.plist' to your application. That is a special XML file which
|
|
|
|
contains some meta-information about your application (like some copyright
|
|
|
|
information, the version of your app, the name of an optional icon file,
|
|
|
|
and other things). Part of that information is displayed by the Finder
|
|
|
|
when you click on the .app, or if you look at the "Get Info" window.
|
|
|
|
More information about Info.plist files can be found on Apple's homepage.
|
|
|
|
|
|
|
|
|
|
|
|
As a final remark, let me add that I use some of the techniques (and some
|
|
|
|
variations of them) in Exult and ScummVM; both are available in source on
|
|
|
|
the net, so feel free to take a peek at them for inspiration!
|
|
|
|
|
|
|
|
|
2001-06-07 14:28:11 +00:00
|
|
|
==============================================================================
|
2004-12-06 04:17:56 +00:00
|
|
|
Using the Simple DirectMedia Layer with Xcode
|
2001-06-07 14:28:11 +00:00
|
|
|
==============================================================================
|
|
|
|
|
2004-12-06 04:17:56 +00:00
|
|
|
These instructions are for using Apple's Xcode IDE to build SDL applications.
|
2001-06-07 14:28:11 +00:00
|
|
|
|
2001-06-10 18:20:23 +00:00
|
|
|
- First steps
|
|
|
|
|
2004-12-06 04:17:56 +00:00
|
|
|
The first thing to do is to unpack the Xcode.tar.gz archive in the
|
|
|
|
top level SDL directory (where the Xcode.tar.gz archive resides).
|
2001-06-10 18:20:23 +00:00
|
|
|
Because Stuffit Expander will unpack the archive into a subdirectory,
|
|
|
|
you should unpack the archive manually from the command line:
|
|
|
|
cd [path_to_SDL_source]
|
2004-12-06 04:17:56 +00:00
|
|
|
tar zxf Xcode.tar.gz
|
|
|
|
This will create a new folder called Xcode, which you can browse
|
2001-06-10 18:20:23 +00:00
|
|
|
normally from the Finder.
|
|
|
|
|
2001-06-07 14:28:11 +00:00
|
|
|
- Building the Framework
|
|
|
|
|
|
|
|
The SDL Library is packaged as a framework bundle, an organized
|
|
|
|
relocatable folder heirarchy of executible code, interface headers,
|
|
|
|
and additional resources. For practical purposes, you can think of a
|
|
|
|
framework as a more user and system-friendly shared library, whose library
|
|
|
|
file behaves more or less like a standard UNIX shared library.
|
|
|
|
|
|
|
|
To build the framework, simply open the framework project and build it.
|
|
|
|
By default, the framework bundle "SDL.framework" is installed in
|
2004-12-06 04:17:56 +00:00
|
|
|
/Library/Frameworks. Therefore, the testers and project stationary expect
|
2001-06-07 14:28:11 +00:00
|
|
|
it to be located there. However, it will function the same in any of the
|
|
|
|
following locations:
|
|
|
|
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Local/Library/Frameworks
|
|
|
|
/System/Library/Frameworks
|
|
|
|
|
|
|
|
- Build Options
|
|
|
|
There are two "Build Styles" (See the "Targets" tab) for SDL.
|
|
|
|
"Deployment" should be used if you aren't tweaking the SDL library.
|
|
|
|
"Development" should be used to debug SDL apps or the library itself.
|
|
|
|
|
|
|
|
- Building the Testers
|
|
|
|
Open the SDLTest project and build away!
|
|
|
|
|
|
|
|
- Using the Project Stationary
|
|
|
|
Copy the stationary to the indicated folders to access it from
|
|
|
|
the "New Project" and "Add target" menus. What could be easier?
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2001-06-07 14:28:11 +00:00
|
|
|
- Setting up a new project by hand
|
|
|
|
Some of you won't want to use the Stationary so I'll give some tips:
|
|
|
|
* Create a new "Cocoa Application"
|
2001-10-16 14:55:59 +00:00
|
|
|
* Add src/main/macosx/SDLMain.m , .h and .nib to your project
|
2001-06-07 14:28:11 +00:00
|
|
|
* Remove "main.c" from your project
|
|
|
|
* Remove "MainMenu.nib" from your project
|
|
|
|
* Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
|
|
|
|
* Add "$(HOME)/Library/Frameworks" to the frameworks search path
|
2001-10-16 14:55:59 +00:00
|
|
|
* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
|
|
|
|
* Set the "Main Nib File" under "Application Settings" to "SDLMain.nib"
|
2001-06-07 14:28:11 +00:00
|
|
|
* Add your files
|
|
|
|
* Clean and build
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2001-06-07 14:28:11 +00:00
|
|
|
- Building from command line
|
|
|
|
Use pbxbuild in the same directory as your .pbproj file
|
|
|
|
|
|
|
|
- Running your app
|
|
|
|
You can send command line args to your app by either invoking it from
|
|
|
|
the command line (in *.app/Contents/MacOS) or by entering them in the
|
|
|
|
"Executibles" panel of the target settings.
|
|
|
|
|
|
|
|
- Implementation Notes
|
|
|
|
Some things that may be of interest about how it all works...
|
|
|
|
* Working directory
|
2001-09-23 20:42:00 +00:00
|
|
|
As defined in the SDL_main.m file, the working directory of your SDL app
|
2001-06-07 14:28:11 +00:00
|
|
|
is by default set to its parent. You may wish to change this to better
|
|
|
|
suit your needs.
|
|
|
|
* You have a Cocoa App!
|
|
|
|
Your SDL app is essentially a Cocoa application. When your app
|
|
|
|
starts up and the libraries finish loading, a Cocoa procedure is called,
|
|
|
|
which sets up the working directory and calls your main() method.
|
|
|
|
You are free to modify your Cocoa app with generally no consequence
|
|
|
|
to SDL. You cannot, however, easily change the SDL window itself.
|
|
|
|
Functionality may be added in the future to help this.
|
2001-10-16 14:55:59 +00:00
|
|
|
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
Known bugs are listed in the file "BUGS"
|