Mercurial > sdl-ios-xcode
comparison README.MacOSX @ 191:c151cfc43c07
Changed SDLMain to SDL_main for MacOS X stuff
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 23 Sep 2001 20:42:00 +0000 |
parents | 37e3ca9254c7 |
children | 2ad0957f6265 |
comparison
equal
deleted
inserted
replaced
190:e4af2c852c09 | 191:c151cfc43c07 |
---|---|
49 1) Update your acinclude.m4 file in case you have copied an older version of | 49 1) Update your acinclude.m4 file in case you have copied an older version of |
50 sdl.m4 into it. This is essential as AM_PATH_SDL now performs some additional | 50 sdl.m4 into it. This is essential as AM_PATH_SDL now performs some additional |
51 tasks when used on MacOS X | 51 tasks when used on MacOS X |
52 | 52 |
53 Rationale: AM_PATH_SDL copies /usr/local/share/sdl/Info.plist and the folder | 53 Rationale: AM_PATH_SDL copies /usr/local/share/sdl/Info.plist and the folder |
54 /usr/local/share/sdl/SDLMain.nib/ into the directory where configure is invoked. | 54 /usr/local/share/sdl/SDL_main.nib/ into the directory where configure is invoked. |
55 This is essential for the configure script to be able to run the test code | 55 This is essential for the configure script to be able to run the test code |
56 that detects SDL. | 56 that detects SDL. |
57 | 57 |
58 2) Copy SDL's Info.plist.in file (from src/main/macosx) into your project's main | 58 2) Copy SDL's Info.plist.in file (from src/main/macosx) into your project's main |
59 folder (the same spot that your configure.in sits), and edit it to suite your | 59 folder (the same spot that your configure.in sits), and edit it to suite your |
66 3) Add something like the following rule to your Makefile.am: | 66 3) Add something like the following rule to your Makefile.am: |
67 | 67 |
68 APP_NAME.app: EXE_NAME | 68 APP_NAME.app: EXE_NAME |
69 mkdir -p $@/Contents/MacOS | 69 mkdir -p $@/Contents/MacOS |
70 mkdir -p $@/Contents/Resources | 70 mkdir -p $@/Contents/Resources |
71 mkdir -p $@/Contents/Resources/SDLMain.nib | 71 mkdir -p $@/Contents/Resources/SDL_main.nib |
72 echo "APPL????" > $@/Contents/PkgInfo | 72 echo "APPL????" > $@/Contents/PkgInfo |
73 $(INSTALL_DATA) Info.plist $@/Contents/ | 73 $(INSTALL_DATA) Info.plist $@/Contents/ |
74 $(INSTALL_DATA) SDLMain.nib/*.nib $@/Contents/Resources/ | 74 $(INSTALL_DATA) SDL_main.nib/*.nib $@/Contents/Resources/ |
75 $(INSTALL_PROGRAM) $< $@/Contents/MacOS/ | 75 $(INSTALL_PROGRAM) $< $@/Contents/MacOS/ |
76 | 76 |
77 You should replace EXE_NAME with the name of the executable. APP_NAME is what | 77 You should replace EXE_NAME with the name of the executable. APP_NAME is what |
78 will be visible to the user in the Finder. Usually it will be the same | 78 will be visible to the user in the Finder. Usually it will be the same |
79 as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME | 79 as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME |
151 the "New Project" and "Add target" menus. What could be easier? | 151 the "New Project" and "Add target" menus. What could be easier? |
152 | 152 |
153 - Setting up a new project by hand | 153 - Setting up a new project by hand |
154 Some of you won't want to use the Stationary so I'll give some tips: | 154 Some of you won't want to use the Stationary so I'll give some tips: |
155 * Create a new "Cocoa Application" | 155 * Create a new "Cocoa Application" |
156 * Add src/main/macosx/SDLMain.m , .h and .nib to your project | 156 * Add src/main/macosx/SDL_main.m , .h and .nib to your project |
157 * Remove "main.c" from your project | 157 * Remove "main.c" from your project |
158 * Remove "MainMenu.nib" from your project | 158 * Remove "MainMenu.nib" from your project |
159 * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path | 159 * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path |
160 * Add "$(HOME)/Library/Frameworks" to the frameworks search path | 160 * Add "$(HOME)/Library/Frameworks" to the frameworks search path |
161 * Add "-framework SDL" to the "OTHER_LDFLAGS" variable | 161 * Add "-framework SDL" to the "OTHER_LDFLAGS" variable |
162 * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib" | 162 * Set the "Main Nib File" under "Application Settings" to "SDL_main.nib" |
163 * Add your files | 163 * Add your files |
164 * Clean and build | 164 * Clean and build |
165 | 165 |
166 - Building from command line | 166 - Building from command line |
167 Use pbxbuild in the same directory as your .pbproj file | 167 Use pbxbuild in the same directory as your .pbproj file |
172 "Executibles" panel of the target settings. | 172 "Executibles" panel of the target settings. |
173 | 173 |
174 - Implementation Notes | 174 - Implementation Notes |
175 Some things that may be of interest about how it all works... | 175 Some things that may be of interest about how it all works... |
176 * Working directory | 176 * Working directory |
177 As defined in the SDLMain.m file, the working directory of your SDL app | 177 As defined in the SDL_main.m file, the working directory of your SDL app |
178 is by default set to its parent. You may wish to change this to better | 178 is by default set to its parent. You may wish to change this to better |
179 suit your needs. | 179 suit your needs. |
180 * You have a Cocoa App! | 180 * You have a Cocoa App! |
181 Your SDL app is essentially a Cocoa application. When your app | 181 Your SDL app is essentially a Cocoa application. When your app |
182 starts up and the libraries finish loading, a Cocoa procedure is called, | 182 starts up and the libraries finish loading, a Cocoa procedure is called, |