diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake
index 482b9dcb..d94f4b07 100644
--- a/cmake/Macros.cmake
+++ b/cmake/Macros.cmake
@@ -142,7 +142,13 @@ macro(sfml_add_library target)
if(THIS_EXTERNAL_LIBS)
if(BUILD_SHARED_LIBS)
# in shared build, we use the regular linker commands
- target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
+ target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
+
+ if (MACOSX)
+ set_target_properties(${target} PROPERTIES
+ BUILD_WITH_INSTALL_RPATH 1
+ INSTALL_NAME_DIR "@executable_path/../Frameworks")
+ endif()
else()
# in static build there's no link stage, but with some compilers it is possible to force
# the generated static library to directly contain the symbols from its dependencies
diff --git a/extlibs/libs-osx/Frameworks/sndfile.framework/Versions/A/sndfile b/extlibs/libs-osx/Frameworks/sndfile.framework/Versions/A/sndfile
index 8511f6c2..97defcc6 100755
Binary files a/extlibs/libs-osx/Frameworks/sndfile.framework/Versions/A/sndfile and b/extlibs/libs-osx/Frameworks/sndfile.framework/Versions/A/sndfile differ
diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt
index edddc457..09daa851 100644
--- a/src/SFML/Graphics/CMakeLists.txt
+++ b/src/SFML/Graphics/CMakeLists.txt
@@ -83,7 +83,7 @@ if(BUILD_SHARED_LIBS)
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${X11_LIBRARIES})
elseif(MACOSX)
# We use static version of freetype so we need to link against zlib.
- set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES} "-framework AGL")
+ set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES})
endif()
endif()
diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/OSX/SFWindowController.mm
index 2e3bac84..d1a916c6 100644
--- a/src/SFML/Window/OSX/SFWindowController.mm
+++ b/src/SFML/Window/OSX/SFWindowController.mm
@@ -236,6 +236,7 @@
-(void)dealloc
{
[self closeWindow];
+ [NSMenu setMenuBarVisible:YES];
[myWindow release];
[myOGLView release];
diff --git a/xcode/templates/SFML Application Base.xctemplate/TemplateInfo.plist b/xcode/templates/SFML Application Base.xctemplate/TemplateInfo.plist
index 0937a42b..c6bfcd29 100644
--- a/xcode/templates/SFML Application Base.xctemplate/TemplateInfo.plist
+++ b/xcode/templates/SFML Application Base.xctemplate/TemplateInfo.plist
@@ -179,16 +179,16 @@ sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
main.cpp:main:image_init
// Load a sprite to display
-sf::Image image;
+sf::Texture texture;
main.cpp:main:image_finalize
return EXIT_FAILURE;
-sf::Sprite sprite(image);
+sf::Sprite sprite(texture);
main.cpp:main:image_load
- if (!image.LoadFromFile(ResourcePath() + "cute_image.jpg"))
+ if (!texture.LoadFromFile(ResourcePath() + "cute_image.jpg"))
main.cpp:main:text_init
@@ -227,7 +227,7 @@ text.SetColor(sf::Color::Black);
sansation.ttf
Group
- Supporting Files
+ Resources
Path
sansation.ttf
@@ -235,7 +235,7 @@ text.SetColor(sf::Color::Black);
cute_image.jpg
Group
- Supporting Files
+ Resources
Path
cute_image.jpg
@@ -334,7 +334,7 @@ music.Play();
nice_music.ogg
Group
- Supporting Files
+ Resources
Path
nice_music.ogg
@@ -370,6 +370,9 @@ music.Play();
main.cpp:main:audio:content
+
+ main.cpp:main:audio_loop
+
@@ -501,8 +504,9 @@ int main (int argc, const char * argv[])
Path
ResourcePath.hpp
+ TargetIndices
+
-
main.cpp:system:include
#include <SFML/System.hpp>
@@ -591,6 +595,68 @@ while (window.IsOpened())
Foundation
+
+ BuildPhases
+
+
+ Class
+ ShellScript
+
+ ShellPath
+ /bin/sh
+
+ ShellScript
+ # This shell script simply copies required sfml dylibs into the application bundle frameworks folder
+# NB : this script assumes that if moduleX is required in release mode then it is also required in debug mode.
+
+require () # $1 is a SFML module like 'system' or 'audio'
+{
+ if [ -z $1 ]
+ then
+ echo "no parameter! ERROR!"
+ exit
+ else
+ if [ $CONFIGURATION = "Debug" ]
+ then
+ rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1.2.dylib
+ ditto /usr/local/lib/libsfml-$1-d.2.dylib $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1-d.2.dylib
+ else
+ rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1-d.2.dylib
+ ditto /usr/local/lib/libsfml-$1.2.dylib $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1.2.dylib
+ fi
+ fi
+}
+
+if [ -n "$SYSTEM_RELEASE" ]
+then
+ require "system"
+fi
+
+if [ -n "$AUDIO_RELEASE" ]
+then
+ require "audio"
+fi
+
+if [ -n "$NETWORK_RELEASE" ]
+then
+ require "network"
+fi
+
+if [ -n "$WINDOW_RELEASE" ]
+then
+ require "window"
+fi
+
+if [ -n "$GRAPHICS_RELEASE" ]
+then
+ require "graphics"
+fi
+
+
+ RunOnlyForDeploymentPostprocessing
+ NO
+
+
diff --git a/xcode/templates/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist b/xcode/templates/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist
index 6c1ac446..428e6d18 100644
--- a/xcode/templates/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist
+++ b/xcode/templates/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist
@@ -179,16 +179,16 @@ sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
main.cpp:main:image_init
// Load a sprite to display
-sf::Image image;
+sf::Texture texture;
main.cpp:main:image_finalize
return EXIT_FAILURE;
-sf::Sprite sprite(image);
+sf::Sprite sprite(texture);
main.cpp:main:image_load
- if (!image.LoadFromFile("cute_image.jpg"))
+ if (!texture.LoadFromFile("cute_image.jpg"))
main.cpp:main:text_init