README.MacOSX
changeset 221 50620ec9c86a
parent 207 c03846dd489b
child 869 ae4ab3ac89a9
     1.1 --- a/README.MacOSX	Thu Nov 01 16:45:40 2001 +0000
     1.2 +++ b/README.MacOSX	Fri Nov 02 18:12:52 2001 +0000
     1.3 @@ -25,79 +25,52 @@
     1.4  Using the Simple DirectMedia Layer with a traditional Makefile
     1.5  ==============================================================================
     1.6  
     1.7 -In the following, it will be mostly assumed that you are using autoconf and
     1.8 -automake to setup your SDL project, and furthermore that you use the AM_PATH_SDL
     1.9 -macro provided by SDL in sdl.m4. If you are not using these tools, you can
    1.10 -still use SDL but it will be somewhat hard to get running.
    1.11 +An existing autoconf/automake build system for your SDL app has good chances
    1.12 +to work almost unchanged on OS X. However, to produce a "real" MacOS X binary
    1.13 +that you can distribute to users, you need to put the generated binary into a
    1.14 +so called "bundle", which basically is a fancy folder with a name like
    1.15 +"MyCoolGame.app".
    1.16  
    1.17 -Only step 1) is really required to get started, but for full OS X support you
    1.18 -will want to do the other steps, too.
    1.19 -
    1.20 -1) Update your acinclude.m4 file in case you have copied an older version of
    1.21 -   sdl.m4 into it. This is essential as AM_PATH_SDL now performs some additional
    1.22 -   tasks when used on MacOS X
    1.23 -
    1.24 -   Rationale: AM_PATH_SDL copies /usr/local/share/sdl/Info.plist and the folder
    1.25 -   /usr/local/share/sdl/SDL_main.nib/ into the directory where configure is invoked.
    1.26 -   This is essential for the configure script to be able to run the test code
    1.27 -   that detects SDL.
    1.28 -
    1.29 -2) Copy SDL's Info.plist.in file (from src/main/macosx) into your project's main
    1.30 -   folder (the same spot that your configure.in sits), and edit it to suite your
    1.31 -   needs. Then add it to your AC_OUTPUT list in configure.in
    1.32 -
    1.33 -   Rationale: The Info.plist file can be used to specify an icon file for
    1.34 -   your app, and also to provide a human readable version/copyright string
    1.35 -   and other meta-information to the user via the Finder's Get Info dialog.
    1.36 -
    1.37 -3) Add something like the following rule to your Makefile.am:
    1.38 +To get this build automatically, add something like the following rule to
    1.39 +your Makefile.am:
    1.40  
    1.41  bundle_contents = APP_NAME.app/Contents
    1.42  APP_NAME_bundle: EXE_NAME
    1.43  	mkdir -p $(bundle_contents)/MacOS
    1.44  	mkdir -p $(bundle_contents)/Resources
    1.45 -	mkdir -p $(bundle_contents)/Resources/SDL_main.nib
    1.46  	echo "APPL????" > $(bundle_contents)/PkgInfo
    1.47 -	$(INSTALL_DATA) Info.plist $(bundle_contents)/
    1.48 -	$(INSTALL_DATA) SDL_main.nib/*.nib $(bundle_contents)/Resources/SDLMain.nib
    1.49  	$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
    1.50  
    1.51 -   You should replace EXE_NAME with the name of the executable. APP_NAME is what
    1.52 -   will be visible to the user in the Finder. Usually it will be the same
    1.53 -   as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME 
    1.54 -   usually is "TestGame". You might also want to use @PACKAGE@ to use the package
    1.55 -   name as specified in your configure.in file.
    1.56 +You should replace EXE_NAME with the name of the executable. APP_NAME is what
    1.57 +will be visible to the user in the Finder. Usually it will be the same
    1.58 +as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME 
    1.59 +usually is "TestGame". You might also want to use @PACKAGE@ to use the package
    1.60 +name as specified in your configure.in file.
    1.61  
    1.62 -   If your project builds more than one application, you will have to do a bit more.
    1.63 -   For each of your target applications, you need a seperate rule. Furthermore, each
    1.64 -   needs its own Info.plist file, since that has to contain the exact name of the 
    1.65 -   executable (i.e. EXE_NAME above). One way to do that is to use sed in your make rules
    1.66 -   and modify a single master Info.plist.
    1.67 +If your project builds more than one application, you will have to do a bit
    1.68 +more.  For each of your target applications, you need a seperate rule.
    1.69  
    1.70 -   Rationale: on Mac OS X, executables have to be put into so-called "bundles".
    1.71 -   The make rule given above will construct such a bundle around the executable
    1.72 -   for you. You need to make a copy of it for each target application.
    1.73 -
    1.74 -4) If you want the create bundles to be installed, you may want to add this
    1.75 -   rule to your Makefile.am:
    1.76 +If you want the created bundles to be installed, you may want to add this
    1.77 +rule to your Makefile.am:
    1.78  
    1.79  install-exec-hook: APP_NAME_bundle
    1.80  	rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
    1.81  	mkdir -p $(DESTDIR)$(prefix)/Applications/
    1.82  	cp -r $< /$(DESTDIR)$(prefix)Applications/
    1.83  
    1.84 -   This rule takes the Bundle created by the rule from step 3 and installs them
    1.85 -   into $(DESTDIR)$(prefix)/Applications/.
    1.86 +This rule takes the Bundle created by the rule from step 3 and installs them
    1.87 +into $(DESTDIR)$(prefix)/Applications/.
    1.88  
    1.89 -   Again, if you want to install multiple applications, you will have to augment
    1.90 -   the make rule accordingly.
    1.91 +Again, if you want to install multiple applications, you will have to augment
    1.92 +the make rule accordingly.
    1.93  
    1.94  
    1.95  ==============================================================================
    1.96  Using the Simple DirectMedia Layer with Project Builder
    1.97  ==============================================================================
    1.98  
    1.99 -These instructions are for using Apple's Project Builder IDE to build SDL applications.
   1.100 +These instructions are for using Apple's Project Builder IDE to build SDL
   1.101 +applications.
   1.102  
   1.103  - First steps
   1.104