diff --git a/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/TemplateIcon.icns b/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/TemplateIcon.icns new file mode 100644 index 000000000..d4713d5e6 Binary files /dev/null and b/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/TemplateIcon.icns differ diff --git a/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/TemplateInfo.plist b/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/TemplateInfo.plist new file mode 100755 index 000000000..a1d73ddb0 --- /dev/null +++ b/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/TemplateInfo.plist @@ -0,0 +1,6 @@ +{ + FilesToMacroExpand = ( + "Info.plist", + ); + Description = "This project builds a SFML application linked against the System, Window and Graphics packages, and written in C."; +} diff --git a/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/project.pbxproj b/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/project.pbxproj new file mode 100644 index 000000000..e6da5063e --- /dev/null +++ b/CSFML/xcode/templates/CSFML Graphics-based Application/CSFML Graphics-based Application.xcodeproj/project.pbxproj @@ -0,0 +1,235 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + A0072ADE0F1D0EC500B4A594 /* csfml-system.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */; }; + A0072ADF0F1D0EC500B4A594 /* csfml-window.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */; }; + A0072AE00F1D0EC500B4A594 /* csfml-graphics.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */; }; + A01FB6C90F07CFCE000AAC7B /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = A01FB6C80F07CFCE000AAC7B /* main.c */; }; + A01FB6CE0F07CFF2000AAC7B /* csfml-graphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */; }; + A01FB6CF0F07CFF2000AAC7B /* csfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */; }; + A01FB6D00F07CFF2000AAC7B /* csfml-window.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + A0072AF00F1D0EDD00B4A594 /* Copy Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + A0072ADE0F1D0EC500B4A594 /* csfml-system.framework in Copy Frameworks */, + A0072ADF0F1D0EC500B4A594 /* csfml-window.framework in Copy Frameworks */, + A0072AE00F1D0EC500B4A594 /* csfml-graphics.framework in Copy Frameworks */, + ); + name = "Copy Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "«PROJECTNAME».app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A01FB6AC0F07CF6E000AAC7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A01FB6C80F07CFCE000AAC7B /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-graphics.framework"; path = "/Library/Frameworks/csfml-graphics.framework"; sourceTree = ""; }; + A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-system.framework"; path = "/Library/Frameworks/csfml-system.framework"; sourceTree = ""; }; + A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-window.framework"; path = "/Library/Frameworks/csfml-window.framework"; sourceTree = ""; }; + A01FB6CD0F07CFF2000AAC7B /* SFML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SFML.framework; path = /Library/Frameworks/SFML.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A01FB6A70F07CF6E000AAC7B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A01FB6CE0F07CFF2000AAC7B /* csfml-graphics.framework in Frameworks */, + A01FB6CF0F07CFF2000AAC7B /* csfml-system.framework in Frameworks */, + A01FB6D00F07CFF2000AAC7B /* csfml-window.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A01FB69A0F07CF63000AAC7B = { + isa = PBXGroup; + children = ( + A01FB6B20F07CF80000AAC7B /* Sources */, + A01FB6B10F07CF7C000AAC7B /* Resources */, + A01FB6B00F07CF75000AAC7B /* Frameworks */, + A01FB6AA0F07CF6E000AAC7B /* Products */, + ); + sourceTree = ""; + }; + A01FB6AA0F07CF6E000AAC7B /* Products */ = { + isa = PBXGroup; + children = ( + A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */, + ); + name = Products; + sourceTree = ""; + }; + A01FB6B00F07CF75000AAC7B /* Frameworks */ = { + isa = PBXGroup; + children = ( + A01FB6CD0F07CFF2000AAC7B /* SFML.framework */, + A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */, + A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */, + A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A01FB6B10F07CF7C000AAC7B /* Resources */ = { + isa = PBXGroup; + children = ( + A01FB6AC0F07CF6E000AAC7B /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + A01FB6B20F07CF80000AAC7B /* Sources */ = { + isa = PBXGroup; + children = ( + A01FB6C80F07CFCE000AAC7B /* main.c */, + ); + name = Sources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A01FB6A80F07CF6E000AAC7B /* «PROJECTNAME» */ = { + isa = PBXNativeTarget; + buildConfigurationList = A01FB6AF0F07CF6F000AAC7B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */; + buildPhases = ( + A01FB6A50F07CF6E000AAC7B /* Resources */, + A01FB6A60F07CF6E000AAC7B /* Sources */, + A01FB6A70F07CF6E000AAC7B /* Frameworks */, + A0072AF00F1D0EDD00B4A594 /* Copy Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "«PROJECTNAME»"; + productName = "«PROJECTNAME»"; + productReference = A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A01FB69C0F07CF63000AAC7B /* Project object */ = { + isa = PBXProject; + buildConfigurationList = A01FB69F0F07CF63000AAC7B /* Build configuration list for PBXProject "«PROJECTNAME»" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 0; + mainGroup = A01FB69A0F07CF63000AAC7B; + productRefGroup = A01FB6AA0F07CF6E000AAC7B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A01FB6A80F07CF6E000AAC7B /* «PROJECTNAME» */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A01FB6A50F07CF6E000AAC7B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A01FB6A60F07CF6E000AAC7B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A01FB6C90F07CFCE000AAC7B /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + A01FB69D0F07CF63000AAC7B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + }; + name = Debug; + }; + A01FB69E0F07CF63000AAC7B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + }; + name = Release; + }; + A01FB6AD0F07CF6F000AAC7B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = "«PROJECTNAME»"; + }; + name = Debug; + }; + A01FB6AE0F07CF6F000AAC7B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = "«PROJECTNAME»"; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A01FB69F0F07CF63000AAC7B /* Build configuration list for PBXProject "«PROJECTNAME»" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A01FB69D0F07CF63000AAC7B /* Debug */, + A01FB69E0F07CF63000AAC7B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A01FB6AF0F07CF6F000AAC7B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A01FB6AD0F07CF6F000AAC7B /* Debug */, + A01FB6AE0F07CF6F000AAC7B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A01FB69C0F07CF63000AAC7B /* Project object */; +} diff --git a/CSFML/xcode/templates/CSFML Graphics-based Application/Info.plist b/CSFML/xcode/templates/CSFML Graphics-based Application/Info.plist new file mode 100644 index 000000000..af9a1cadb --- /dev/null +++ b/CSFML/xcode/templates/CSFML Graphics-based Application/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/CSFML/xcode/templates/CSFML Graphics-based Application/main.c b/CSFML/xcode/templates/CSFML Graphics-based Application/main.c new file mode 100644 index 000000000..d1c95d946 --- /dev/null +++ b/CSFML/xcode/templates/CSFML Graphics-based Application/main.c @@ -0,0 +1,49 @@ + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +//////////////////////////////////////////////////////////// +/// Entry point of application +/// +/// \return Application exit code +/// +//////////////////////////////////////////////////////////// +int main() +{ + // Create main window + sfVideoMode mode = {640, 480, 32}; + sfWindowSettings settings = {24, 8, 0}; + sfRenderWindow *App = sfRenderWindow_Create (mode, "CSFML Graphics", sfClose, settings); + sfShape *Shape = sfShape_CreateCircle(200, 200, 100, sfYellow,10.f, sfBlue); + + // Start game loop + while (sfRenderWindow_IsOpened(App)) + { + // Process events + sfEvent Event; + while (sfRenderWindow_GetEvent(App, &Event)) + { + // Close window : exit + if (Event.Type == sfEvtClosed) + sfRenderWindow_Close(App); + } + + // Clear screen + sfRenderWindow_Clear(App, sfBlack); + + // Draw shape + sfRenderWindow_DrawShape(App, Shape); + + // Finally, display the rendered frame on screen + sfRenderWindow_Display(App); + } + + // Destroy our objects + sfShape_Destroy(Shape); + sfRenderWindow_Destroy(App); + + return EXIT_SUCCESS; +} diff --git a/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/TemplateIcon.icns b/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/TemplateIcon.icns new file mode 100644 index 000000000..d4713d5e6 Binary files /dev/null and b/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/TemplateIcon.icns differ diff --git a/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/TemplateInfo.plist b/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/TemplateInfo.plist new file mode 100755 index 000000000..6cac1dc10 --- /dev/null +++ b/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/TemplateInfo.plist @@ -0,0 +1,3 @@ +{ + Description = "This project builds a SFML executable linked against the System package, and written in C."; +} diff --git a/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/project.pbxproj b/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/project.pbxproj new file mode 100644 index 000000000..626e6650d --- /dev/null +++ b/CSFML/xcode/templates/CSFML Tool/CSFML Tool.xcodeproj/project.pbxproj @@ -0,0 +1,209 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 8DD76F650486A84900D96B5E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; + A0BAFBE70F07DDD2005BC41F /* csfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0BAFBE50F07DDD2005BC41F /* csfml-system.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 08FB7796FE84155DC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 8DD76F6C0486A84900D96B5E /* «PROJECTNAME» */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "«PROJECTNAME»"; sourceTree = BUILT_PRODUCTS_DIR; }; + A0BAFBE50F07DDD2005BC41F /* csfml-system.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-system.framework"; path = "/Library/Frameworks/csfml-system.framework"; sourceTree = ""; }; + A0BAFBE60F07DDD2005BC41F /* SFML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SFML.framework; path = /Library/Frameworks/SFML.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A0BAFBE70F07DDD2005BC41F /* csfml-system.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* «PROJECTNAME» */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A0BAFBE30F07DDBD005BC41F /* Frameworks */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = "«PROJECTNAME»"; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 08FB7796FE84155DC02AAC07 /* main.c */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* «PROJECTNAME» */, + ); + name = Products; + sourceTree = ""; + }; + A0BAFBE30F07DDBD005BC41F /* Frameworks */ = { + isa = PBXGroup; + children = ( + A0BAFBE60F07DDD2005BC41F /* SFML.framework */, + A0BAFBE50F07DDD2005BC41F /* csfml-system.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* «PROJECTNAME» */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "«PROJECTNAME»"; + productInstallPath = "$(HOME)/bin"; + productName = "«PROJECTNAME»"; + productReference = 8DD76F6C0486A84900D96B5E /* «PROJECTNAME» */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "«PROJECTNAME»" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* «PROJECTNAME» */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* «PROJECTNAME» */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F650486A84900D96B5E /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_GLIBCXX_DEBUG=1", + "_GLIBCXX_DEBUG_PEDANTIC=1", + ); + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = "«PROJECTNAME»"; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = "«PROJECTNAME»"; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + SDKROOT = macosx10.5; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = macosx10.5; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + 1DEB923308733DC60010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "«PROJECTNAME»" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + 1DEB923708733DC60010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/CSFML/xcode/templates/CSFML Tool/main.c b/CSFML/xcode/templates/CSFML Tool/main.c new file mode 100644 index 000000000..dec495230 --- /dev/null +++ b/CSFML/xcode/templates/CSFML Tool/main.c @@ -0,0 +1,10 @@ + +#include +#include + +int main() +{ + /* Your code here */ + + return 0; +} \ No newline at end of file diff --git a/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/TemplateIcon.icns b/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/TemplateIcon.icns new file mode 100644 index 000000000..d4713d5e6 Binary files /dev/null and b/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/TemplateIcon.icns differ diff --git a/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/TemplateInfo.plist b/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/TemplateInfo.plist new file mode 100755 index 000000000..e73fcc30e --- /dev/null +++ b/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/TemplateInfo.plist @@ -0,0 +1,6 @@ +{ + FilesToMacroExpand = ( + "Info.plist", + ); + Description = "This project builds a SFML application linked against the System and Window packages, and written in C."; +} diff --git a/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/project.pbxproj b/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/project.pbxproj new file mode 100644 index 000000000..9a0eb3706 --- /dev/null +++ b/CSFML/xcode/templates/CSFML Window-based Application/CSFML Window-based Application.xcodeproj/project.pbxproj @@ -0,0 +1,233 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + A0072ADE0F1D0EC500B4A594 /* csfml-system.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */; }; + A0072ADF0F1D0EC500B4A594 /* csfml-window.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */; }; + A01FB6C90F07CFCE000AAC7B /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = A01FB6C80F07CFCE000AAC7B /* main.c */; }; + A01FB6CF0F07CFF2000AAC7B /* csfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */; }; + A01FB6D00F07CFF2000AAC7B /* csfml-window.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */; }; + A072DDA60FCE9FE8002D8059 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A072DDA50FCE9FE8002D8059 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + A0072AF00F1D0EDD00B4A594 /* Copy Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + A0072ADE0F1D0EC500B4A594 /* csfml-system.framework in Copy Frameworks */, + A0072ADF0F1D0EC500B4A594 /* csfml-window.framework in Copy Frameworks */, + ); + name = "Copy Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "«PROJECTNAME».app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A01FB6AC0F07CF6E000AAC7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A01FB6C80F07CFCE000AAC7B /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-system.framework"; path = "/Library/Frameworks/csfml-system.framework"; sourceTree = ""; }; + A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-window.framework"; path = "/Library/Frameworks/csfml-window.framework"; sourceTree = ""; }; + A01FB6CD0F07CFF2000AAC7B /* SFML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SFML.framework; path = /Library/Frameworks/SFML.framework; sourceTree = ""; }; + A072DDA50FCE9FE8002D8059 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A01FB6A70F07CF6E000AAC7B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A01FB6CF0F07CFF2000AAC7B /* csfml-system.framework in Frameworks */, + A01FB6D00F07CFF2000AAC7B /* csfml-window.framework in Frameworks */, + A072DDA60FCE9FE8002D8059 /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A01FB69A0F07CF63000AAC7B = { + isa = PBXGroup; + children = ( + A01FB6B20F07CF80000AAC7B /* Sources */, + A01FB6B10F07CF7C000AAC7B /* Resources */, + A01FB6B00F07CF75000AAC7B /* Frameworks */, + A01FB6AA0F07CF6E000AAC7B /* Products */, + ); + sourceTree = ""; + }; + A01FB6AA0F07CF6E000AAC7B /* Products */ = { + isa = PBXGroup; + children = ( + A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */, + ); + name = Products; + sourceTree = ""; + }; + A01FB6B00F07CF75000AAC7B /* Frameworks */ = { + isa = PBXGroup; + children = ( + A072DDA50FCE9FE8002D8059 /* OpenGL.framework */, + A01FB6CD0F07CFF2000AAC7B /* SFML.framework */, + A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */, + A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A01FB6B10F07CF7C000AAC7B /* Resources */ = { + isa = PBXGroup; + children = ( + A01FB6AC0F07CF6E000AAC7B /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + A01FB6B20F07CF80000AAC7B /* Sources */ = { + isa = PBXGroup; + children = ( + A01FB6C80F07CFCE000AAC7B /* main.c */, + ); + name = Sources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A01FB6A80F07CF6E000AAC7B /* «PROJECTNAME» */ = { + isa = PBXNativeTarget; + buildConfigurationList = A01FB6AF0F07CF6F000AAC7B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */; + buildPhases = ( + A01FB6A50F07CF6E000AAC7B /* Resources */, + A01FB6A60F07CF6E000AAC7B /* Sources */, + A01FB6A70F07CF6E000AAC7B /* Frameworks */, + A0072AF00F1D0EDD00B4A594 /* Copy Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "«PROJECTNAME»"; + productName = "«PROJECTNAME»"; + productReference = A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A01FB69C0F07CF63000AAC7B /* Project object */ = { + isa = PBXProject; + buildConfigurationList = A01FB69F0F07CF63000AAC7B /* Build configuration list for PBXProject "«PROJECTNAME»" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 0; + mainGroup = A01FB69A0F07CF63000AAC7B; + productRefGroup = A01FB6AA0F07CF6E000AAC7B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A01FB6A80F07CF6E000AAC7B /* «PROJECTNAME» */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A01FB6A50F07CF6E000AAC7B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A01FB6A60F07CF6E000AAC7B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A01FB6C90F07CFCE000AAC7B /* main.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + A01FB69D0F07CF63000AAC7B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + }; + name = Debug; + }; + A01FB69E0F07CF63000AAC7B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + }; + name = Release; + }; + A01FB6AD0F07CF6F000AAC7B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = "«PROJECTNAME»"; + }; + name = Debug; + }; + A01FB6AE0F07CF6F000AAC7B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PREBINDING = NO; + PRODUCT_NAME = "«PROJECTNAME»"; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A01FB69F0F07CF63000AAC7B /* Build configuration list for PBXProject "«PROJECTNAME»" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A01FB69D0F07CF63000AAC7B /* Debug */, + A01FB69E0F07CF63000AAC7B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A01FB6AF0F07CF6F000AAC7B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A01FB6AD0F07CF6F000AAC7B /* Debug */, + A01FB6AE0F07CF6F000AAC7B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A01FB69C0F07CF63000AAC7B /* Project object */; +} diff --git a/CSFML/xcode/templates/CSFML Window-based Application/Info.plist b/CSFML/xcode/templates/CSFML Window-based Application/Info.plist new file mode 100644 index 000000000..af9a1cadb --- /dev/null +++ b/CSFML/xcode/templates/CSFML Window-based Application/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/CSFML/xcode/templates/CSFML Window-based Application/main.c b/CSFML/xcode/templates/CSFML Window-based Application/main.c new file mode 100644 index 000000000..278840c34 --- /dev/null +++ b/CSFML/xcode/templates/CSFML Window-based Application/main.c @@ -0,0 +1,59 @@ + +//////////////////////////////////////////////////////////// +// Headers +//////////////////////////////////////////////////////////// +#include + + +//////////////////////////////////////////////////////////// +/// Entry point of application +/// +/// \return Application exit code +/// +//////////////////////////////////////////////////////////// +int main() +{ + // Create main window + sfVideoMode mode = {640, 480, 32}; + sfWindowSettings settings = {24, 8, 0}; + sfWindow *App = sfWindow_Create (mode, "CSFML Window", sfClose, settings); + + // Start game loop + while (sfWindow_IsOpened(App)) + { + // Process events + sfEvent Event; + while (sfWindow_GetEvent(App, &Event)) + { + // Close window : exit + if (Event.Type == sfEvtClosed) + sfWindow_Close(App); + + // Escape key : exit + if ((Event.Type == sfEvtKeyPressed) && (Event.Key.Code == sfKeyEscape)) + sfWindow_Close(App); + + // Resize event : adjust viewport + if (Event.Type == sfEvtResized) + glViewport(0, 0, Event.Size.Width, Event.Size.Height); + } + + // Set the active window before using OpenGL commands + // It's useless here because active window is always the same, + // but don't forget it if you use multiple windows or controls + sfWindow_SetActive(App, sfTrue); + + // Clear color buffer + glClear(GL_COLOR_BUFFER_BIT); + + // Your drawing here... + + // Finally, display rendered frame on screen + sfWindow_Display(App); + } + + // Destroy our window + sfWindow_Destroy(App); + + return EXIT_SUCCESS; +}