Mercurial > sdl-ios-xcode
comparison README.MacOSX @ 199:2ad0957f6265
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 23 Sep 2001 22:33:19 +0000 |
parents | c151cfc43c07 |
children | c03846dd489b |
comparison
equal
deleted
inserted
replaced
198:49bf25403f5e | 199:2ad0957f6265 |
---|---|
15 ./configure | 15 ./configure |
16 make | 16 make |
17 make install | 17 make install |
18 | 18 |
19 (You may need to create the subdirs of /usr/local manually.) | 19 (You may need to create the subdirs of /usr/local manually.) |
20 | |
21 /* | |
22 To use the library once it's built, you need to use the "Carbon | |
23 framework", which is the port of the old Mac Toolbox to OS X. | |
24 To do this, use the -F and -framework arguments for compiling | |
25 and linking, respectively: | |
26 | |
27 cc -c myprog.c -I/usr/local/include/SDL -F/System/Library/Frameworks/Carbon.framework | |
28 cc myprog.o -L/usr/local/lib -lSDL -framework Carbon | |
29 | |
30 sdl-config knows about the linking path and -framework, so it's | |
31 recommended to use it to fill in your Makefile variables. | |
32 */ | |
33 | 20 |
34 To use the library once it's built, you essential have two possibilities: | 21 To use the library once it's built, you essential have two possibilities: |
35 use the traditional autoconf/automake/make method, or use Apple's Project Builder. | 22 use the traditional autoconf/automake/make method, or use Apple's Project Builder. |
36 | 23 |
37 ============================================================================== | 24 ============================================================================== |
63 your app, and also to provide a human readable version/copyright string | 50 your app, and also to provide a human readable version/copyright string |
64 and other meta-information to the user via the Finder's Get Info dialog. | 51 and other meta-information to the user via the Finder's Get Info dialog. |
65 | 52 |
66 3) Add something like the following rule to your Makefile.am: | 53 3) Add something like the following rule to your Makefile.am: |
67 | 54 |
68 APP_NAME.app: EXE_NAME | 55 bundle_contents = APP_NAME.app/Contents |
69 mkdir -p $@/Contents/MacOS | 56 APP_NAME_bundle: EXE_NAME |
70 mkdir -p $@/Contents/Resources | 57 mkdir -p $(bundle_contents)/MacOS |
71 mkdir -p $@/Contents/Resources/SDL_main.nib | 58 mkdir -p $(bundle_contents)/Resources |
72 echo "APPL????" > $@/Contents/PkgInfo | 59 mkdir -p $(bundle_contents)/Resources/SDL_main.nib |
73 $(INSTALL_DATA) Info.plist $@/Contents/ | 60 echo "APPL????" > $(bundle_contents)/PkgInfo |
74 $(INSTALL_DATA) SDL_main.nib/*.nib $@/Contents/Resources/ | 61 $(INSTALL_DATA) Info.plist $(bundle_contents)/ |
75 $(INSTALL_PROGRAM) $< $@/Contents/MacOS/ | 62 $(INSTALL_DATA) SDL_main.nib/*.nib $(bundle_contents)/Resources/SDLMain.nib |
63 $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/ | |
76 | 64 |
77 You should replace EXE_NAME with the name of the executable. APP_NAME is what | 65 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 | 66 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 | 67 as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME |
80 usually is "TestGame" | 68 usually is "TestGame". You might also want to use @PACKAGE@ to use the package |
69 name as specified in your configure.in file. | |
81 | 70 |
82 If your project builds more than one application, you will have to do a bit more. | 71 If your project builds more than one application, you will have to do a bit more. |
83 For each of your target applications, you need a seperate rule. Furthermore, each | 72 For each of your target applications, you need a seperate rule. Furthermore, each |
84 needs its own Info.plist file, since that has to contain the exact name of the | 73 needs its own Info.plist file, since that has to contain the exact name of the |
85 executable (i.e. EXE_NAME above). One way to do that is to use sed in your make rules | 74 executable (i.e. EXE_NAME above). One way to do that is to use sed in your make rules |
90 for you. You need to make a copy of it for each target application. | 79 for you. You need to make a copy of it for each target application. |
91 | 80 |
92 4) If you want the create bundles to be installed, you may want to add this | 81 4) If you want the create bundles to be installed, you may want to add this |
93 rule to your Makefile.am: | 82 rule to your Makefile.am: |
94 | 83 |
95 install-exec-local: Exult.app | 84 install-exec-hook: APP_NAME_bundle |
96 mkdir -p /Applications/ | 85 rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app |
97 cp -r $< /Applications/ | 86 mkdir -p $(DESTDIR)$(prefix)/Applications/ |
87 cp -r $< /$(DESTDIR)$(prefix)Applications/ | |
98 | 88 |
99 This rule takes the Bundle created by the rule from step 3 and installs them | 89 This rule takes the Bundle created by the rule from step 3 and installs them |
100 into /Applications/. An alternate installation place would be $HOME/Applications/ | 90 into $(DESTDIR)$(prefix)/Applications/. |
101 | 91 |
102 Again, if you want to install multiple applications, you will have to augment | 92 Again, if you want to install multiple applications, you will have to augment |
103 the make rule accordingly. | 93 the make rule accordingly. |
104 | 94 |
105 | 95 |