2011-05-29 23:23:16 +08:00
|
|
|
|
2014-12-06 21:41:09 +08:00
|
|
|
XCODE TEMPLATES FOR SFML 2
|
|
|
|
==========================
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2014-12-06 21:41:09 +08:00
|
|
|
These templates help you to easily create a new SFML 2 project for Xcode 4 or greater.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Web Site
|
|
|
|
--------
|
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
You can find more resources and information on the official web site: http://www.sfml-dev.org/
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-13 04:40:52 +08:00
|
|
|
Authors & Licenses
|
2012-12-30 05:08:19 +08:00
|
|
|
----------------
|
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
The templates were written by Marco Antognini <antognini.marco@gmail.com> and are provided under
|
|
|
|
the terms of the zlib/png license: http://opensource.org/licenses/zlib-license.php
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2020-12-13 04:40:52 +08:00
|
|
|
The assets including doodle_pop.ogg and background.jpg are public domain. More information
|
|
|
|
can be found in the examples/ folder.
|
2011-05-29 23:23:16 +08:00
|
|
|
|
|
|
|
Features
|
|
|
|
--------
|
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
* You can choose between command line tool or bundle application, the latter will contains all
|
|
|
|
SFML dependencies so you can run your app on another computer without manually installing SFML.
|
2011-08-20 18:19:00 +08:00
|
|
|
* You can choose between using SFML libraries as dylibs or frameworks.
|
2012-12-30 05:08:19 +08:00
|
|
|
* You can choose with SFML module you want to use into your project.
|
|
|
|
* You automatically get a basic example to test SFML right away.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
-------------
|
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
Before installing the template, make sure you have installed:
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2018-03-12 14:32:51 +08:00
|
|
|
- Xcode 4 or greater, up to date;
|
|
|
|
- the Command Line Tools;
|
|
|
|
- SFML 2, either as frameworks or dylibs, as described in the official tutorials.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
You should also be familiar with Xcode. If needed checkout this document:
|
|
|
|
http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/000-About_Xcode/about.html
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
2011-05-29 23:23:16 +08:00
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
If you are building SFML from sources you can set CMake's INSTALL_XCODE_TEMPLATES variable to TRUE
|
|
|
|
to install the templates automatically.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
2011-05-29 23:23:16 +08:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2014-09-30 22:07:25 +08:00
|
|
|
To use these templates follow these steps:
|
2011-05-29 23:23:16 +08:00
|
|
|
|
2014-04-21 04:07:16 +08:00
|
|
|
1. open Xcode,
|
2015-09-26 01:01:55 +08:00
|
|
|
2. select "create a new Xcode project" from the "Welcome to Xcode" window or select menus
|
|
|
|
File > New > New Project,
|
2012-12-30 05:08:19 +08:00
|
|
|
3. select "SFML" subsection under "Mac OS X" on the left,
|
2015-09-26 01:01:55 +08:00
|
|
|
4. then select either "SFML App", if you want an application bundle, or "SFML CLT", if you
|
|
|
|
prefer a classic Unix executable,
|
|
|
|
5. fill in the requested information and you're ready to go!
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
Note: some settings are marked as "[ADVANCED]" in the wizard. If you're not sure what they are,
|
|
|
|
simply keep the default settings. If you get errors later, explore the FAQ below.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2011-05-29 23:23:16 +08:00
|
|
|
|
2014-04-16 00:44:55 +08:00
|
|
|
FAQ
|
|
|
|
---
|
2011-05-29 23:23:16 +08:00
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
* I want to use Xcode 3. Can I use these templates anyway?
|
2011-05-29 23:23:16 +08:00
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
No, Xcode 3 and 4 don't have the same template system. Therefore these templates won't work with
|
|
|
|
a older version of Xcode.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
* I'm still using SFML 1.6. Can I use these templates anyway?
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
No, these templates were made for SFML 2 only.
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
* I would like to add/remove a module of SFML from my current project without creating a new
|
|
|
|
project. How can I do that?
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
1. select your project in the project navigator panel,
|
2011-08-20 18:19:00 +08:00
|
|
|
2. select your project's target on the main area,
|
|
|
|
3. go to the "Build Settings" tab,
|
|
|
|
4. go down to the bottom,
|
2015-09-26 01:01:55 +08:00
|
|
|
5. set SFML_XXX variable, where XXX is the name of the module to add/remove, to
|
|
|
|
"$(SFML_LINK_PREFIX) sfml-XXX$(SFML_LINK_SUFFIX)" to add it or to "" (nothing) to remove it.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2011-05-29 23:23:16 +08:00
|
|
|
|
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
* I changed my mind and would like to switch from dylibs to frameworks or vice versa. How can I do that?
|
2011-08-20 18:19:00 +08:00
|
|
|
|
2012-12-30 05:08:19 +08:00
|
|
|
1. select your project in the project navigator panel,
|
2011-08-20 18:19:00 +08:00
|
|
|
2. select your project's target on the main area,
|
|
|
|
3. go to the "Build Settings" tab,
|
|
|
|
4. go down to the bottom,
|
2012-12-30 05:08:19 +08:00
|
|
|
5. set SFML_BINARY_TYPE to either "DYLIBS" or "FRAMEWORKS".
|
|
|
|
|
2012-07-09 01:21:15 +08:00
|
|
|
|
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
* How to use/don't use debug dylibs?
|
2012-07-09 01:21:15 +08:00
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
You can choose to use or not SFML debug binaries when creating a new project. However, if you
|
|
|
|
have already created your project you can do the following:
|
2012-07-09 01:21:15 +08:00
|
|
|
|
|
|
|
1. select your project from the project navigator panel,
|
|
|
|
2. select your project's target on the main area,
|
|
|
|
3. go to the "Build Settings" tab,
|
|
|
|
4. go down to the bottom,
|
2015-09-26 01:01:55 +08:00
|
|
|
5. set SFML_LINK_DYLIBS_SUFFIX to "-d" to use them or to "" (empty string) to use only
|
|
|
|
release binaries.
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2011-08-20 18:19:00 +08:00
|
|
|
|
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
* I want to use the static version of SFML. Is it possible?
|
2011-08-20 18:19:00 +08:00
|
|
|
|
2013-10-05 02:57:42 +08:00
|
|
|
Short answer: Don't do that!
|
2011-08-20 18:19:00 +08:00
|
|
|
|
2023-02-12 12:49:05 +08:00
|
|
|
We strongly recommend you to use either dylibs or frameworks on macOS. Please refer to Apple
|
2015-09-26 01:01:55 +08:00
|
|
|
documentation for information about static vs shared libraries debate.
|
2011-08-20 18:19:00 +08:00
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
If you really need/want to use static libraries proceed as follow. First, set your project to
|
|
|
|
use dylibs (see above Q & A). Then set SFML_LINK_DYLIBS_SUFFIX to "-s-d" in debug mode and to
|
|
|
|
"-s" in release mode. Finally, remove the script automatically generated by the template (see
|
|
|
|
Build Phases tab).
|
2012-12-30 05:08:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-26 01:01:55 +08:00
|
|
|
* I get strange linker error about std::string and other STL types. What should I do?
|
2012-12-30 05:08:19 +08:00
|
|
|
|
2018-03-12 14:32:51 +08:00
|
|
|
This probably means you're compiling your project against a different
|
|
|
|
implementation of the STL than the one used by SFML. You can update your
|
|
|
|
project build settings to match the settings used to compile SFML; more
|
|
|
|
specifically the Compiler for C/C++/Objective-C, the C++ language Dialect
|
|
|
|
and the C++ Standard Library.
|