comparison README.MacOSX @ 47:45b1c4303f87

Added initial support for Quartz video (thanks Darrell!)
author Sam Lantinga <slouken@lokigames.com>
date Thu, 07 Jun 2001 14:28:11 +0000
parents 74212992fb08
children 25dfe480c75e
comparison
equal deleted inserted replaced
46:3dcf26fa9d15 47:45b1c4303f87
32 cc myprog.o -L/usr/local/lib -lSDL -framework Carbon 32 cc myprog.o -L/usr/local/lib -lSDL -framework Carbon
33 33
34 sdl-config knows about the linking path and -framework, so it's 34 sdl-config knows about the linking path and -framework, so it's
35 recommended to use it to fill in your Makefile variables. 35 recommended to use it to fill in your Makefile variables.
36 36
37 [Add instructions for how to build using PB] 37 ==============================================================================
38 Using the Simple DirectMedia Layer with Project Builder
39 ==============================================================================
38 40
39 As of this writing (Sep 2000), OS X is in public beta. This means 41 These instructions are for using Apple's Project Builder IDE to build SDL applications.
40 that while most of the APIs are frozen, things are still subject to
41 change, and many of the known problems will be resolved before the
42 final release comes out.
43 42
43 - Building the Framework
44
45 The SDL Library is packaged as a framework bundle, an organized
46 relocatable folder heirarchy of executible code, interface headers,
47 and additional resources. For practical purposes, you can think of a
48 framework as a more user and system-friendly shared library, whose library
49 file behaves more or less like a standard UNIX shared library.
50
51 To build the framework, simply open the framework project and build it.
52 By default, the framework bundle "SDL.framework" is installed in
53 ~/Library/Frameworks. Therefore, the testers and project stationary expect
54 it to be located there. However, it will function the same in any of the
55 following locations:
56
57 ~/Library/Frameworks
58 /Local/Library/Frameworks
59 /System/Library/Frameworks
60
61 - Build Options
62 There are two "Build Styles" (See the "Targets" tab) for SDL.
63 "Deployment" should be used if you aren't tweaking the SDL library.
64 "Development" should be used to debug SDL apps or the library itself.
65
66 - Building the Testers
67 Open the SDLTest project and build away!
68
69 - Using the Project Stationary
70 Copy the stationary to the indicated folders to access it from
71 the "New Project" and "Add target" menus. What could be easier?
72
73 - Setting up a new project by hand
74 Some of you won't want to use the Stationary so I'll give some tips:
75 * Create a new "Cocoa Application"
76 * Add src/main/macosx/SDLMain.m , .h and .nib to your project
77 * Remove "main.c" from your project
78 * Remove "MainMenu.nib" from your project
79 * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
80 * Add "$(HOME)/Library/Frameworks" to the frameworks search path
81 * Add "-framework SDL" to the "OTHER_LDFLAGS" variable
82 * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib"
83 * Add your files
84 * Clean and build
85
86 - Building from command line
87 Use pbxbuild in the same directory as your .pbproj file
88
89 - Running your app
90 You can send command line args to your app by either invoking it from
91 the command line (in *.app/Contents/MacOS) or by entering them in the
92 "Executibles" panel of the target settings.
93
94 - Implementation Notes
95 Some things that may be of interest about how it all works...
96 * Working directory
97 As defined in the SDLMain.m file, the working directory of your SDL app
98 is by default set to its parent. You may wish to change this to better
99 suit your needs.
100 * You have a Cocoa App!
101 Your SDL app is essentially a Cocoa application. When your app
102 starts up and the libraries finish loading, a Cocoa procedure is called,
103 which sets up the working directory and calls your main() method.
104 You are free to modify your Cocoa app with generally no consequence
105 to SDL. You cannot, however, easily change the SDL window itself.
106 Functionality may be added in the future to help this.
107 * My development setup:
108 I am using version 1.0.1 (v63.0) of Project Builder on MacOS X 10.0.3,
109 from the Developer Tools CD for May 2001.
110 As of May 31 2001, Apple hasn't released this version of the tools to the public,
111 but I expect that things will still work on older versions.
112
44 Known bugs are listed in the file "BUGS" 113 Known bugs are listed in the file "BUGS"