Fixed Xcode templates script
This commit is contained in:
parent
e7284cd665
commit
396f675ca2
@ -715,39 +715,41 @@ while (window.isOpen())
|
|||||||
# If you're using static libraries (which is not recommended) you should remove this script from your project.
|
# 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 framework or dylibs ?
|
||||||
if [ $SFML_LINK_PREFIX = $SFML_LINK_FRAMEWORKS_PREFIX ]
|
case "$SFML_BINARY_TYPE" in
|
||||||
then
|
DYLIBS)
|
||||||
frameworks=1
|
frameworks="false"
|
||||||
else
|
;;
|
||||||
frameworks=0
|
*)
|
||||||
fi
|
frameworks="true"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
require () # $1 is a SFML module like 'system' or 'audio'
|
require () # $1 is a SFML module like 'system' or 'audio'
|
||||||
{
|
{
|
||||||
dest=$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/Contents/Frameworks
|
dest="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/Contents/Frameworks"
|
||||||
|
|
||||||
if [ -z $1 ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
echo "no parameter! ERROR!"
|
echo "no parameter! ERROR!"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
# clean potentially old stuff
|
# clean potentially old stuff
|
||||||
rm -f $dest/libsfml-$1.2.dylib
|
rm -f "$dest/libsfml-$1.2.dylib"
|
||||||
rm -f $dest/libsfml-$1-d.2.dylib
|
rm -f "$dest/libsfml-$1-d.2.dylib"
|
||||||
rm -fr $dest/sfml-$1.framework
|
rm -fr "$dest/sfml-$1.framework"
|
||||||
|
|
||||||
# copy SFML libraries
|
# copy SFML libraries
|
||||||
if [ $frameworks ]
|
if [ "$frameworks" = "true" ]
|
||||||
then
|
then
|
||||||
ditto "/Library/Frameworks/sfml-$1.framework" "$dest/sfml-$1.framework"
|
ditto "/Library/Frameworks/sfml-$1.framework" "$dest/sfml-$1.framework"
|
||||||
elif [ $CONFIGURATION = "Debug" ]
|
elif [ $CONFIGURATION = "Debug" ] && [ $SFML_LINK_DYLIBS_SUFFIX_DEBUG != "" ]
|
||||||
then
|
then
|
||||||
ditto "/usr/local/lib/libsfml-$1-d.2.dylib" "$dest/libsfml-$1-d.2.dylib"
|
ditto "/usr/local/lib/libsfml-$1-d.2.dylib" "$dest/libsfml-$1-d.2.dylib"
|
||||||
else
|
else
|
||||||
ditto "/usr/local/lib/libsfml-$1.2.dylib" "$dest/libsfml-$1.2.dylib"
|
ditto "/usr/local/lib/libsfml-$1.2.dylib" "$dest/libsfml-$1.2.dylib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $1 = "audio" ]
|
if [ "$1" = "audio" ]
|
||||||
then
|
then
|
||||||
# copy sndfile framework too
|
# copy sndfile framework too
|
||||||
ditto "/Library/Frameworks/sndfile.framework" "$dest/sndfile.framework"
|
ditto "/Library/Frameworks/sndfile.framework" "$dest/sndfile.framework"
|
||||||
@ -779,6 +781,7 @@ if [ -n "$SFML_GRAPHICS" ]
|
|||||||
then
|
then
|
||||||
require "graphics"
|
require "graphics"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<key>RunOnlyForDeploymentPostprocessing</key>
|
<key>RunOnlyForDeploymentPostprocessing</key>
|
||||||
|
Loading…
Reference in New Issue
Block a user