then the user would get a one-click install via software update. It's quick and painlessYes, that's why I'm not 100% sure I'll make a package for freetype.
Also, vanilla SFML 2 works just fine on 10.8Good to hear! :)
* freetype 2.4.9
* CVE-2012-1126
* CVE-2012-1127
* CVE-2012-1128
* CVE-2012-1129
* CVE-2012-1130
* CVE-2012-1131
* CVE-2012-1132
* CVE-2012-1133
* CVE-2012-1134
* CVE-2012-1135
* CVE-2012-1136
* CVE-2012-1137
* CVE-2012-1138
* CVE-2012-1139
* CVE-2012-1140
* CVE-2012-1141
* CVE-2012-1142
* CVE-2012-1143
* CVE-2012-1144
When you attempt to run an SFML 2.0 app, you are indeed presented with an option to install XQuartz.Great!
Would it be possible to ship freetype with SFML so the user doesn't have to download XQuartz to run it? XQuartz includes a lot, but SFML only needs freetype, right?Yes, SFML only need freetype from X11/XQuartz. However, I prefer not providing this extra framework because then I should keep SFML version of freetype up-to-date which is already done by XQuartz. So in this mindset I rather prefer "forcing" SFML developer to install XQuartz on their own so they can put freetype in their .app.
When you attempt to run an SFML 2.0 app, you are indeed presented with an option to install XQuartz.Great!
Is the user still prompted to install XQuartz if you copied freetype library to your application bundle ? (If you don't have time to test this I'll test it later when 10.8 is officially released.)
Yes, but you don't actually need to build SFML to use it. Just download the last release from the website. ;)Oh I wasn't aware that there are prebuilt frameworks already :D
/Users/test/Library/Developer/Xcode/DerivedData/test-evmgfzadndoehnbskpupqrhdfnbb/Build/Products/Debug/test.app/Contents/MacOS/test requires X11, launching com.apple.X11redirect.
otool -L /Users/test/Library/Developer/Xcode/DerivedData/test-evmgfzadndoehnbskpupqrhdfnbb/Build/Products/Debug/test.app/Contents/MacOS/test
gives you ?
What doesCode: [Select]otool -L /Users/test/Library/Developer/Xcode/DerivedData/test-evmgfzadndoehnbskpupqrhdfnbb/Build/Products/Debug/test.app/Contents/MacOS/test
gives you ?
As for running apps.. I've created an empty sfml project from the supplied templates and for me it doesn't work. I had to throw out all references to sfml libs and add the frameworks for it to compile. I've also added freetype (the version that ships with 10.8 ) to the project but it still keeps asking to install XQuartz when running the app. Not sure what's going on there :o
Console.app shows the following output:Quote/Users/test/Library/Developer/Xcode/DerivedData/test-evmgfzadndoehnbskpupqrhdfnbb/Build/Products/Debug/test.app/Contents/MacOS/test requires X11, launching com.apple.X11redirect.
/usr/X11/lib/libfreetype.6.dylib (compatibility version 14.0.0, current version 14.2.0)
Which is most probably why the OS tells you to install XQuartz. What you have to do is copying the freetype dylib, changing its install name so that it's relative to the application, and relink you application against the modified freetype dylib.
To change the install name, you can use the install_name_tool command in Terminal.
ls
should give this:Resources Versions sfml-graphics
otool -L sfml-graphics
should give this:sfml-graphics:
@executable_path/../Frameworks/sfml-graphics.framework/Versions/2.0.0/sfml-graphics (compatibility version 2.0.0, current version 2.0.0)
@executable_path/../Frameworks/sfml-window.framework/Versions/2.0.0/sfml-window (compatibility version 2.0.0, current version 2.0.0)
@executable_path/../Frameworks/sfml-system.framework/Versions/2.0.0/sfml-system (compatibility version 2.0.0, current version 2.0.0)
/usr/X11/lib/libfreetype.6.dylib (compatibility version 14.0.0, current version 14.2.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.25.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1138.47.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
install_name_tool -change /usr/X11/lib/libfreetype.6.dylib @executable_path/../Frameworks/libfreetype.dylib sfml-graphics
andotool -L sfml-graphics
should now givesfml-graphics:
@executable_path/../Frameworks/sfml-graphics.framework/Versions/2.0.0/sfml-graphics (compatibility version 2.0.0, current version 2.0.0)
@executable_path/../Frameworks/sfml-window.framework/Versions/2.0.0/sfml-window (compatibility version 2.0.0, current version 2.0.0)
@executable_path/../Frameworks/sfml-system.framework/Versions/2.0.0/sfml-system (compatibility version 2.0.0, current version 2.0.0)
@executable_path/../Frameworks/libfreetype.dylib (compatibility version 14.0.0, current version 14.2.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.25.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1138.47.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)