README.MacOSX
changeset 47 45b1c4303f87
parent 0 74212992fb08
child 53 25dfe480c75e
     1.1 --- a/README.MacOSX	Thu Jun 07 13:53:51 2001 +0000
     1.2 +++ b/README.MacOSX	Thu Jun 07 14:28:11 2001 +0000
     1.3 @@ -34,11 +34,80 @@
     1.4  sdl-config knows about the linking path and -framework, so it's
     1.5  recommended to use it to fill in your Makefile variables.
     1.6  
     1.7 -[Add instructions for how to build using PB]
     1.8 +==============================================================================
     1.9 +Using the Simple DirectMedia Layer with Project Builder
    1.10 +==============================================================================
    1.11  
    1.12 -As of this writing (Sep 2000), OS X is in public beta.  This means
    1.13 -that while most of the APIs are frozen, things are still subject to
    1.14 -change, and many of the known problems will be resolved before the
    1.15 -final release comes out.
    1.16 +These instructions are for using Apple's Project Builder IDE to build SDL applications.
    1.17  
    1.18 +- Building the Framework
    1.19 +
    1.20 +The SDL Library is packaged as a framework bundle, an organized
    1.21 +relocatable folder heirarchy of executible code, interface headers, 
    1.22 +and additional resources. For practical purposes, you can think of a 
    1.23 +framework as a more user and system-friendly shared library, whose library
    1.24 +file behaves more or less like a standard UNIX shared library.
    1.25 +
    1.26 +To build the framework, simply open the framework project and build it. 
    1.27 +By default, the framework bundle "SDL.framework" is installed in 
    1.28 +~/Library/Frameworks. Therefore, the testers and project stationary expect
    1.29 +it to be located there. However, it will function the same in any of the
    1.30 +following locations:
    1.31 +
    1.32 +    ~/Library/Frameworks
    1.33 +    /Local/Library/Frameworks
    1.34 +    /System/Library/Frameworks
    1.35 +
    1.36 +- Build Options
    1.37 +    There are two "Build Styles" (See the "Targets" tab) for SDL.
    1.38 +    "Deployment" should be used if you aren't tweaking the SDL library.
    1.39 +    "Development" should be used to debug SDL apps or the library itself.
    1.40 +
    1.41 +- Building the Testers
    1.42 +    Open the SDLTest project and build away!
    1.43 +
    1.44 +- Using the Project Stationary
    1.45 +    Copy the stationary to the indicated folders to access it from
    1.46 +    the "New Project" and "Add target" menus. What could be easier?
    1.47 +
    1.48 +- Setting up a new project by hand
    1.49 +    Some of you won't want to use the Stationary so I'll give some tips:
    1.50 +    * Create a new "Cocoa Application"
    1.51 +    * Add src/main/macosx/SDLMain.m , .h and .nib to your project
    1.52 +    * Remove "main.c" from your project
    1.53 +    * Remove "MainMenu.nib" from your project
    1.54 +    * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
    1.55 +    * Add "$(HOME)/Library/Frameworks" to the frameworks search path
    1.56 +    * Add "-framework SDL" to the "OTHER_LDFLAGS" variable
    1.57 +    * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib"
    1.58 +    * Add your files
    1.59 +    * Clean and build
    1.60 +
    1.61 +- Building from command line
    1.62 +    Use pbxbuild in the same directory as your .pbproj file
    1.63 +         
    1.64 +- Running your app
    1.65 +    You can send command line args to your app by either invoking it from
    1.66 +    the command line (in *.app/Contents/MacOS) or by entering them in the
    1.67 +    "Executibles" panel of the target settings.
    1.68 +    
    1.69 +- Implementation Notes
    1.70 +    Some things that may be of interest about how it all works...
    1.71 +    * Working directory
    1.72 +        As defined in the SDLMain.m file, the working directory of your SDL app
    1.73 +        is by default set to its parent. You may wish to change this to better
    1.74 +        suit your needs.
    1.75 +    * You have a Cocoa App!
    1.76 +        Your SDL app is essentially a Cocoa application. When your app
    1.77 +        starts up and the libraries finish loading, a Cocoa procedure is called,
    1.78 +        which sets up the working directory and calls your main() method.
    1.79 +        You are free to modify your Cocoa app with generally no consequence 
    1.80 +        to SDL. You cannot, however, easily change the SDL window itself.
    1.81 +        Functionality may be added in the future to help this.
    1.82 +    * My development setup:
    1.83 +        I am using version 1.0.1 (v63.0) of Project Builder on MacOS X 10.0.3,
    1.84 +        from the Developer Tools CD for May 2001.
    1.85 +        As of May 31 2001, Apple hasn't released this version of the tools to the public, 
    1.86 +        but I expect that things will still work on older versions.
    1.87 +        
    1.88  Known bugs are listed in the file "BUGS"