• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..07-May-2022-

GL-117/H03-May-2022-1,5271,402

READMEH A D04-Mar-20052.6 KiB6548

README

1Mac OS X Port of GL-117
2
3Being an SDL/OpenGL program, there were three basic ways to port
4this to OS X:
5
6The best would be to make the configuration and build process
7Framework-aware.  This would make a whole bunch of stuff work better,
8and is the right thing to do, but it's more work than I want to do
9right now. :-)
10
11The worst thing to do would be to compile everything plain-UNIX
12style as libraries and such.  This would be bad because we'd either
13have to compile it static, so the libraries would get out of date,
14or make the user install a bunch of dynamic libraries.
15
16The way I did it was to take the path of least resistance.  I
17bypassed the configure script to make my own config.h, loaded the
18code into Xcode, and built it against the frameworks in the Apple
19style.  Not a lot of work, and only a couple of tweaks to the
20original source later, we're in business.  Hooray!
21
22
23Prerequisites
24
25Whether you want to compile it for yourself or just run it, you
26need the SDL Framework.  You can get it from:
27
28	http://www.libsdl.org/release/SDL-1.2.8.pkg.tar.gz
29
30Once you've installed that, you should be in business.  Open
31GL-117.xcode and put the hammer down.  It should build and run.
32Drag the resulting application wherever you like and enjoy!
33
34
35Notes and Future Improvements
36
37I put the support files in the App wrapper, as you should, but I
38didn't use the methods to get them from there.  That's sort of a
39hack, but it should work.  It did require one change to the original
40code.  The old code was hardwired to look in "DATADIR/gl-117", but
41that was inconvenient here, so I made DATADIR be the Resource folder
42and took "/gl-117" out of the path.  They get copied in during the
43build process.
44
45The config.h thing is a bit of a hack, but its heart is in the right
46place.  As I mentioned earlier, if configure and friends were
47Framework aware, we wouldn't need to do that and could then either
48build it from Xcode or with make if we generated the necessary
49files.
50
51The SDLMain files are from the SDL distribution.  I modified them
52only enough to make them compile cleanly.
53
54Could use a simple NIB.  You won't even see it if you run the program
55fullscreen.  I just think people should be able to find the website
56if they didn't know where it is.  And I could stick my name in there
57too. :-)
58
59There are a lot of code generation options in Xcode that you can
60play with if you want to make it G5-specific or something.  I tried
61to keep it relatively conservative.  Fact is, you need a studly
62graphics card and the CPU matters a lot less.  On a G4 with a GeForce
632, it's pretty slow.  On a G4 with a GeForce 4, it's OK.  Still
64runs better on the GeForce 5 in my PC, though.
65