Commit 8de5abf2 authored by GnoStiC's avatar GnoStiC

puae 2.3.1

parent 674c7670
...@@ -6,7 +6,7 @@ dnl Updated and generally mauled 2008-2011 Mustafa Tufan ...@@ -6,7 +6,7 @@ dnl Updated and generally mauled 2008-2011 Mustafa Tufan
dnl dnl
AC_PREREQ(2.55) AC_PREREQ(2.55)
AC_INIT(PUAE, 2.3.1, 'mustafa.tufan@gmail.com', puae) AC_INIT(PUAE, 2.3.1, mustafa.tufan@gmail.com, puae)
AC_CONFIG_SRCDIR([bootstrap.sh]) AC_CONFIG_SRCDIR([bootstrap.sh])
AM_CONFIG_HEADER([src/sysconfig.h]) AM_CONFIG_HEADER([src/sysconfig.h])
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
...@@ -63,6 +63,7 @@ if test -z "$commit"; then ...@@ -63,6 +63,7 @@ if test -z "$commit"; then
commit="not git" commit="not git"
fi fi
AC_DEFINE_UNQUOTED(PACKAGE_COMMIT, "$commit", [cloned git commit version]) AC_DEFINE_UNQUOTED(PACKAGE_COMMIT, "$commit", [cloned git commit version])
AC_SUBST(PACKAGE_COMMIT, $commit)
dnl dnl
dnl Prefer Gtk2.x over Gtk1.x if both are available dnl Prefer Gtk2.x over Gtk1.x if both are available
......
...@@ -83,7 +83,7 @@ if BUILD_MACOSX_BUNDLE ...@@ -83,7 +83,7 @@ if BUILD_MACOSX_BUNDLE
mkdir -p $(bundle_contents)/Resources mkdir -p $(bundle_contents)/Resources
$(INSTALL_DATA) od-macosx/Info.plist $(bundle_contents) $(INSTALL_DATA) od-macosx/Info.plist $(bundle_contents)
$(INSTALL_PROGRAM) uae$(EXEEXT) $(bundle_contents)/MacOS/ $(INSTALL_PROGRAM) uae$(EXEEXT) $(bundle_contents)/MacOS/
$(INSTALL_DATA) $(srcdir)/od-macosx/euae.icns $(bundle_contents)/Resources/ $(INSTALL_DATA) $(srcdir)/od-macosx/puae.icns $(bundle_contents)/Resources/
endif endif
noinst_LIBRARIES = \ noinst_LIBRARIES = \
......
...@@ -169,7 +169,7 @@ void toggle_mousegrab (void) ...@@ -169,7 +169,7 @@ void toggle_mousegrab (void)
int graphics_init (void) int graphics_init (void)
{ {
int success = 0; int success = 0;
return success; return success;
} }
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<string>????</string> <string>????</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>PUAE</string> <string>PUAE</string>
<key>CFBundleGetInfoString</key> <key>CFBundleShortVersionString</key>
<string>@PACKAGE_COMMIT@</string> <string>2.3.1.397698e373c41c61eaab29f18e10f870c8c39819</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2.3.1</string> <string>2.3.1</string>
</dict> </dict>
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<string>????</string> <string>????</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>@PACKAGE_NAME@</string> <string>@PACKAGE_NAME@</string>
<key>CFBundleGetInfoString</key> <key>CFBundleShortVersionString</key>
<string>@PACKAGE_COMMIT@</string> <string>@VERSION@-@PACKAGE_COMMIT@</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>@VERSION@</string> <string>@VERSION@</string>
</dict> </dict>
......
...@@ -7,6 +7,6 @@ noinst_LIBRARIES = libosdep.a ...@@ -7,6 +7,6 @@ noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.m memory.c parser.c libosdep_a_SOURCES = main.m memory.c parser.c
noinst_HEADERS = main.h memory.h hrtimer.h noinst_HEADERS = main.h memory.h hrtimer.h
noinst_DATA = Info.plist.in euae.icns noinst_DATA = Info.plist.in puae.icns
EXTRA_DIST = euae.icns EXTRA_DIST = puae.icns
...@@ -33,5 +33,5 @@ typedef unsigned int NSUInteger; ...@@ -33,5 +33,5 @@ typedef unsigned int NSUInteger;
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
@interface EUAE_Main : NSObject @interface PUAE_Main : NSObject
@end @end
...@@ -54,44 +54,31 @@ BOOL gFinishedLaunching = NO; ...@@ -54,44 +54,31 @@ BOOL gFinishedLaunching = NO;
NSString *getApplicationName () NSString *getApplicationName ()
{ {
NSDictionary *dict; NSDictionary *dict;
NSString *appName = 0; NSString *appName = 0;
/* Determine the application name */ /* Determine the application name */
dict = (NSDictionary *) CFBundleGetInfoDictionary (CFBundleGetMainBundle ()); dict = (NSDictionary *) CFBundleGetInfoDictionary (CFBundleGetMainBundle ());
if (dict) if (dict)
appName = [dict objectForKey: @"CFBundleName"]; appName = [dict objectForKey: @"CFBundleName"];
if (![appName length]) if (![appName length])
appName = [[NSProcessInfo processInfo] processName]; appName = [[NSProcessInfo processInfo] processName];
return appName; return appName;
} }
NSString *getApplicationVersion ()
{
NSDictionary *dict;
NSString *appVersion = 0;
/* Determine the application name */
dict = (NSDictionary *) CFBundleGetInfoDictionary (CFBundleGetMainBundle ());
if (dict)
appVersion = [dict objectForKey: @"CFBundleVersion"];
return appVersion;
}
/* Fix warnings generated when using the setAppleMenu method and compiling /* Fix warnings generated when using the setAppleMenu method and compiling
in Tiger or later */ in Tiger or later */
@interface NSApplication (EUAE) @interface NSApplication (PUAE)
- (void)setAppleMenu:(NSMenu *)menu; - (void)setAppleMenu:(NSMenu *)menu;
@end @end
@interface EUAE_Application : NSApplication @interface PUAE_Application : NSApplication
@end @end
@implementation EUAE_Application @implementation PUAE_Application
/* Invoked from the Quit menu item */ /* Invoked from the Quit menu item */
- (void)terminate:(id)sender - (void)terminate:(id)sender
...@@ -119,7 +106,7 @@ in Tiger or later */ ...@@ -119,7 +106,7 @@ in Tiger or later */
/* The main class of the application, the application's delegate */ /* The main class of the application, the application's delegate */
@implementation EUAE_Main @implementation PUAE_Main
/* Set the working directory to the .app's parent directory */ /* Set the working directory to the .app's parent directory */
- (void) setupWorkingDirectory:(BOOL)shouldChdir - (void) setupWorkingDirectory:(BOOL)shouldChdir
...@@ -139,12 +126,8 @@ in Tiger or later */ ...@@ -139,12 +126,8 @@ in Tiger or later */
-(void)performAbout:(id)sender -(void)performAbout:(id)sender
{ {
const NSDictionary *nfo; NSDictionary *nfo;
NSString *aName, *aVer; nfo = (NSDictionary *) CFBundleGetInfoDictionary (CFBundleGetMainBundle ());
aName = getApplicationName ();
aVer = getApplicationVersion ();
nfo = [NSDictionary dictionaryWithObjectsAndKeys: aName, @"ApplicationName", aVer, @"Version", nil];
[NSApp orderFrontStandardAboutPanelWithOptions: nfo]; [NSApp orderFrontStandardAboutPanelWithOptions: nfo];
} }
...@@ -227,10 +210,10 @@ static void setupWindowMenu (void) ...@@ -227,10 +210,10 @@ static void setupWindowMenu (void)
static void CustomApplicationMain (int argc, char **argv) static void CustomApplicationMain (int argc, char **argv)
{ {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
EUAE_Main *euae_main; PUAE_Main *puae_main;
/* Ensure the application object is initialised */ /* Ensure the application object is initialised */
[EUAE_Application sharedApplication]; [PUAE_Application sharedApplication];
#ifdef SDL_USE_CPS #ifdef SDL_USE_CPS
{ {
...@@ -239,7 +222,7 @@ static void CustomApplicationMain (int argc, char **argv) ...@@ -239,7 +222,7 @@ static void CustomApplicationMain (int argc, char **argv)
if (!CPSGetCurrentProcess(&PSN)) if (!CPSGetCurrentProcess(&PSN))
if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
if (!CPSSetFrontProcess(&PSN)) if (!CPSSetFrontProcess(&PSN))
[EUAE_Application sharedApplication]; [PUAE_Application sharedApplication];
} }
#endif /* SDL_USE_CPS */ #endif /* SDL_USE_CPS */
...@@ -252,13 +235,13 @@ static void CustomApplicationMain (int argc, char **argv) ...@@ -252,13 +235,13 @@ static void CustomApplicationMain (int argc, char **argv)
cocoa_gui_early_setup(); cocoa_gui_early_setup();
/* Create SDLMain and make it the app delegate */ /* Create SDLMain and make it the app delegate */
euae_main = [[EUAE_Main alloc] init]; puae_main = [[PUAE_Main alloc] init];
[NSApp setDelegate:euae_main]; [NSApp setDelegate:puae_main];
/* Start the main event loop */ /* Start the main event loop */
[NSApp run]; [NSApp run];
[euae_main release]; [puae_main release];
[pool release]; [pool release];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment