Add Xcode 4 templates (issue #13)
This commit is contained in:
parent
67c498dde3
commit
0449e74dc3
43
xcode/SFML Application Base.xctemplate/ResourcePath.hpp
vendored
Normal file
43
xcode/SFML Application Base.xctemplate/ResourcePath.hpp
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2011 Marco Antognini (antognini.marco@gmail.com),
|
||||
// Laurent Gomila (laurent.gom@gmail.com),
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it freely,
|
||||
// subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented;
|
||||
// you must not claim that you wrote the original software.
|
||||
// If you use this software in a product, an acknowledgment
|
||||
// in the product documentation would be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such,
|
||||
// and must not be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef RESOURCE_PATH_HPP
|
||||
#define RESOURCE_PATH_HPP
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <string>
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the path to the resource folder.
|
||||
///
|
||||
/// \return The path to the resource folder associate
|
||||
/// with the main bundle or an empty string is there is no bundle.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
std::string ResourcePath(void);
|
||||
|
||||
#endif
|
52
xcode/SFML Application Base.xctemplate/ResourcePath.mm
vendored
Normal file
52
xcode/SFML Application Base.xctemplate/ResourcePath.mm
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2011 Marco Antognini (antognini.marco@gmail.com),
|
||||
// Laurent Gomila (laurent.gom@gmail.com),
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it freely,
|
||||
// subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented;
|
||||
// you must not claim that you wrote the original software.
|
||||
// If you use this software in a product, an acknowledgment
|
||||
// in the product documentation would be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such,
|
||||
// and must not be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include "ResourcePath.hpp"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
std::string ResourcePath(void)
|
||||
{
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
std::string rpath;
|
||||
NSBundle* bundle = [NSBundle mainBundle];
|
||||
|
||||
if (bundle == nil) {
|
||||
#ifdef DEBUG
|
||||
NSLog(@"bundle is nil... thus no resources path can be found.");
|
||||
#endif
|
||||
} else {
|
||||
NSString* path = [bundle resourcePath];
|
||||
rpath = [path UTF8String] + std::string("/");
|
||||
}
|
||||
|
||||
[pool drain];
|
||||
|
||||
return rpath;
|
||||
}
|
597
xcode/SFML Application Base.xctemplate/TemplateInfo.plist
vendored
Normal file
597
xcode/SFML Application Base.xctemplate/TemplateInfo.plist
vendored
Normal file
@ -0,0 +1,597 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!--
|
||||
SFML - Simple and Fast Multimedia Library
|
||||
Copyright (C) 2007-2011 Marco Antognini (antognini.marco@gmail.com),
|
||||
Laurent Gomila (laurent.gom@gmail.com),
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented;
|
||||
you must not claim that you wrote the original software.
|
||||
If you use this software in a product, an acknowledgment
|
||||
in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such,
|
||||
and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
-->
|
||||
<!--
|
||||
###########################################################################
|
||||
*************************** org.sfml-dev.AppBase template *****************
|
||||
###########################################################################
|
||||
-->
|
||||
<key>Kind</key>
|
||||
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.sfml-dev.AppBase</string>
|
||||
|
||||
<key>Ancestors</key>
|
||||
<array>
|
||||
<string>com.apple.dt.unit.macBase</string>
|
||||
</array>
|
||||
|
||||
<!-- ############################################################### Options -->
|
||||
<key>Options</key>
|
||||
<array>
|
||||
<!-- ********************************************* Window Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>windowModule</string>
|
||||
<key>Name</key>
|
||||
<string>Use window module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether window module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>WINDOW_RELEASE</key>
|
||||
<string>-lsfml-window</string>
|
||||
|
||||
<key>WINDOW_DEBUG</key>
|
||||
<string>-lsfml-window-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:window:include</key>
|
||||
<string>#include <SFML/Window.hpp></string>
|
||||
|
||||
<key>main.cpp:main:window:content</key>
|
||||
<string>sf::Window window(sf::VideoMode(800, 600), "SFML window");</string>
|
||||
|
||||
<!-- erase system/audio module content -->
|
||||
<key>main.cpp:system:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:audio_loop</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>WINDOW_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>WINDOW_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:window:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:window:content</key>
|
||||
<string></string>
|
||||
|
||||
<!-- erase main loop & display -->
|
||||
<key>main.cpp:main:event_loop</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:display</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- ******************************************* Graphics Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>graphicsModule</string>
|
||||
<key>RequiredOptions</key>
|
||||
<dict>
|
||||
<key>windowModule</key>
|
||||
<string>true</string>
|
||||
</dict>
|
||||
<key>Name</key>
|
||||
<string>Use graphics module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether graphics module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>GRAPHICS_RELEASE</key>
|
||||
<string>-lsfml-graphics</string>
|
||||
|
||||
<key>GRAPHICS_DEBUG</key>
|
||||
<string>-lsfml-graphics-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:graphics:include</key>
|
||||
<string>#include <SFML/Graphics.hpp></string>
|
||||
|
||||
<key>main.cpp:main:graphics_init_window</key>
|
||||
<string>// Create the main window
|
||||
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:image_init</key>
|
||||
<string>
|
||||
// Load a sprite to display
|
||||
sf::Image image;
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:image_finalize</key>
|
||||
<string> return EXIT_FAILURE;
|
||||
sf::Sprite sprite(image);
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:image_load</key>
|
||||
<string>if (!image.LoadFromFile(ResourcePath() + "cute_image.jpg"))</string>
|
||||
|
||||
<key>main.cpp:main:text_init</key>
|
||||
<string>
|
||||
// Create a graphical text to display
|
||||
sf::Font font;
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:text_finalize</key>
|
||||
<string> return EXIT_FAILURE;
|
||||
sf::Text text("Hello SFML", font, 50);
|
||||
text.SetColor(sf::Color::Black);
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:text_load</key>
|
||||
<string>if (!font.LoadFromFile(ResourcePath() + "sansation.ttf"))</string>
|
||||
|
||||
<key>main.cpp:main:graphics_display</key>
|
||||
<string>
|
||||
// Clear screen
|
||||
window.Clear();
|
||||
|
||||
// Draw the sprite
|
||||
window.Draw(sprite);
|
||||
|
||||
// Draw the string
|
||||
window.Draw(text);
|
||||
</string>
|
||||
|
||||
<!-- erase window module content -->
|
||||
<key>main.cpp:window:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:window:content</key>
|
||||
<string></string>
|
||||
|
||||
<key>sansation.ttf</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>Supporting Files</string>
|
||||
<key>Path</key>
|
||||
<string>sansation.ttf</string>
|
||||
</dict>
|
||||
|
||||
<key>cute_image.jpg</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>Supporting Files</string>
|
||||
<key>Path</key>
|
||||
<string>cute_image.jpg</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- resources -->
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>sansation.ttf</string>
|
||||
<string>cute_image.jpg</string>
|
||||
</array>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>GRAPHICS_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>GRAPHICS_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition : none -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:graphics:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:graphics_init</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:graphics_display</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:image_load</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- ********************************************** Audio Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>audioModule</string>
|
||||
<key>Name</key>
|
||||
<string>Use audio module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether audio module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>AUDIO_RELEASE</key>
|
||||
<string>-lsfml-audio</string>
|
||||
|
||||
<key>AUDIO_DEBUG</key>
|
||||
<string>-lsfml-audio-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:audio:include</key>
|
||||
<string>#include <SFML/Audio.hpp></string>
|
||||
|
||||
<key>main.cpp:main:audio:content</key>
|
||||
<string>
|
||||
// Load a music to play
|
||||
sf::Music music;
|
||||
if (!music.OpenFromFile(ResourcePath() + "nice_music.ogg"))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// Play the music
|
||||
music.Play();
|
||||
</string>
|
||||
<key>nice_music.ogg</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>Supporting Files</string>
|
||||
<key>Path</key>
|
||||
<string>nice_music.ogg</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- resources -->
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>nice_music.ogg</string>
|
||||
</array>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>AUDIO_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>AUDIO_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:audio:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:audio:content</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- ******************************************** Network Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>networkModule</string>
|
||||
<key>Name</key>
|
||||
<string>Use network module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether network module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>NETWORK_RELEASE</key>
|
||||
<string>-lsfml-network</string>
|
||||
|
||||
<key>NETWORK_DEBUG</key>
|
||||
<string>-lsfml-network-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:network:include</key>
|
||||
<string>#include <SFML/Network.hpp></string>
|
||||
|
||||
<!-- no content example for network -->
|
||||
</dict>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>NETWORK_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>NETWORK_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:network:include</key>
|
||||
<string></string>
|
||||
|
||||
<!-- no content example for network -->
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
|
||||
<!-- ################################################################# Nodes -->
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>main.cpp:system:include</string>
|
||||
<string>main.cpp:window:include</string>
|
||||
<string>main.cpp:graphics:include</string>
|
||||
<string>main.cpp:audio:include</string>
|
||||
<string>main.cpp:network:include</string>
|
||||
<string>main.cpp:resources:include</string>
|
||||
<string>main.cpp:main:window:content</string>
|
||||
<string>main.cpp:main:graphics_init_window</string>
|
||||
<string>main.cpp:main:image_init</string>
|
||||
<string>main.cpp:main:image_load</string>
|
||||
<string>main.cpp:main:image_finalize</string>
|
||||
<string>main.cpp:main:text_init</string>
|
||||
<string>main.cpp:main:text_load</string>
|
||||
<string>main.cpp:main:text_finalize</string>
|
||||
<string>main.cpp:main:audio:content</string>
|
||||
<string>main.cpp:main:audio_loop</string>
|
||||
<string>main.cpp:main:event_loop</string>
|
||||
<string>main.cpp:main:graphics_display</string>
|
||||
<string>main.cpp:main:display</string>
|
||||
<string>ResourcePath.mm</string>
|
||||
<string>ResourcePath.hpp</string>
|
||||
</array>
|
||||
|
||||
|
||||
<!-- ########################################################### Definitions -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<!-- main function -->
|
||||
<key>*:main</key>
|
||||
<dict>
|
||||
<key>Beginning</key>
|
||||
<string>
|
||||
int main (int argc, const char * argv[])
|
||||
{</string>
|
||||
<key>End</key>
|
||||
<string>
|
||||
return EXIT_SUCCESS;
|
||||
}</string>
|
||||
<key>Indent</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
|
||||
<key>ResourcePath.mm</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>ResourcePath.mm</string>
|
||||
</dict>
|
||||
|
||||
<key>ResourcePath.hpp</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>ResourcePath.hpp</string>
|
||||
</dict>
|
||||
|
||||
|
||||
<key>main.cpp:system:include</key>
|
||||
<string>#include <SFML/System.hpp></string>
|
||||
|
||||
<key>main.cpp:main:event_loop</key>
|
||||
<string>
|
||||
// Start the game loop
|
||||
while (window.IsOpened())
|
||||
{
|
||||
// Process events
|
||||
sf::Event event;
|
||||
while (window.PollEvent(event))
|
||||
{
|
||||
// Close window : exit
|
||||
if (event.Type == sf::Event::Closed)
|
||||
window.Close();
|
||||
|
||||
// Escape pressed : exit
|
||||
if (event.Type == sf::Event::KeyPressed && event.Key.Code == sf::Key::Escape)
|
||||
window.Close();
|
||||
}
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:display</key>
|
||||
<string>
|
||||
// Update the window
|
||||
window.Display();
|
||||
}
|
||||
</string>
|
||||
|
||||
<key>main.cpp:resources:include</key>
|
||||
<string>#include "ResourcePath.hpp"</string>
|
||||
|
||||
<key>main.cpp:main:audio_loop</key>
|
||||
<string>while (music.GetStatus() == sf::Music::Playing) {
|
||||
sf::Sleep(100);
|
||||
}</string>
|
||||
</dict>
|
||||
|
||||
|
||||
<!-- ###################################################### Project Settings -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<!-- *************************************************** Basic stuff -->
|
||||
<key>Name</key>
|
||||
<string>___PACKAGENAME___</string>
|
||||
|
||||
<!-- *********************************************** Shared Settings -->
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>PRODUCT_NAME</key>
|
||||
<string>$(TARGET_NAME)</string>
|
||||
|
||||
<key>SYSTEM_RELEASE</key>
|
||||
<string>-lsfml-system</string>
|
||||
<key>SYSTEM_DEBUG</key>
|
||||
<string>-lsfml-system-d</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
||||
</dict>
|
||||
|
||||
<key>Configurations</key>
|
||||
<dict>
|
||||
<!-- ***************************************************** Debug -->
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
<key>OTHER_LDFLAGS</key>
|
||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_DEBUG) $(WINDOW_DEBUG) $(GRAPHICS_DEBUG) $(AUDIO_DEBUG) $(NETWORK_DEBUG)</string>
|
||||
</dict>
|
||||
|
||||
|
||||
<!-- *************************************************** Release -->
|
||||
<key>Release</key>
|
||||
<dict>
|
||||
<key>OTHER_LDFLAGS</key>
|
||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_RELEASE) $(WINDOW_RELEASE) $(GRAPHICS_RELEASE) $(AUDIO_RELEASE) $(NETWORK_RELEASE)</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<key>Targets</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Frameworks</key>
|
||||
<array>
|
||||
<string>Foundation</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
BIN
xcode/SFML Application Base.xctemplate/cute_image.jpg
vendored
Normal file
BIN
xcode/SFML Application Base.xctemplate/cute_image.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
xcode/SFML Application Base.xctemplate/nice_music.ogg
vendored
Normal file
BIN
xcode/SFML Application Base.xctemplate/nice_music.ogg
vendored
Normal file
Binary file not shown.
BIN
xcode/SFML Application Base.xctemplate/sansation.ttf
vendored
Normal file
BIN
xcode/SFML Application Base.xctemplate/sansation.ttf
vendored
Normal file
Binary file not shown.
BIN
xcode/SFML Application.xctemplate/TemplateIcon.icns
vendored
Normal file
BIN
xcode/SFML Application.xctemplate/TemplateIcon.icns
vendored
Normal file
Binary file not shown.
121
xcode/SFML Application.xctemplate/TemplateInfo.plist
vendored
Normal file
121
xcode/SFML Application.xctemplate/TemplateInfo.plist
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!--
|
||||
SFML - Simple and Fast Multimedia Library
|
||||
Copyright (C) 2007-2011 Marco Antognini (antognini.marco@gmail.com),
|
||||
Laurent Gomila (laurent.gom@gmail.com),
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented;
|
||||
you must not claim that you wrote the original software.
|
||||
If you use this software in a product, an acknowledgment
|
||||
in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such,
|
||||
and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
-->
|
||||
<!--
|
||||
###########################################################################
|
||||
******************************** org.sfml-dev.app template ****************
|
||||
###########################################################################
|
||||
-->
|
||||
|
||||
<!-- *** Ancestors Hierarchy *** -->
|
||||
<key>Ancestors</key>
|
||||
<array>
|
||||
<string>org.sfml-dev.AppBase</string>
|
||||
<string>com.apple.dt.unit.bundleBase</string>
|
||||
</array>
|
||||
|
||||
<!-- *** This is a Concrete Template *** -->
|
||||
<key>Concrete</key>
|
||||
<true/>
|
||||
|
||||
<!-- *** Basic Stuff *** -->
|
||||
<key>Description</key>
|
||||
<string>This template builds bundle application using SFML.</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.sfml-dev.app</string>
|
||||
<key>Kind</key>
|
||||
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
||||
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>___PACKAGENAME___-Info.plist:Basics</string>
|
||||
</array>
|
||||
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>___PACKAGENAME___-Info.plist:Basics</key>
|
||||
<string><key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
</string>
|
||||
</dict>
|
||||
|
||||
<!-- *** Project's Targets *** -->
|
||||
<key>Targets</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>ProductType</key>
|
||||
<string>com.apple.product-type.application</string>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>WRAPPER_EXTENSION</key>
|
||||
<string>app</string>
|
||||
</dict>
|
||||
<key>Configurations</key>
|
||||
<dict>
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
<key>COPY_PHASE_STRIP</key>
|
||||
<string>NO</string>
|
||||
<key>GCC_DYNAMIC_NO_PIC</key>
|
||||
<string>NO</string>
|
||||
</dict>
|
||||
<key>Release</key>
|
||||
<dict>
|
||||
<key>COPY_PHASE_STRIP</key>
|
||||
<string>YES</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>BuildPhases</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Sources</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Frameworks</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Resources</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
585
xcode/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist
vendored
Normal file
585
xcode/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist
vendored
Normal file
@ -0,0 +1,585 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!--
|
||||
SFML - Simple and Fast Multimedia Library
|
||||
Copyright (C) 2007-2011 Marco Antognini (antognini.marco@gmail.com),
|
||||
Laurent Gomila (laurent.gom@gmail.com),
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented;
|
||||
you must not claim that you wrote the original software.
|
||||
If you use this software in a product, an acknowledgment
|
||||
in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such,
|
||||
and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
-->
|
||||
<!--
|
||||
###########################################################################
|
||||
******************* org.sfml-dev.commandLineToolBase template *************
|
||||
###########################################################################
|
||||
-->
|
||||
<key>Kind</key>
|
||||
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.sfml-dev.commandLineToolBase</string>
|
||||
|
||||
<key>Ancestors</key>
|
||||
<array>
|
||||
<string>com.apple.dt.unit.macBase</string>
|
||||
</array>
|
||||
|
||||
<!-- ############################################################### Options -->
|
||||
<key>Options</key>
|
||||
<array>
|
||||
<!-- ********************************************* Window Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>windowModule</string>
|
||||
<key>Name</key>
|
||||
<string>Use window module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether window module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>WINDOW_RELEASE</key>
|
||||
<string>-lsfml-window</string>
|
||||
|
||||
<key>WINDOW_DEBUG</key>
|
||||
<string>-lsfml-window-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:window:include</key>
|
||||
<string>#include <SFML/Window.hpp></string>
|
||||
|
||||
<key>main.cpp:main:window:content</key>
|
||||
<string>sf::Window window(sf::VideoMode(800, 600), "SFML window");</string>
|
||||
|
||||
<!-- erase system/audio module content -->
|
||||
<key>main.cpp:system:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:audio_loop</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>WINDOW_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>WINDOW_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:window:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:window:content</key>
|
||||
<string></string>
|
||||
|
||||
<!-- erase main loop & display -->
|
||||
<key>main.cpp:main:event_loop</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:display</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- ******************************************* Graphics Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>graphicsModule</string>
|
||||
<key>RequiredOptions</key>
|
||||
<dict>
|
||||
<key>windowModule</key>
|
||||
<string>true</string>
|
||||
</dict>
|
||||
<key>Name</key>
|
||||
<string>Use graphics module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether graphics module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>GRAPHICS_RELEASE</key>
|
||||
<string>-lsfml-graphics</string>
|
||||
|
||||
<key>GRAPHICS_DEBUG</key>
|
||||
<string>-lsfml-graphics-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:graphics:include</key>
|
||||
<string>#include <SFML/Graphics.hpp></string>
|
||||
|
||||
<key>main.cpp:main:graphics_init_window</key>
|
||||
<string>// Create the main window
|
||||
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:image_init</key>
|
||||
<string>
|
||||
// Load a sprite to display
|
||||
sf::Image image;
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:image_finalize</key>
|
||||
<string> return EXIT_FAILURE;
|
||||
sf::Sprite sprite(image);
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:image_load</key>
|
||||
<string>if (!image.LoadFromFile("cute_image.jpg"))</string>
|
||||
|
||||
<key>main.cpp:main:text_init</key>
|
||||
<string>
|
||||
// Create a graphical text to display
|
||||
sf::Font font;
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:text_finalize</key>
|
||||
<string> return EXIT_FAILURE;
|
||||
sf::Text text("Hello SFML", font, 50);
|
||||
text.SetColor(sf::Color::Black);
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:text_load</key>
|
||||
<string>if (!font.LoadFromFile("sansation.ttf"))</string>
|
||||
|
||||
<key>main.cpp:main:graphics_display</key>
|
||||
<string>
|
||||
// Clear screen
|
||||
window.Clear();
|
||||
|
||||
// Draw the sprite
|
||||
window.Draw(sprite);
|
||||
|
||||
// Draw the string
|
||||
window.Draw(text);
|
||||
</string>
|
||||
|
||||
<!-- erase window module content -->
|
||||
<key>main.cpp:window:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:window:content</key>
|
||||
<string></string>
|
||||
|
||||
<key>sansation.ttf</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>Supporting Files</string>
|
||||
<key>Path</key>
|
||||
<string>sansation.ttf</string>
|
||||
</dict>
|
||||
|
||||
<key>cute_image.jpg</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>Supporting Files</string>
|
||||
<key>Path</key>
|
||||
<string>cute_image.jpg</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- resources -->
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>sansation.ttf</string>
|
||||
<string>cute_image.jpg</string>
|
||||
</array>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>GRAPHICS_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>GRAPHICS_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition : none -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:graphics:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:graphics_init</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:graphics_display</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:image_load</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- ********************************************** Audio Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>audioModule</string>
|
||||
<key>Name</key>
|
||||
<string>Use audio module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether audio module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>AUDIO_RELEASE</key>
|
||||
<string>-lsfml-audio</string>
|
||||
|
||||
<key>AUDIO_DEBUG</key>
|
||||
<string>-lsfml-audio-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:audio:include</key>
|
||||
<string>#include <SFML/Audio.hpp></string>
|
||||
|
||||
<key>main.cpp:main:audio:content</key>
|
||||
<string>
|
||||
// Load a music to play
|
||||
sf::Music music;
|
||||
if (!music.OpenFromFile("nice_music.ogg"))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// Play the music
|
||||
music.Play();
|
||||
</string>
|
||||
<key>nice_music.ogg</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>Supporting Files</string>
|
||||
<key>Path</key>
|
||||
<string>nice_music.ogg</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- resources -->
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>nice_music.ogg</string>
|
||||
</array>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>AUDIO_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>AUDIO_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:audio:include</key>
|
||||
<string></string>
|
||||
|
||||
<key>main.cpp:main:audio:content</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- ******************************************** Network Module -->
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>networkModule</string>
|
||||
<key>Name</key>
|
||||
<string>Use network module</string>
|
||||
<key>Description</key>
|
||||
<string>Indicates whether network module should be used or not.</string>
|
||||
<key>Type</key>
|
||||
<string>checkbox</string>
|
||||
<key>SortOrder</key>
|
||||
<integer>1</integer>
|
||||
<key>Default</key>
|
||||
<string>true</string>
|
||||
<key>Units</key>
|
||||
<dict>
|
||||
<!-- ON -->
|
||||
<key>true</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>NETWORK_RELEASE</key>
|
||||
<string>-lsfml-network</string>
|
||||
|
||||
<key>NETWORK_DEBUG</key>
|
||||
<string>-lsfml-network-d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:network:include</key>
|
||||
<string>#include <SFML/Network.hpp></string>
|
||||
|
||||
<!-- no content example for network -->
|
||||
</dict>
|
||||
</dict>
|
||||
<!-- OFF -->
|
||||
<key>false</key>
|
||||
<dict>
|
||||
<!-- compilation options -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>NETWORK_RELEASE</key>
|
||||
<string></string>
|
||||
|
||||
<key>NETWORK_DEBUG</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- content definition -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.cpp:network:include</key>
|
||||
<string></string>
|
||||
|
||||
<!-- no content example for network -->
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
|
||||
<!-- ################################################################# Nodes -->
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>main.cpp:system:include</string>
|
||||
<string>main.cpp:window:include</string>
|
||||
<string>main.cpp:graphics:include</string>
|
||||
<string>main.cpp:audio:include</string>
|
||||
<string>main.cpp:network:include</string>
|
||||
<string>main.cpp:resources_comment</string>
|
||||
<string>main.cpp:main:window:content</string>
|
||||
<string>main.cpp:main:graphics_init_window</string>
|
||||
<string>main.cpp:main:image_init</string>
|
||||
<string>main.cpp:main:image_load</string>
|
||||
<string>main.cpp:main:image_finalize</string>
|
||||
<string>main.cpp:main:text_init</string>
|
||||
<string>main.cpp:main:text_load</string>
|
||||
<string>main.cpp:main:text_finalize</string>
|
||||
<string>main.cpp:main:audio:content</string>
|
||||
<string>main.cpp:main:audio_loop</string>
|
||||
<string>main.cpp:main:event_loop</string>
|
||||
<string>main.cpp:main:graphics_display</string>
|
||||
<string>main.cpp:main:display</string>
|
||||
</array>
|
||||
|
||||
|
||||
<!-- ########################################################### Definitions -->
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<!-- main function -->
|
||||
<key>*:main</key>
|
||||
<dict>
|
||||
<key>Beginning</key>
|
||||
<string>
|
||||
int main (int argc, const char * argv[])
|
||||
{</string>
|
||||
<key>End</key>
|
||||
<string>
|
||||
return EXIT_SUCCESS;
|
||||
}</string>
|
||||
<key>Indent</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
|
||||
<key>main.cpp:system:include</key>
|
||||
<string>#include <SFML/System.hpp></string>
|
||||
|
||||
<key>main.cpp:main:event_loop</key>
|
||||
<string>
|
||||
// Start the game loop
|
||||
while (window.IsOpened())
|
||||
{
|
||||
// Process events
|
||||
sf::Event event;
|
||||
while (window.PollEvent(event))
|
||||
{
|
||||
// Close window : exit
|
||||
if (event.Type == sf::Event::Closed)
|
||||
window.Close();
|
||||
|
||||
// Escape pressed : exit
|
||||
if (event.Type == sf::Event::KeyPressed && event.Key.Code == sf::Key::Escape)
|
||||
window.Close();
|
||||
}
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:display</key>
|
||||
<string>
|
||||
// Update the window
|
||||
window.Display();
|
||||
}
|
||||
</string>
|
||||
|
||||
<key>main.cpp:resources_comment</key>
|
||||
<string>
|
||||
/* Resources :
|
||||
* ===========
|
||||
*
|
||||
* In order to load the resources like cute_image.png, you have to set up
|
||||
* your target scheme :
|
||||
*
|
||||
* - Select "Edit Scheme…" in the "Product" menu;
|
||||
* - Check the box "use custom working directory";
|
||||
* - Fill the text field with the folder path containing your resources;
|
||||
* (e.g. your project folder)
|
||||
* - Click OK.
|
||||
*/
|
||||
</string>
|
||||
|
||||
<key>main.cpp:main:audio_loop</key>
|
||||
<string>while (music.GetStatus() == sf::Music::Playing) {
|
||||
sf::Sleep(100);
|
||||
}</string>
|
||||
</dict>
|
||||
|
||||
|
||||
<!-- ###################################################### Project Settings -->
|
||||
<key>Project</key>
|
||||
<dict>
|
||||
<!-- *************************************************** Basic stuff -->
|
||||
<key>Name</key>
|
||||
<string>___PACKAGENAME___</string>
|
||||
|
||||
<!-- *********************************************** Shared Settings -->
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>PRODUCT_NAME</key>
|
||||
<string>$(TARGET_NAME)</string>
|
||||
|
||||
<key>SYSTEM_RELEASE</key>
|
||||
<string>-lsfml-system</string>
|
||||
<key>SYSTEM_DEBUG</key>
|
||||
<string>-lsfml-system-d</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
||||
</dict>
|
||||
|
||||
<key>Configurations</key>
|
||||
<dict>
|
||||
<!-- ***************************************************** Debug -->
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
<key>OTHER_LDFLAGS</key>
|
||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_DEBUG) $(WINDOW_DEBUG) $(GRAPHICS_DEBUG) $(AUDIO_DEBUG) $(NETWORK_DEBUG)</string>
|
||||
</dict>
|
||||
|
||||
|
||||
<!-- *************************************************** Release -->
|
||||
<key>Release</key>
|
||||
<dict>
|
||||
<key>OTHER_LDFLAGS</key>
|
||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_RELEASE) $(WINDOW_RELEASE) $(GRAPHICS_RELEASE) $(AUDIO_RELEASE) $(NETWORK_RELEASE)</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
BIN
xcode/SFML Command Line Tool Base.xctemplate/cute_image.jpg
vendored
Normal file
BIN
xcode/SFML Command Line Tool Base.xctemplate/cute_image.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
xcode/SFML Command Line Tool Base.xctemplate/nice_music.ogg
vendored
Normal file
BIN
xcode/SFML Command Line Tool Base.xctemplate/nice_music.ogg
vendored
Normal file
Binary file not shown.
BIN
xcode/SFML Command Line Tool Base.xctemplate/sansation.ttf
vendored
Normal file
BIN
xcode/SFML Command Line Tool Base.xctemplate/sansation.ttf
vendored
Normal file
Binary file not shown.
BIN
xcode/SFML Command Line Tool.xctemplate/TemplateIcon.icns
vendored
Normal file
BIN
xcode/SFML Command Line Tool.xctemplate/TemplateIcon.icns
vendored
Normal file
Binary file not shown.
74
xcode/SFML Command Line Tool.xctemplate/TemplateInfo.plist
vendored
Normal file
74
xcode/SFML Command Line Tool.xctemplate/TemplateInfo.plist
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!--
|
||||
SFML - Simple and Fast Multimedia Library
|
||||
Copyright (C) 2007-2011 Marco Antognini (antognini.marco@gmail.com),
|
||||
Laurent Gomila (laurent.gom@gmail.com),
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented;
|
||||
you must not claim that you wrote the original software.
|
||||
If you use this software in a product, an acknowledgment
|
||||
in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such,
|
||||
and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
-->
|
||||
<!--
|
||||
###########################################################################
|
||||
*********************** org.sfml-dev.commandLineTool template *************
|
||||
###########################################################################
|
||||
-->
|
||||
|
||||
<!-- *** Ancestors Hierarchy *** -->
|
||||
<key>Ancestors</key>
|
||||
<array>
|
||||
<string>org.sfml-dev.commandLineToolBase</string>
|
||||
<string>com.apple.dt.unit.base</string>
|
||||
</array>
|
||||
|
||||
<!-- *** This is a Concrete Template *** -->
|
||||
<key>Concrete</key>
|
||||
<true/>
|
||||
|
||||
<!-- *** Basic Stuff *** -->
|
||||
<key>Description</key>
|
||||
<string>This template builds a command-line tool using SFML.</string>
|
||||
<key>Identifier</key>
|
||||
<string>org.sfml-dev.commandLineTool</string>
|
||||
<key>Kind</key>
|
||||
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
||||
|
||||
<!-- *** Project's Targets *** -->
|
||||
<key>Targets</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
<!-- *** Basic Stuff *** -->
|
||||
<key>BuildPhases</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Sources</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Frameworks</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ProductType</key>
|
||||
<string>com.apple.product-type.tool</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
43
xcode/readme.txt
Normal file
43
xcode/readme.txt
Normal file
@ -0,0 +1,43 @@
|
||||
XCODE 4 TEMPLATES
|
||||
=================
|
||||
|
||||
These are templates to create easily a new project in Xcode 4.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* You can choose between command line tool or bundle application.
|
||||
* You can select or not each module of SFML you'll use into your project.
|
||||
* A basic example is inserted automatically into your project's code.
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
Copy the four folders into ~/Library/Developer/Xcode/Templates folder (you might need to create it first).
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
To use these templates follow these steps :
|
||||
|
||||
* open Xcode 4,
|
||||
* select «create a new Xcode project» from the «Welcome to Xcode» window or select menu File > New > New Project,
|
||||
* select «Templates» under «Mac OS X»,
|
||||
* then select either «SFML Application» or «SFML Command Line Tool»,
|
||||
* fill in the requested information and you're done.
|
||||
|
||||
Note
|
||||
----
|
||||
|
||||
If you wish to add/remove any module of SFML from your project without rebuilding a new one follow these steps :
|
||||
|
||||
* select your project from the project navigator panel (cmd+1),
|
||||
* select your project's target on the main area,
|
||||
* go to the «Build Settings» tab,
|
||||
* go down to the bottom,
|
||||
* edit any MODULEX_CONFIG variable (e.g. AUDIO_DEBUG, NETWORK_RELEASE) you want to.
|
||||
|
||||
Examples :
|
||||
|
||||
* to disable the audio module simply erase the content of AUDIO_DEBUG and AUDIO_RELEASE.
|
||||
* to add the network module set NETWORK_DEBUG to '-lsfml-network-d' and NETWORK_RELEASE to '-lsfml-network'.
|
Loading…
Reference in New Issue
Block a user