diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4ab339097..777a72e34 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ -# add the examples subdirectories +# add the examples subdirectories add_subdirectory(ftp) add_subdirectory(opengl) add_subdirectory(pong) @@ -12,5 +12,7 @@ add_subdirectory(window) if(WINDOWS) add_subdirectory(win32) elseif(LINUX) - add_subdirectory(X11) + add_subdirectory(X11) +elseif(MACOSX) + add_subdirectory(cocoa) endif() diff --git a/examples/cocoa/CMakeLists.txt b/examples/cocoa/CMakeLists.txt new file mode 100644 index 000000000..7312bf71f --- /dev/null +++ b/examples/cocoa/CMakeLists.txt @@ -0,0 +1,63 @@ + +set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/cocoa) + +# all source files +set(SRC ${SRCROOT}/CocoaAppDelegate.h + ${SRCROOT}/CocoaAppDelegate.mm + ${SRCROOT}/NSString+stdstring.h + ${SRCROOT}/NSString+stdstring.mm + ${SRCROOT}/main.m) + +# all XIB files +set(XIBS MainMenu) + +# all resource files +set(RESOURCES ${SRCROOT}/resources/logo.png + ${SRCROOT}/resources/icon.icns + ${SRCROOT}/resources/blue.png + ${SRCROOT}/resources/green.png + ${SRCROOT}/resources/red.png + ${SRCROOT}/resources/Credits.rtf) + +# define the cocoa target and customize it +add_executable(cocoa MACOSX_BUNDLE ${SRC} ${RESOURCES}) +set_source_files_properties(${RESOURCES} PROPERTIES + MACOSX_PACKAGE_LOCATION Resources) +set_target_properties(cocoa PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${SRCROOT}/resources/Cocoa-Info.plist) +target_link_libraries(cocoa "-framework Cocoa -framework Foundation" + sfml-system sfml-window sfml-graphics) + +# compile XIB files +find_program(IBTOOL ibtool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin") +if(${IBTOOL} STREQUAL "IBTOOL-NOTFOUND") + message(FATAL_ERROR "ibtool is required to compile .xib files but wasn't found.") +endif() +set(RESOURCE_PATH "cocoa.app/Contents/Resources") +set(XIB_OUTPUT_PATH "${RESOURCE_PATH}/") +set(XIB_INPUT_PATH "${SRCROOT}/") +foreach(XIB ${XIBS}) + add_custom_command(TARGET cocoa + POST_BUILD + COMMAND ${IBTOOL} --errors + --output-format human-readable-text + --compile ${XIB_OUTPUT_PATH}/${XIB}.nib + ${XIB_INPUT_PATH}/${XIB}.xib + COMMENT "Compiling ${XIB}.xib") + # deactivated options : --warnings --notices +endforeach() + +# add install rule +install(TARGETS cocoa + BUNDLE DESTINATION ${INSTALL_MISC_DIR}/examples/cocoa + COMPONENT examples) + +# +# define the cocoa target +# sfml_add_example is not compatible with application bundles ! +# +#sfml_add_example(cocoa +# SOURCES ${SRC} +# DEPENDS sfml-system sfml-window sfml-graphics) +# + diff --git a/tools/xcode/example/Cocoa/CocoaAppDelegate.h b/examples/cocoa/CocoaAppDelegate.h similarity index 89% rename from tools/xcode/example/Cocoa/CocoaAppDelegate.h rename to examples/cocoa/CocoaAppDelegate.h index de583ff54..fb64954b0 100644 --- a/tools/xcode/example/Cocoa/CocoaAppDelegate.h +++ b/examples/cocoa/CocoaAppDelegate.h @@ -44,6 +44,7 @@ struct SFMLmainWindow; SFMLmainWindow *_mainWindow; NSTimer *_renderTimer; BOOL _visible; + BOOL _initialized; } @property (retain) IBOutlet NSWindow *window; @@ -57,3 +58,13 @@ struct SFMLmainWindow; -(IBAction)updateText:(NSButton *)sender; @end + +/* + * This interface is used to prevent the system alert produced when the SFML view + * has the focus and the user press a key. + */ +@interface SilentWindow : NSWindow + +-(void)keyDown:(NSEvent *)theEvent; + +@end diff --git a/tools/xcode/example/Cocoa/CocoaAppDelegate.mm b/examples/cocoa/CocoaAppDelegate.mm similarity index 64% rename from tools/xcode/example/Cocoa/CocoaAppDelegate.mm rename to examples/cocoa/CocoaAppDelegate.mm index 130429803..a7edc4ae6 100644 --- a/tools/xcode/example/Cocoa/CocoaAppDelegate.mm +++ b/examples/cocoa/CocoaAppDelegate.mm @@ -72,6 +72,8 @@ struct SFMLmainWindow @property (retain) NSTimer *renderTimer; @property (assign) BOOL visible; +@property (assign) BOOL initialized; + -(void)renderMainWindow:(NSTimer *)aTimer; @end @@ -88,31 +90,46 @@ struct SFMLmainWindow @synthesize renderTimer = _renderTimer; @synthesize visible = _visible; +@synthesize initialized = _initialized; + +- (id)init { + self = [super init]; + if (self) { + self.initialized = NO; + } + return self; +} + -(void)applicationDidFinishLaunching:(NSNotification *)aNotification { - // Init the 1st SFML render area. - self.mainWindow = new SFMLmainWindow(self.sfmlView); - self.mainWindow->text.SetString([self.textField.stringValue tostdwstring]); - self.visible = YES; - - // Launch the timer to periodically display our stuff into the Cocoa view. - self.renderTimer = [NSTimer timerWithTimeInterval:1.f/60.f - target:self - selector:@selector(renderMainWindow:) - userInfo:nil - repeats:YES]; - [[NSRunLoop mainRunLoop] addTimer:self.renderTimer - forMode:NSDefaultRunLoopMode]; - [[NSRunLoop mainRunLoop] addTimer:self.renderTimer - forMode:NSEventTrackingRunLoopMode]; - /* - * This is really some ugly code but in order to have the timer fired - * periodically we need to add it to the two above runloop mode. - * - * The default mode allows timer firing while the user doesn't do anything - * while the second mode allows timer firing while he is using a slider - * or a menu. - */ + if (!self.initialized) + { + // Init the 1st SFML render area. + self.mainWindow = new SFMLmainWindow(self.sfmlView); + self.mainWindow->text.SetString([self.textField.stringValue tostdwstring]); + self.visible = YES; + + // Launch the timer to periodically display our stuff into the Cocoa view. + self.renderTimer = [NSTimer timerWithTimeInterval:1.f/60.f + target:self + selector:@selector(renderMainWindow:) + userInfo:nil + repeats:YES]; + [[NSRunLoop mainRunLoop] addTimer:self.renderTimer + forMode:NSDefaultRunLoopMode]; + [[NSRunLoop mainRunLoop] addTimer:self.renderTimer + forMode:NSEventTrackingRunLoopMode]; + /* + * This is really some ugly code but in order to have the timer fired + * periodically we need to add it to the two above runloop mode. + * + * The default mode allows timer firing while the user doesn't do anything + * while the second mode allows timer firing while he is using a slider + * or a menu. + */ + + self.initialized = YES; + } } -(void)dealloc @@ -160,36 +177,44 @@ struct SFMLmainWindow -(IBAction)colorChanged:(NSPopUpButton *)sender { - // Convert title to color - NSString *color = [[sender selectedItem] title]; - if ([color isEqualToString:BLUE]) + if (self.initialized) { - self.mainWindow->background = sf::Color::Blue; - } - else if ([color isEqualToString:GREEN]) - { - self.mainWindow->background = sf::Color::Green; - } - else - { - self.mainWindow->background = sf::Color::Red; + // Convert title to color + NSString *color = [[sender selectedItem] title]; + if ([color isEqualToString:BLUE]) + { + self.mainWindow->background = sf::Color::Blue; + } + else if ([color isEqualToString:GREEN]) + { + self.mainWindow->background = sf::Color::Green; + } + else + { + self.mainWindow->background = sf::Color::Red; + } } } -(IBAction)rotationChanged:(NSSlider *)sender { - float angle = [sender floatValue]; - self.mainWindow->sprite.SetRotation(angle); + if (self.initialized) + { + float angle = [sender floatValue]; + self.mainWindow->sprite.SetRotation(angle); + } } -(IBAction)visibleChanged:(NSButton *)sender { - self.visible = [sender state] == NSOnState; + if (self.initialized) + self.visible = [sender state] == NSOnState; } -(IBAction)textChanged:(NSTextField *)sender { - self.mainWindow->text.SetString([[sender stringValue] tostdwstring]); + if (self.initialized) + self.mainWindow->text.SetString([[sender stringValue] tostdwstring]); } - (IBAction)updateText:(NSButton *)sender @@ -199,3 +224,12 @@ struct SFMLmainWindow } @end + +@implementation SilentWindow + +-(void)keyDown:(NSEvent *)theEvent +{ + // Do nothing except preventing this alert. +} + +@end diff --git a/tools/xcode/example/Cocoa/en.lproj/MainMenu.xib b/examples/cocoa/MainMenu.xib similarity index 99% rename from tools/xcode/example/Cocoa/en.lproj/MainMenu.xib rename to examples/cocoa/MainMenu.xib index bb8a33033..2001ff5a5 100644 --- a/tools/xcode/example/Cocoa/en.lproj/MainMenu.xib +++ b/examples/cocoa/MainMenu.xib @@ -1,14 +1,14 @@ - 0 - 10K540 - 1891 - 1038.36 - 461.00 + 1070 + 11C74 + 1938 + 1138.23 + 567.00 com.apple.InterfaceBuilder.CocoaPlugin - 1891 + 1938 YES @@ -1328,8 +1328,9 @@ {{232, 390}, {485, 379}} 1417150464 Cocoa - NSWindow + SilentWindow + 256 @@ -1359,27 +1360,28 @@ 400 75 - + + + Blue + + 1048576 + 2147483647 + 1 + + NSImage + blue + + + + _popUpItemAction: + + YES Color YES - - - Blue - - 1048576 - 2147483647 - - NSImage - blue - - - - _popUpItemAction: - - + Green @@ -1600,7 +1602,6 @@ {{17, 2}, {451, 17}} - YES 68288064 @@ -1622,10 +1623,11 @@ - {{0, 0}, {1440, 878}} - {1e+13, 1e+13} + {{0, 0}, {1920, 1058}} + {10000000000000, 10000000000000} NO 22 + YES CocoaAppDelegate @@ -1637,6 +1639,30 @@ YES + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 495 + performMiniaturize: @@ -1677,14 +1703,6 @@ 127 - - - orderFrontStandardAboutPanel: - - - - 142 - performClose: @@ -1925,46 +1943,6 @@ 374 - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - raiseBaseline: @@ -2093,14 +2071,6 @@ 441 - - - terminate: - - - - 449 - toggleAutomaticSpellingCorrection: @@ -2197,14 +2167,6 @@ 493 - - - delegate - - - - 495 - alignCenter: @@ -2309,6 +2271,54 @@ 530 + + + initialFirstResponder + + + + 559 + + + + addFontTrait: + + + + 421 + + + + addFontTrait: + + + + 422 + + + + modifyFont: + + + + 423 + + + + orderFrontFontPanel: + + + + 424 + + + + modifyFont: + + + + 425 + window @@ -2333,14 +2343,6 @@ 558 - - - initialFirstResponder - - - - 559 - rotationChanged: @@ -4147,10 +4149,6 @@ 0 IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 diff --git a/tools/xcode/example/Cocoa/NSString+stdstring.h b/examples/cocoa/NSString+stdstring.h similarity index 100% rename from tools/xcode/example/Cocoa/NSString+stdstring.h rename to examples/cocoa/NSString+stdstring.h diff --git a/tools/xcode/example/Cocoa/NSString+stdstring.mm b/examples/cocoa/NSString+stdstring.mm similarity index 98% rename from tools/xcode/example/Cocoa/NSString+stdstring.mm rename to examples/cocoa/NSString+stdstring.mm index db5ea3966..564410d88 100644 --- a/tools/xcode/example/Cocoa/NSString+stdstring.mm +++ b/examples/cocoa/NSString+stdstring.mm @@ -23,6 +23,7 @@ // //////////////////////////////////////////////////////////// +#import "NSString+stdstring.h" #include @implementation NSString (NSString_stdstring) diff --git a/tools/xcode/example/Cocoa/main.m b/examples/cocoa/main.m similarity index 100% rename from tools/xcode/example/Cocoa/main.m rename to examples/cocoa/main.m diff --git a/tools/xcode/example/readme.txt b/examples/cocoa/readme.txt similarity index 84% rename from tools/xcode/example/readme.txt rename to examples/cocoa/readme.txt index ba0941c04..13515a064 100644 --- a/tools/xcode/example/readme.txt +++ b/examples/cocoa/readme.txt @@ -19,6 +19,9 @@ Features OpenGL code too, of course). * It also provides tools for converting NSString to and from std::[w]string in an Objective-C Category of NSString. + * Moreover, it shows how you can prevent annoying the system alerts + produced when the SFML view has focus and the user press a key + (see SilentWindow interface in CocoaAppDelegate.[h|mm]). Special Considerations ---------------------- diff --git a/tools/xcode/example/Cocoa/Cocoa-Info.plist b/examples/cocoa/resources/Cocoa-Info.plist similarity index 76% rename from tools/xcode/example/Cocoa/Cocoa-Info.plist rename to examples/cocoa/resources/Cocoa-Info.plist index ac4103a92..3ba45e1ef 100644 --- a/tools/xcode/example/Cocoa/Cocoa-Info.plist +++ b/examples/cocoa/resources/Cocoa-Info.plist @@ -5,15 +5,15 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + cocoa CFBundleIconFile - logo.png + icon.icns CFBundleIdentifier - org.sfml-dev.${PRODUCT_NAME:rfc1034identifier} + org.sfml-dev.cocoa CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + cocoa CFBundlePackageType APPL CFBundleShortVersionString @@ -23,9 +23,9 @@ CFBundleVersion 1 LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} + 10.6 NSHumanReadableCopyright - Copyright © 2007-2011 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License. + Copyright © 2007-2012 Marco Antognini and Laurent Gomila. Shared under zlib/libpng License. NSMainNibFile MainMenu NSPrincipalClass diff --git a/examples/cocoa/resources/Credits.rtf b/examples/cocoa/resources/Credits.rtf new file mode 100644 index 000000000..53942fc65 --- /dev/null +++ b/examples/cocoa/resources/Credits.rtf @@ -0,0 +1,7 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qj + +\f0\fs24 \cf0 See {\field{\*\fldinst{HYPERLINK "http://sfml-dev.org"}}{\fldrslt http://sfml-dev.org}} for more information} \ No newline at end of file diff --git a/tools/xcode/example/Cocoa/blue.png b/examples/cocoa/resources/blue.png similarity index 100% rename from tools/xcode/example/Cocoa/blue.png rename to examples/cocoa/resources/blue.png diff --git a/tools/xcode/example/Cocoa/green.png b/examples/cocoa/resources/green.png similarity index 100% rename from tools/xcode/example/Cocoa/green.png rename to examples/cocoa/resources/green.png diff --git a/examples/cocoa/resources/icon.icns b/examples/cocoa/resources/icon.icns new file mode 100644 index 000000000..dbbc33239 Binary files /dev/null and b/examples/cocoa/resources/icon.icns differ diff --git a/tools/xcode/example/Cocoa/logo.png b/examples/cocoa/resources/logo.png similarity index 100% rename from tools/xcode/example/Cocoa/logo.png rename to examples/cocoa/resources/logo.png diff --git a/tools/xcode/example/Cocoa/red.png b/examples/cocoa/resources/red.png similarity index 100% rename from tools/xcode/example/Cocoa/red.png rename to examples/cocoa/resources/red.png diff --git a/tools/xcode/example/Cocoa.xcodeproj/project.pbxproj b/tools/xcode/example/Cocoa.xcodeproj/project.pbxproj deleted file mode 100644 index 3e8c495ae..000000000 --- a/tools/xcode/example/Cocoa.xcodeproj/project.pbxproj +++ /dev/null @@ -1,318 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 4C5C378113CF64E1003655B8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C5C378013CF64E1003655B8 /* Cocoa.framework */; }; - 4C5C378B13CF64E1003655B8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C5C378913CF64E1003655B8 /* InfoPlist.strings */; }; - 4C5C378D13CF64E1003655B8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C378C13CF64E1003655B8 /* main.m */; }; - 4C5C379113CF64E1003655B8 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4C5C378F13CF64E1003655B8 /* Credits.rtf */; }; - 4C5C379413CF64E1003655B8 /* CocoaAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C379313CF64E1003655B8 /* CocoaAppDelegate.mm */; }; - 4C5C379713CF64E1003655B8 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C5C379513CF64E1003655B8 /* MainMenu.xib */; }; - 4CD83D6713D0A29400A29530 /* blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD83D6413D0A29400A29530 /* blue.png */; }; - 4CD83D6813D0A29400A29530 /* green.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD83D6513D0A29400A29530 /* green.png */; }; - 4CD83D6913D0A29400A29530 /* red.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD83D6613D0A29400A29530 /* red.png */; }; - 4CDE97AB13CF94760071C912 /* libsfml-graphics-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CDE97A813CF94760071C912 /* libsfml-graphics-d.dylib */; }; - 4CDE97AC13CF94760071C912 /* libsfml-system-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CDE97A913CF94760071C912 /* libsfml-system-d.dylib */; }; - 4CDE97AD13CF94760071C912 /* libsfml-window-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CDE97AA13CF94760071C912 /* libsfml-window-d.dylib */; }; - 4CDE97CD13D0366D0071C912 /* NSString+stdstring.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4CDE97CC13D0366D0071C912 /* NSString+stdstring.mm */; }; - 4CEFC42F13D09CB500F92B14 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CEFC42E13D09CB500F92B14 /* logo.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 4C5C377C13CF64E1003655B8 /* Cocoa.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cocoa.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 4C5C378013CF64E1003655B8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 4C5C378313CF64E1003655B8 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 4C5C378413CF64E1003655B8 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 4C5C378513CF64E1003655B8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 4C5C378813CF64E1003655B8 /* Cocoa-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Cocoa-Info.plist"; sourceTree = ""; }; - 4C5C378A13CF64E1003655B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 4C5C378C13CF64E1003655B8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 4C5C378E13CF64E1003655B8 /* Cocoa-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Cocoa-Prefix.pch"; sourceTree = ""; }; - 4C5C379013CF64E1003655B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - 4C5C379213CF64E1003655B8 /* CocoaAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CocoaAppDelegate.h; sourceTree = ""; }; - 4C5C379313CF64E1003655B8 /* CocoaAppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CocoaAppDelegate.mm; sourceTree = ""; }; - 4C5C379613CF64E1003655B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - 4CD83D6413D0A29400A29530 /* blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blue.png; sourceTree = ""; }; - 4CD83D6513D0A29400A29530 /* green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = green.png; sourceTree = ""; }; - 4CD83D6613D0A29400A29530 /* red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = red.png; sourceTree = ""; }; - 4CDE97A813CF94760071C912 /* libsfml-graphics-d.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libsfml-graphics-d.dylib"; path = "usr/local/lib/libsfml-graphics-d.dylib"; sourceTree = SDKROOT; }; - 4CDE97A913CF94760071C912 /* libsfml-system-d.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libsfml-system-d.dylib"; path = "usr/local/lib/libsfml-system-d.dylib"; sourceTree = SDKROOT; }; - 4CDE97AA13CF94760071C912 /* libsfml-window-d.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libsfml-window-d.dylib"; path = "usr/local/lib/libsfml-window-d.dylib"; sourceTree = SDKROOT; }; - 4CDE97CB13D0366D0071C912 /* NSString+stdstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+stdstring.h"; sourceTree = ""; }; - 4CDE97CC13D0366D0071C912 /* NSString+stdstring.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSString+stdstring.mm"; sourceTree = ""; }; - 4CEFC42E13D09CB500F92B14 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4C5C377913CF64E1003655B8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4CDE97AB13CF94760071C912 /* libsfml-graphics-d.dylib in Frameworks */, - 4CDE97AC13CF94760071C912 /* libsfml-system-d.dylib in Frameworks */, - 4CDE97AD13CF94760071C912 /* libsfml-window-d.dylib in Frameworks */, - 4C5C378113CF64E1003655B8 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4C5C377113CF64E1003655B8 = { - isa = PBXGroup; - children = ( - 4C5C378613CF64E1003655B8 /* Cocoa */, - 4C5C377F13CF64E1003655B8 /* Frameworks */, - 4C5C377D13CF64E1003655B8 /* Products */, - ); - sourceTree = ""; - }; - 4C5C377D13CF64E1003655B8 /* Products */ = { - isa = PBXGroup; - children = ( - 4C5C377C13CF64E1003655B8 /* Cocoa.app */, - ); - name = Products; - sourceTree = ""; - }; - 4C5C377F13CF64E1003655B8 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4CDE97A813CF94760071C912 /* libsfml-graphics-d.dylib */, - 4CDE97A913CF94760071C912 /* libsfml-system-d.dylib */, - 4CDE97AA13CF94760071C912 /* libsfml-window-d.dylib */, - 4C5C378013CF64E1003655B8 /* Cocoa.framework */, - 4C5C378213CF64E1003655B8 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4C5C378213CF64E1003655B8 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 4C5C378313CF64E1003655B8 /* AppKit.framework */, - 4C5C378413CF64E1003655B8 /* CoreData.framework */, - 4C5C378513CF64E1003655B8 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 4C5C378613CF64E1003655B8 /* Cocoa */ = { - isa = PBXGroup; - children = ( - 4C5C379213CF64E1003655B8 /* CocoaAppDelegate.h */, - 4C5C379313CF64E1003655B8 /* CocoaAppDelegate.mm */, - 4C5C379513CF64E1003655B8 /* MainMenu.xib */, - 4CDE97CB13D0366D0071C912 /* NSString+stdstring.h */, - 4CDE97CC13D0366D0071C912 /* NSString+stdstring.mm */, - 4C5C378713CF64E1003655B8 /* Supporting Files */, - ); - path = Cocoa; - sourceTree = ""; - }; - 4C5C378713CF64E1003655B8 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 4CEFC42E13D09CB500F92B14 /* logo.png */, - 4CD83D6413D0A29400A29530 /* blue.png */, - 4CD83D6513D0A29400A29530 /* green.png */, - 4CD83D6613D0A29400A29530 /* red.png */, - 4C5C378813CF64E1003655B8 /* Cocoa-Info.plist */, - 4C5C378913CF64E1003655B8 /* InfoPlist.strings */, - 4C5C378C13CF64E1003655B8 /* main.m */, - 4C5C378E13CF64E1003655B8 /* Cocoa-Prefix.pch */, - 4C5C378F13CF64E1003655B8 /* Credits.rtf */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4C5C377B13CF64E1003655B8 /* Cocoa */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4C5C379A13CF64E1003655B8 /* Build configuration list for PBXNativeTarget "Cocoa" */; - buildPhases = ( - 4C5C377813CF64E1003655B8 /* Sources */, - 4C5C377913CF64E1003655B8 /* Frameworks */, - 4C5C377A13CF64E1003655B8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Cocoa; - productName = Cocoa; - productReference = 4C5C377C13CF64E1003655B8 /* Cocoa.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4C5C377313CF64E1003655B8 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 4C5C377613CF64E1003655B8 /* Build configuration list for PBXProject "Cocoa" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 4C5C377113CF64E1003655B8; - productRefGroup = 4C5C377D13CF64E1003655B8 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4C5C377B13CF64E1003655B8 /* Cocoa */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 4C5C377A13CF64E1003655B8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4C5C378B13CF64E1003655B8 /* InfoPlist.strings in Resources */, - 4C5C379113CF64E1003655B8 /* Credits.rtf in Resources */, - 4C5C379713CF64E1003655B8 /* MainMenu.xib in Resources */, - 4CEFC42F13D09CB500F92B14 /* logo.png in Resources */, - 4CD83D6713D0A29400A29530 /* blue.png in Resources */, - 4CD83D6813D0A29400A29530 /* green.png in Resources */, - 4CD83D6913D0A29400A29530 /* red.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4C5C377813CF64E1003655B8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4C5C378D13CF64E1003655B8 /* main.m in Sources */, - 4C5C379413CF64E1003655B8 /* CocoaAppDelegate.mm in Sources */, - 4CDE97CD13D0366D0071C912 /* NSString+stdstring.mm in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 4C5C378913CF64E1003655B8 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 4C5C378A13CF64E1003655B8 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 4C5C378F13CF64E1003655B8 /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - 4C5C379013CF64E1003655B8 /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - 4C5C379513CF64E1003655B8 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 4C5C379613CF64E1003655B8 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 4C5C379813CF64E1003655B8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = ""; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 4C5C379913CF64E1003655B8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_SYMBOLS_PRIVATE_EXTERN = YES; - GCC_VERSION = ""; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - SDKROOT = macosx; - }; - name = Release; - }; - 4C5C379B13CF64E1003655B8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Cocoa/Cocoa-Prefix.pch"; - INFOPLIST_FILE = "Cocoa/Cocoa-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.6; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 4C5C379C13CF64E1003655B8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Cocoa/Cocoa-Prefix.pch"; - INFOPLIST_FILE = "Cocoa/Cocoa-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.6; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4C5C377613CF64E1003655B8 /* Build configuration list for PBXProject "Cocoa" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4C5C379813CF64E1003655B8 /* Debug */, - 4C5C379913CF64E1003655B8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4C5C379A13CF64E1003655B8 /* Build configuration list for PBXNativeTarget "Cocoa" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4C5C379B13CF64E1003655B8 /* Debug */, - 4C5C379C13CF64E1003655B8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4C5C377313CF64E1003655B8 /* Project object */; -} diff --git a/tools/xcode/example/Cocoa.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tools/xcode/example/Cocoa.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b56347b71..000000000 --- a/tools/xcode/example/Cocoa.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/tools/xcode/example/Cocoa/Cocoa-Prefix.pch b/tools/xcode/example/Cocoa/Cocoa-Prefix.pch deleted file mode 100644 index 63179b0dc..000000000 --- a/tools/xcode/example/Cocoa/Cocoa-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Cocoa' target in the 'Cocoa' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/tools/xcode/example/Cocoa/en.lproj/Credits.rtf b/tools/xcode/example/Cocoa/en.lproj/Credits.rtf deleted file mode 100644 index 61de98d95..000000000 --- a/tools/xcode/example/Cocoa/en.lproj/Credits.rtf +++ /dev/null @@ -1,7 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qj\pardirnatural - -\f0\fs24 \cf0 See http://sfml-dev.org for more information} \ No newline at end of file diff --git a/tools/xcode/example/Cocoa/en.lproj/InfoPlist.strings b/tools/xcode/example/Cocoa/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8..000000000 --- a/tools/xcode/example/Cocoa/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ -