mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Update Xcode template material
This commit is contained in:
parent
ecede1119a
commit
f80f501885
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 21 KiB |
@ -10,8 +10,8 @@
|
|||||||
// computer.
|
// computer.
|
||||||
//
|
//
|
||||||
// Your resource files (images, sounds, fonts, ...) are also copied to your
|
// Your resource files (images, sounds, fonts, ...) are also copied to your
|
||||||
// application bundle. To get the path to these resource, use the helper
|
// application bundle. To get the path to these resources, use the helper
|
||||||
// method resourcePath() from ResourcePath.hpp
|
// function `resourcePath()` from ResourcePath.hpp
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <SFML/Audio.hpp>
|
#include <SFML/Audio.hpp>
|
||||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 21 KiB |
@ -16,14 +16,16 @@ You can find more resources and information on the official web site: http://www
|
|||||||
Author & License
|
Author & License
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* 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.
|
* 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.
|
||||||
* You can choose between using SFML libraries as dylibs or frameworks.
|
* You can choose between using SFML libraries as dylibs or frameworks.
|
||||||
* You can choose your compiler and C++ standard library / dialect.
|
* You can choose your compiler and C++ standard library / dialect.
|
||||||
* You can choose with SFML module you want to use into your project.
|
* You can choose with SFML module you want to use into your project.
|
||||||
@ -40,16 +42,20 @@ Before installing the template, make sure you have installed:
|
|||||||
- the Command Line Tools
|
- the Command Line Tools
|
||||||
- SFML 2, either as frameworks or dylibs
|
- SFML 2, either as frameworks or dylibs
|
||||||
|
|
||||||
There is one constraint on the installation of SFML: the frameworks needs to be installed in /Library/Frameworks and the dylibs into /usr/local/lib. You don't need both but make sure they are in the correct folder.
|
There is one constraint on the installation of SFML: the frameworks needs to be installed in
|
||||||
|
/Library/Frameworks and the dylibs into /usr/local/lib. You don't need both but make sure they are
|
||||||
|
in the correct folder.
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Install
|
Install
|
||||||
-------
|
-------
|
||||||
|
|
||||||
If you are building SFML from sources you can set CMake's INSTALL_XCODE_TEMPLATES variable to TRUE to install the templates automatically.
|
If you are building SFML from sources you can set CMake's INSTALL_XCODE_TEMPLATES variable to TRUE
|
||||||
|
to install the templates automatically.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -59,13 +65,15 @@ Usage
|
|||||||
To use these templates follow these steps:
|
To use these templates follow these steps:
|
||||||
|
|
||||||
1. open Xcode,
|
1. open Xcode,
|
||||||
2. select "create a new Xcode project" from the "Welcome to Xcode" window or select menus File > New > New Project,
|
2. select "create a new Xcode project" from the "Welcome to Xcode" window or select menus
|
||||||
|
File > New > New Project,
|
||||||
3. select "SFML" subsection under "Mac OS X" on the left,
|
3. select "SFML" subsection under "Mac OS X" on the left,
|
||||||
4. then select either "SFML App", if you want an application bundle, or "SFML CLT", if you prefer a classic Unix executable,
|
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!
|
5. fill in the requested information and you're ready to go!
|
||||||
|
|
||||||
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 you would probably want to explore their meaning.
|
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.
|
||||||
|
|
||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
@ -73,7 +81,8 @@ FAQ
|
|||||||
|
|
||||||
* I want to use Xcode 3. Can I use these templates anyway?
|
* I want to use Xcode 3. Can I use these templates anyway?
|
||||||
|
|
||||||
No, Xcode 3 and 4 don't have the same template system. Therefore these templates won't work with a older version of Xcode.
|
No, Xcode 3 and 4 don't have the same template system. Therefore these templates won't work with
|
||||||
|
a older version of Xcode.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -83,13 +92,15 @@ FAQ
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
* I would like to add/remove a module of SFML from my current project without creating a new project. How can I do that?
|
* I would like to add/remove a module of SFML from my current project without creating a new
|
||||||
|
project. How can I do that?
|
||||||
|
|
||||||
1. select your project in the project navigator panel,
|
1. select your project in the project navigator panel,
|
||||||
2. select your project's target on the main area,
|
2. select your project's target on the main area,
|
||||||
3. go to the "Build Settings" tab,
|
3. go to the "Build Settings" tab,
|
||||||
4. go down to the bottom,
|
4. go down to the bottom,
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -105,13 +116,15 @@ FAQ
|
|||||||
|
|
||||||
* How to use/don't use debug dylibs?
|
* How to use/don't use debug dylibs?
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
1. select your project from the project navigator panel,
|
1. select your project from the project navigator panel,
|
||||||
2. select your project's target on the main area,
|
2. select your project's target on the main area,
|
||||||
3. go to the "Build Settings" tab,
|
3. go to the "Build Settings" tab,
|
||||||
4. go down to the bottom,
|
4. go down to the bottom,
|
||||||
5. set SFML_LINK_DYLIBS_SUFFIX to "-d" to use them or to "" (empty string) to use only release binaries.
|
5. set SFML_LINK_DYLIBS_SUFFIX to "-d" to use them or to "" (empty string) to use only
|
||||||
|
release binaries.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -119,14 +132,22 @@ FAQ
|
|||||||
|
|
||||||
Short answer: Don't do that!
|
Short answer: Don't do that!
|
||||||
|
|
||||||
We strongly recommend you to use either dylibs or frameworks on Mac OS X. Please refer to Apple documentation for information about static vs shared libraries debate.
|
We strongly recommend you to use either dylibs or frameworks on Mac OS X. Please refer to Apple
|
||||||
|
documentation for information about static vs shared libraries debate.
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* I get strange linker error about std::string and other STL types. What shall I do?
|
* I get strange linker error about std::string and other STL types. What should I do?
|
||||||
|
|
||||||
This probably means you're compiling your project against a different implementation of the STL than SFML. When you created the project, you might have chosen the wrong C++ compiler & standard library. You can update your project's build settings; more specifically the Compiler for C/C++/Objective-C, the C++ language Dialect and the C++ Standard Library. You can find more information in the getting started tutorial for Mac OS X on the official web site.
|
This probably means you're compiling your project against a different implementation of the STL
|
||||||
|
than SFML. When you created the project, you might have chosen the wrong C++ compiler & standard
|
||||||
|
library. You can update your project's build settings; more specifically the Compiler for
|
||||||
|
C/C++/Objective-C, the C++ language Dialect and the C++ Standard Library. You can find more
|
||||||
|
information in the getting started tutorial for Mac OS X on the official web site.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user