Changed SDLMain to SDL_main for MacOS X stuff
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40192
This commit is contained in:
parent
01d34a0683
commit
5fb411a341
9 changed files with 26 additions and 27 deletions
Binary file not shown.
|
@ -51,7 +51,7 @@ will want to do the other steps, too.
|
|||
tasks when used on MacOS X
|
||||
|
||||
Rationale: AM_PATH_SDL copies /usr/local/share/sdl/Info.plist and the folder
|
||||
/usr/local/share/sdl/SDLMain.nib/ into the directory where configure is invoked.
|
||||
/usr/local/share/sdl/SDL_main.nib/ into the directory where configure is invoked.
|
||||
This is essential for the configure script to be able to run the test code
|
||||
that detects SDL.
|
||||
|
||||
|
@ -68,10 +68,10 @@ will want to do the other steps, too.
|
|||
APP_NAME.app: EXE_NAME
|
||||
mkdir -p $@/Contents/MacOS
|
||||
mkdir -p $@/Contents/Resources
|
||||
mkdir -p $@/Contents/Resources/SDLMain.nib
|
||||
mkdir -p $@/Contents/Resources/SDL_main.nib
|
||||
echo "APPL????" > $@/Contents/PkgInfo
|
||||
$(INSTALL_DATA) Info.plist $@/Contents/
|
||||
$(INSTALL_DATA) SDLMain.nib/*.nib $@/Contents/Resources/
|
||||
$(INSTALL_DATA) SDL_main.nib/*.nib $@/Contents/Resources/
|
||||
$(INSTALL_PROGRAM) $< $@/Contents/MacOS/
|
||||
|
||||
You should replace EXE_NAME with the name of the executable. APP_NAME is what
|
||||
|
@ -153,13 +153,13 @@ following locations:
|
|||
- Setting up a new project by hand
|
||||
Some of you won't want to use the Stationary so I'll give some tips:
|
||||
* Create a new "Cocoa Application"
|
||||
* Add src/main/macosx/SDLMain.m , .h and .nib to your project
|
||||
* Add src/main/macosx/SDL_main.m , .h and .nib to your project
|
||||
* Remove "main.c" from your project
|
||||
* Remove "MainMenu.nib" from your project
|
||||
* Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
|
||||
* Add "$(HOME)/Library/Frameworks" to the frameworks search path
|
||||
* Add "-framework SDL" to the "OTHER_LDFLAGS" variable
|
||||
* Set the "Main Nib File" under "Application Settings" to "SDLMain.nib"
|
||||
* Set the "Main Nib File" under "Application Settings" to "SDL_main.nib"
|
||||
* Add your files
|
||||
* Clean and build
|
||||
|
||||
|
@ -174,7 +174,7 @@ following locations:
|
|||
- Implementation Notes
|
||||
Some things that may be of interest about how it all works...
|
||||
* Working directory
|
||||
As defined in the SDLMain.m file, the working directory of your SDL app
|
||||
As defined in the SDL_main.m file, the working directory of your SDL app
|
||||
is by default set to its parent. You may wish to change this to better
|
||||
suit your needs.
|
||||
* You have a Cocoa App!
|
||||
|
|
|
@ -1379,13 +1379,12 @@ case "$target" in
|
|||
CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
|
||||
fi
|
||||
# Set up files for the thread library
|
||||
SDL_LIBS="$SDL_LIBS -lsem"
|
||||
if test x$enable_threads = xyes; then
|
||||
COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
|
||||
COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
|
||||
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
|
||||
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
|
||||
COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
|
||||
COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
|
||||
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
||||
COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
|
||||
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
||||
|
@ -2074,8 +2073,8 @@ case "$target" in
|
|||
CheckMacGL
|
||||
CheckPTHREAD
|
||||
# Set up files for the main() stub
|
||||
COPY_ARCH_SRC(src/main, macosx, SDLmain.m)
|
||||
COPY_ARCH_SRC(src/main, macosx, SDLmain.h)
|
||||
COPY_ARCH_SRC(src/main, macosx, SDL_main.m)
|
||||
COPY_ARCH_SRC(src/main, macosx, SDL_main.h)
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
|
||||
|
|
|
@ -57,7 +57,7 @@ while test $# -gt 0; do
|
|||
@ENABLE_STATIC_TRUE@ echo $libdirs @SDL_LIBS@ @SYSTEM_LIBS@
|
||||
@ENABLE_STATIC_TRUE@ ;;
|
||||
@TARGET_MACOSX_TRUE@ --nib)
|
||||
@TARGET_MACOSX_TRUE@ echo @datadir@/sdl/SDLMain.nib
|
||||
@TARGET_MACOSX_TRUE@ echo @datadir@/sdl/SDL_main.nib
|
||||
@TARGET_MACOSX_TRUE@ ;;
|
||||
@TARGET_MACOSX_TRUE@ --plist)
|
||||
@TARGET_MACOSX_TRUE@ echo @datadir@/sdl/Info.plist
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>SDLMain.nib</string>
|
||||
<string>SDL_main.nib</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
# On OS X, install the SDLMain.nib.
|
||||
# On OS X, install the SDL_main.nib.
|
||||
# We use an ugly hack to force the creation of the
|
||||
# destination dir, maybe somebody with more automake
|
||||
# experience knows how to do this properly?
|
||||
|
||||
if TARGET_MACOSX
|
||||
masternibdatadir = $(datadir)/sdl/SDLMain.nib
|
||||
masternibdatadir = $(datadir)/sdl/SDL_main.nib
|
||||
masternibdata_DATA = \
|
||||
SDLMain.nib
|
||||
SDL_main.nib
|
||||
|
||||
nibdatadir = $(datadir)/sdl
|
||||
nibdata_DATA = \
|
||||
SDLMain.nib/classes.nib \
|
||||
SDLMain.nib/info.nib \
|
||||
SDLMain.nib/objects.nib \
|
||||
SDL_main.nib/classes.nib \
|
||||
SDL_main.nib/info.nib \
|
||||
SDL_main.nib/objects.nib \
|
||||
Info.plist
|
||||
endif
|
||||
|
||||
EXTRA_DIST = SDLMain.h SDLMain.m
|
||||
EXTRA_DIST = SDL_main.h SDL_main.m
|
||||
|
||||
# The nib and exports directories need to be copied into place
|
||||
# when building a distribution.
|
||||
dist-hook:
|
||||
(cd $(distdir) && rm -f $(BUILT_SOURCES))
|
||||
cp -rp SDLMain.nib $(distdir)
|
||||
cp -rp SDL_main.nib $(distdir)
|
||||
cp -rp exports $(distdir)
|
||||
(cd $(distdir) && rm -rf `find . -name CVS`)
|
||||
|
|
4
src/main/macosx/SDLMain.nib/classes.nib
generated
4
src/main/macosx/SDLMain.nib/classes.nib
generated
|
@ -3,10 +3,10 @@
|
|||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {makeFullscreen = id; quit = id; };
|
||||
CLASS = SDLMain;
|
||||
CLASS = SDL_main;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* SDLMain.h - main entry point for our Cocoa-ized SDL app
|
||||
/* SDL_main.h - main entry point for our Cocoa-ized SDL app
|
||||
Darrell Walisser - dwaliss1@purdue.edu
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
|
@ -6,7 +6,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SDLMain : NSObject
|
||||
@interface SDL_main : NSObject
|
||||
{
|
||||
}
|
||||
- (IBAction)quit:(id)sender;
|
|
@ -1,11 +1,11 @@
|
|||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
/* SDL_main.m - main entry point for our Cocoa-ized SDL app
|
||||
Darrell Walisser - dwaliss1@purdue.edu
|
||||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
|
||||
#import "SDL.h"
|
||||
#import "SDLMain.h"
|
||||
#import "SDL_main.h"
|
||||
#import <sys/param.h> /* for MAXPATHLEN */
|
||||
#import <unistd.h>
|
||||
|
||||
|
@ -20,7 +20,7 @@ static BOOL gFinderLaunch;
|
|||
|
||||
|
||||
/* The main class of the application, the application's delegate */
|
||||
@implementation SDLMain
|
||||
@implementation SDL_main
|
||||
|
||||
/* Invoked from the Quit menu item */
|
||||
- (void) quit:(id)sender
|
Loading…
Add table
Add a link
Reference in a new issue