diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist b/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist index 72305819b..94bedd789 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/TemplateInfo.plist @@ -25,7 +25,7 @@ subject to the following restrictions: --> @@ -142,10 +142,10 @@ subject to the following restrictions: /bin/sh ShellScript - # This shell script simply copies required sfml dylibs/frameworks into the application bundle frameworks folder. + # This shell script simply copies required SFML dylibs/frameworks into the application bundle frameworks folder. # If you're using static libraries (which is not recommended) you should remove this script from your project. -# Are we building a project that uses framework or dylibs ? +# Are we building a project that uses frameworks or dylibs? case "$SFML_BINARY_TYPE" in DYLIBS) frameworks="false" @@ -176,12 +176,12 @@ assert () # $1 is a boolean, $2...N is an error message fi } -force_remove () # $1 is a path +force_remove () # $@ is some paths { - test $# -eq 1 - assert $? "force_remove() requires one parameter" - rm -fr "$1" - assert $? "couldn't remove $1" + test $# -ge 1 + assert $? "force_remove() requires at least one parameter" + rm -fr $@ + assert $? "couldn't remove $@" } copy () # $1 is a source, $2 is a destination @@ -201,28 +201,31 @@ require () # $1 is a SFML module like 'system' or 'audio' error "require() requires one parameter!" else # clean potentially old stuff - force_remove "$dest/libsfml-$1.2.dylib" - force_remove "$dest/libsfml-$1-d.2.dylib" + force_remove "$dest/libsfml-$1"* force_remove "$dest/sfml-$1.framework" # copy SFML libraries if [ "$frameworks" = "true" ] then - copy "/Library/Frameworks/sfml-$1.framework" "$dest/sfml-$1.framework" + source="/Library/Frameworks/sfml-$1.framework" + target="sfml-$1.framework" elif [ "$SFML_LINK_DYLIBS_SUFFIX" = "-d" ] then - copy "/usr/local/lib/libsfml-$1-d.2.dylib" "$dest/libsfml-$1-d.2.dylib" + source="/usr/local/lib/libsfml-$1-d.dylib" + target="`readlink $source`" else - copy "/usr/local/lib/libsfml-$1.2.dylib" "$dest/libsfml-$1.2.dylib" + source="/usr/local/lib/libsfml-$1.dylib" + target="`readlink $source`" fi + copy "$source" "$dest/$target" + + # copy extra dependencies if [ "$1" = "audio" ] then # copy sndfile framework too copy "/Library/Frameworks/sndfile.framework" "$dest/sndfile.framework" - fi - - if [ "$1" = "graphics" ] + elif [ "$1" = "graphics" ] then # copy freetype framework too copy "/Library/Frameworks/freetype.framework" "$dest/freetype.framework" diff --git a/tools/xcode/templates/SFML/SFML CLT.xctemplate/TemplateInfo.plist b/tools/xcode/templates/SFML/SFML CLT.xctemplate/TemplateInfo.plist index 7e224b3d1..e1d1b4ca5 100644 --- a/tools/xcode/templates/SFML/SFML CLT.xctemplate/TemplateInfo.plist +++ b/tools/xcode/templates/SFML/SFML CLT.xctemplate/TemplateInfo.plist @@ -25,7 +25,7 @@ subject to the following restrictions: --> diff --git a/tools/xcode/templates/readme.txt b/tools/xcode/templates/readme.txt index 981121ce3..4579ce131 100644 --- a/tools/xcode/templates/readme.txt +++ b/tools/xcode/templates/readme.txt @@ -1,8 +1,8 @@ -XCODE 4 & 5 TEMPLATES FOR SFML 2 -================================ +XCODE TEMPLATES FOR SFML 2 +========================== -These templates help you to easily create a new SFML 2 project for Xcode 4 or Xcode 5. +These templates help you to easily create a new SFML 2 project for Xcode 4 or greater. @@ -36,9 +36,9 @@ Prerequisites Before installing the template, make sure you have installed: - - Xcode 4 or Xcode 5, up to date - - Installed Xcode's Command Line Tools - - SFML 2, either framework or dylib binaries + - Xcode 4 or greater, up to date + - the Command Line Tools + - 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.