The OSX build files now support (and probably require) Xcode 5!

There's still quite a few issues to fix, but at least it compiles
and runs Stella correctly.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2869 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-03-08 00:44:30 +00:00
parent cde5c2ed9c
commit 28a335b9ea
6 changed files with 85 additions and 53 deletions

View File

@ -179,7 +179,7 @@ class EventHandler
#ifndef BSPF_MAC_OSX
return (mod & KMOD_ALT);
#else
return (mod & KMOD_META);
return (mod & KMOD_MODE);
#endif
}

View File

@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>Stella</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
@ -32,8 +34,6 @@
</array>
<key>CFBundleExecutable</key>
<string>Stella</string>
<key>CFBundleDisplayName</key>
<string>Stella</string>
<key>CFBundleGetInfoString</key>
<string>Stella</string>
<key>CFBundleHelpBookFolder</key>
@ -54,20 +54,18 @@
<string>StLa</string>
<key>CFBundleVersion</key>
<string>3.9.3</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>i386</key>
<string>10.4.0</string>
<key>x86_64</key>
<string>10.6.0</string>
</dict>
<key>NSMainNibFile</key>
<string>SDLMain.nib</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>«PROJECTNAMEASXML»</key>
<string>SDL Cocoa App</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6.0</string>
<key>i386</key>
<string>10.4.0</string>
<key>ppc</key>
<string>10.4.0</string>
</dict>
</dict>
</plist>

View File

@ -343,9 +343,9 @@ static void CustomApplicationMain (int argc, char **argv)
- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
{
unsigned int bufferSize;
unsigned int selfLen = [self length];
unsigned int aStringLen = [aString length];
NSUInteger bufferSize;
NSUInteger selfLen = [self length];
NSUInteger aStringLen = [aString length];
unichar *buffer;
NSRange localRange;
NSString *result;

View File

@ -845,7 +845,7 @@
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">stella_intel.xcodeproj</string>
<string key="IBDocument.LastKnownRelativeProjectPath">stella.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<bool key="EncodedWithXMLCoder">YES</bool>

View File

@ -220,9 +220,7 @@
2D91750C09BA90380026E9FF /* InputDialog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2D05FF60096E269100A518FE /* InputDialog.cxx */; };
2D91750F09BA90380026E9FF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
2D91751009BA90380026E9FF /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DEB3D4C0629BD24007EBBD3 /* OpenGL.framework */; };
2D91751109BA90380026E9FF /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D4764C806683C5F00F63D87 /* SDL.framework */; };
2D91751209BA90380026E9FF /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D17D98E08BC398400E47F69 /* ApplicationServices.framework */; };
2D91751409BA90380026E9FF /* SDL.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2D4764C806683C5F00F63D87 /* SDL.framework */; };
2DEFB40C09C3386F00754289 /* Cart.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2DEFB40B09C3386F00754289 /* Cart.icns */; };
DC07A3C80CAD738A009B4BC9 /* StateManager.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DC07A3C60CAD738A009B4BC9 /* StateManager.cxx */; };
DC07A3C90CAD738A009B4BC9 /* StateManager.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DC07A3C70CAD738A009B4BC9 /* StateManager.hxx */; };
@ -458,6 +456,8 @@
DCD6FC8211C281ED005DA767 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = DCD6FC6F11C281ED005DA767 /* pngwutil.c */; };
DCD6FC9311C28C6F005DA767 /* PNGLibrary.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DCD6FC9111C28C6F005DA767 /* PNGLibrary.cxx */; };
DCD6FC9411C28C6F005DA767 /* PNGLibrary.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DCD6FC9211C28C6F005DA767 /* PNGLibrary.hxx */; };
DCDAF4D918CA9AAB00D3865D /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCDAF4D818CA9AAB00D3865D /* SDL2.framework */; };
DCDAF4DB18CA9AF000D3865D /* SDL2.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCDAF4DA18CA9AF000D3865D /* SDL2.framework */; };
DCDE17FA17724E5D00EB1AC6 /* ConfigPathDialog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DCDE17F617724E5D00EB1AC6 /* ConfigPathDialog.cxx */; };
DCDE17FB17724E5D00EB1AC6 /* ConfigPathDialog.hxx in Headers */ = {isa = PBXBuildFile; fileRef = DCDE17F717724E5D00EB1AC6 /* ConfigPathDialog.hxx */; };
DCDE17FC17724E5D00EB1AC6 /* SnapshotDialog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = DCDE17F817724E5D00EB1AC6 /* SnapshotDialog.cxx */; };
@ -526,7 +526,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
2D91751409BA90380026E9FF /* SDL.framework in CopyFiles */,
DCDAF4DB18CA9AF000D3865D /* SDL2.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -609,7 +609,7 @@
2D6CC10308C811A600B8F642 /* TiaZoomWidget.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = TiaZoomWidget.cxx; path = ../debugger/gui/TiaZoomWidget.cxx; sourceTree = SOURCE_ROOT; };
2D6CC10408C811A600B8F642 /* TiaZoomWidget.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = TiaZoomWidget.hxx; path = ../debugger/gui/TiaZoomWidget.hxx; sourceTree = SOURCE_ROOT; };
2D733D6E062895B2006265D9 /* EventHandler.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = EventHandler.cxx; path = ../emucore/EventHandler.cxx; sourceTree = SOURCE_ROOT; };
2D733D6F062895B2006265D9 /* EventHandler.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = EventHandler.hxx; path = ../emucore/EventHandler.hxx; sourceTree = SOURCE_ROOT; };
2D733D6F062895B2006265D9 /* EventHandler.hxx */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.h; name = EventHandler.hxx; path = ../emucore/EventHandler.hxx; sourceTree = SOURCE_ROOT; tabWidth = 2; };
2D733D70062895B2006265D9 /* FrameBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = FrameBuffer.cxx; path = ../emucore/FrameBuffer.cxx; sourceTree = SOURCE_ROOT; };
2D733D71062895B2006265D9 /* FrameBuffer.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = FrameBuffer.hxx; path = ../emucore/FrameBuffer.hxx; sourceTree = SOURCE_ROOT; };
2D733D77062895F1006265D9 /* Settings.hxx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = Settings.hxx; path = ../emucore/Settings.hxx; sourceTree = SOURCE_ROOT; };
@ -994,6 +994,8 @@
DCD6FC6F11C281ED005DA767 /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = ../libpng/pngwutil.c; sourceTree = SOURCE_ROOT; };
DCD6FC9111C28C6F005DA767 /* PNGLibrary.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PNGLibrary.cxx; path = ../common/PNGLibrary.cxx; sourceTree = SOURCE_ROOT; };
DCD6FC9211C28C6F005DA767 /* PNGLibrary.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PNGLibrary.hxx; path = ../common/PNGLibrary.hxx; sourceTree = SOURCE_ROOT; };
DCDAF4D818CA9AAB00D3865D /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../../../../../../Library/Frameworks/SDL2.framework; sourceTree = "<group>"; };
DCDAF4DA18CA9AF000D3865D /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../../../../../../Library/Frameworks/SDL2.framework; sourceTree = "<group>"; };
DCDE17F617724E5D00EB1AC6 /* ConfigPathDialog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConfigPathDialog.cxx; path = ../gui/ConfigPathDialog.cxx; sourceTree = SOURCE_ROOT; };
DCDE17F717724E5D00EB1AC6 /* ConfigPathDialog.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ConfigPathDialog.hxx; path = ../gui/ConfigPathDialog.hxx; sourceTree = SOURCE_ROOT; };
DCDE17F817724E5D00EB1AC6 /* SnapshotDialog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SnapshotDialog.cxx; path = ../gui/SnapshotDialog.cxx; sourceTree = SOURCE_ROOT; };
@ -1035,9 +1037,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DCDAF4D918CA9AAB00D3865D /* SDL2.framework in Frameworks */,
2D91750F09BA90380026E9FF /* Cocoa.framework in Frameworks */,
2D91751009BA90380026E9FF /* OpenGL.framework in Frameworks */,
2D91751109BA90380026E9FF /* SDL.framework in Frameworks */,
2D91751209BA90380026E9FF /* ApplicationServices.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -1089,6 +1091,7 @@
29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */ = {
isa = PBXGroup;
children = (
DCDAF4DA18CA9AF000D3865D /* SDL2.framework */,
DCA43BFF10DED5890070CEFD /* Info-Stella.plist */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
@ -1131,6 +1134,7 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
DCDAF4D818CA9AAB00D3865D /* SDL2.framework */,
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
@ -1976,9 +1980,10 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = net.sourceforge.stella;
};
buildConfigurationList = 2D91752109BA903B0026E9FF /* Build configuration list for PBXProject "stella_intel" */;
buildConfigurationList = 2D91752109BA903B0026E9FF /* Build configuration list for PBXProject "stella" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
@ -2265,9 +2270,11 @@
2D91751709BA90380026E9FF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
.,
"$(HOME)/Library/Frameworks",
"$(LOCAL_LIBRARY_DIR)/Frameworks",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@ -2287,7 +2294,7 @@
MAC_OSX,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
/Library/Frameworks/SDL2.framework/Headers,
../cheat,
../common,
../common/tv_filters,
@ -2302,11 +2309,7 @@
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "$(LIBRARY_SEARCH_PATHS)";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-framework",
SDL,
"-lz",
);
OTHER_LDFLAGS = "-lz";
PRODUCT_NAME = Stella;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
@ -2321,9 +2324,11 @@
2D91751809BA90380026E9FF /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
.,
"$(HOME)/Library/Frameworks",
"$(LOCAL_LIBRARY_DIR)/Frameworks",
);
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
@ -2342,7 +2347,7 @@
MAC_OSX,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
/Library/Frameworks/SDL2.framework/Headers,
../cheat,
../common,
../common/tv_filters,
@ -2357,11 +2362,7 @@
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "$(LIBRARY_SEARCH_PATHS)";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-framework",
SDL,
"-lz",
);
OTHER_LDFLAGS = "-lz";
PRODUCT_NAME = Stella;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
@ -2376,9 +2377,11 @@
2D91751909BA90380026E9FF /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(HOME)/Library/Frameworks",
.,
"$(LOCAL_LIBRARY_DIR)/Frameworks",
);
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = 3;
@ -2396,7 +2399,7 @@
MAC_OSX,
);
HEADER_SEARCH_PATHS = (
./SDL.framework/Headers,
/Library/Frameworks/SDL2.framework/Headers,
../cheat,
../common,
../common/tv_filters,
@ -2411,11 +2414,7 @@
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = .;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-framework",
SDL,
"-lz",
);
OTHER_LDFLAGS = "-lz";
PRODUCT_NAME = Stella;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
@ -2430,7 +2429,12 @@
2D91752209BA903B0026E9FF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = (
@ -2438,11 +2442,17 @@
"$(HOME)/Library/Frameworks",
);
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_VERSION = "";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx10.6;
MACOSX_DEPLOYMENT_TARGET = 10.5;
SDKROOT = macosx10.8;
VALID_ARCHS = "i386 x86_64";
};
name = Development;
@ -2450,18 +2460,29 @@
2D91752309BA903B0026E9FF /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
FRAMEWORK_SEARCH_PATHS = (
.,
"$(HOME)/Library/Frameworks",
);
GCC_ENABLE_CPP_RTTI = NO;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_VERSION = "";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx10.6;
MACOSX_DEPLOYMENT_TARGET = 10.5;
SDKROOT = macosx10.8;
VALID_ARCHS = "i386 x86_64";
};
name = Deployment;
@ -2469,12 +2490,25 @@
2D91752409BA903B0026E9FF /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_VERSION = "";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx10.6;
MACOSX_DEPLOYMENT_TARGET = 10.5;
SDKROOT = macosx10.8;
VALID_ARCHS = "i386 x86_64";
};
name = Default;
@ -2492,7 +2526,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Default;
};
2D91752109BA903B0026E9FF /* Build configuration list for PBXProject "stella_intel" */ = {
2D91752109BA903B0026E9FF /* Build configuration list for PBXProject "stella" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2D91752209BA903B0026E9FF /* Development */,