Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Sonkun

Pages: 1 2 [3] 4 5 ... 12
General discussions / Re: Android and iOS ports available for testing
« on: November 30, 2013, 10:34:48 pm »
For now, you're forced to have your application library named "sfml-example" (libsfml-example.so) because the SFML Activity (libsfml-activity.so) that comes along when you compile SFML doesn't take the customized application name into account.

In the meantime, you can either modify Main/SFMLActivity.cpp line 145 or fix it :D

Good luck!

General discussions / Re: Android and iOS ports available for testing
« on: November 30, 2013, 05:03:19 pm »
added native support

You don't need to right-click on the project then "Add native support...". I'll explain how it works internally later.

P.S. I compile it again to exclude a mistake in the setup
Does that mean it works now? :D

General discussions / Re: Android and iOS ports available for testing
« on: November 29, 2013, 06:18:00 pm »
It seems that NDK version r9b has been released in the meantime. I use version r9 so try to downgrade, even if it's unlikely to be because of this new version.

export ANDROID_NDK=/path/to/ndk
cd SFML/
mkdir build && cd build
cmake -CMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android.toolchain.cmake -DANDROID_USE_STLPORT=1 ..
make -j8

General discussions / Re: Android and iOS ports available for testing
« on: November 29, 2013, 04:42:45 pm »

For those who aren’t familiar with git, once the SFML repo freshly cloned, type: git checkout –b ios_and_android origin/ios_and_android to get the right branch.

How to compile the Android port?

To compile the Android port, you must use CMake with the toolchain configuration script located at cmake/toolchains/android.toolchain.cmake. To do that, define the CMAKE_TOOLCHAIN_FILE variable when invoking CMake and make it point to the android.toolchain.cmake script. You’ll also need to define an environments variable ANDROID_NDK telling where the NDK directory is. There are a few options available to customize the build process:

ANDROID_ABI : armeabi, armeabi-v7a, x86, mips
ANDROID_NATIVE_API_LEVEL:  9, 14, 18, etc.
ANDROID_USE_STLPORT: Make sure this one is set at TRUE because I’m not sure if it’s set automatically. Usage of the STL port is MANDATORY. If you don’t use it, no error will be reported and your application will just.. crash :)

Once compiled, type "make install" to install everything in your NDK directory.

Getting familiar with the compilation process of native Android application isn’t an easy task so, don’t give up and read carefully the NDK documentation. Maybe you should start with compiling an official example such as NativeActivty located in your NDK. You’ll need to get through this because you won’t be able to reuse this CMake toolchain script to compile your own application (unless your application is a library :D).

There’s an example available in the SFML source files directory. I advise you to “create a project from existing source” from the Android IDE (Eclipse). Once the example imported and set up, you can’t simply press the “Run” button, you’ll need to compile the example project first. To do that, open a console, head to the example directory and invoke the ndk-build script located in your NDK:  your command might look like this: $ANDROID_NDK/ndk-build

Things to know for Android

On Android, the working directory is automatically set to the resources directory (assets/).

sf::SoundRecorder won’t record any sounds.

Since recently I no longer get the orchestral.ogg song to play with sf::Music ... but canary.wav does work.

The implementation is compatible with Android 9 or later.

You may have to install some 32bits libs on Linux. I can’t tell which exactly but on Fedora 64bits, type the following: sudo yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686. If someone could give the list for Debian based distribution, it would great!

How to compile the OpenGL ES port for Linux?

Unfortunately, this isn’t available yet because I need to refactor the EGL code to avoid duplication, as well as time to test the new CMake scripts on a Raspberry Pi. I’ll implement this really soon.


I really am busy right now and I won't be able to provide much support until 8th of December.

Python / Re: Question about the Python binding
« on: November 09, 2013, 07:58:26 am »

Why are people so obsessed about performances :p You won't notice any difference. Just expect your program to run slightly slower but that's just because Python is interpreted while C++ is compiled. If you write stuff that takes time to compute, it will likely  run slow in both C++ and Python because SFML just sends stuff to the GPU which executes its tasks independently of the languages you use.

The official Python installers install a Python version compiled with these compilers so we need to use the same one. It's advised.. or you may encounter mysterious bugs/crashes.

Good luck :)

Python / Re: [Solved] How to install ubuntu 12.04 on PySFML (Python3.3.2)
« on: November 04, 2013, 10:10:58 am »
Since he has posted several time on the French forum regarding bugs in his code, I guess he has pySFML working now :p

I marked this thread as solved.

Python / Re: [Solved] Somes problems with sf.Event
« on: November 04, 2013, 10:05:21 am »
This bug has been fixed in commit 19c077c

Python / Re: Script crashes on exit (sf.RenderWindow, sf.Texture)
« on: November 03, 2013, 10:31:50 pm »
I just tried your scripts on Windows 7 x64 (fresh install), using Python3.3 and the available installer on python-sfml.org and they run well, no errors. :/

I can't help you unless you tell me more about how to reproduce this bug.

Python / Re: [Solved] Exceptions not propagated
« on: November 03, 2013, 09:50:23 pm »
This is fixed: 0805d64

Thank you!

Python / Re: python-sfml strange behaviour
« on: November 03, 2013, 05:52:08 pm »
Thanks for reporting this bug. :) I forgot to propagate the exception in src/sfml/DerivableDrawable.cpp. I'll send a fix.

Python / Re: Script crashes on exit (sf.RenderWindow, sf.Texture)
« on: November 03, 2013, 05:24:56 pm »
I can't reproduce this bug with the development version using Python 3.3 & SFML 2.1 on Linux. What pySFML version do you use ? Note that I rewrote the (de)allocation mechanism (19c077c) for pySFML 1.4 thus maybe it's fixed now.

Thanks for reporting. :)

Python / Re: PySFML and PyPy
« on: September 02, 2013, 07:21:12 pm »
You're the first person who reports an installation failure for Win32 platforms. Did you download the right executable, make sure it matches your architecture (32, 64 bits) and the Python version (2.7, 3.2, 3.3). You don't need anything else.

General / Re: FindSFML.cmake update suggestion
« on: August 26, 2013, 10:19:06 am »
Ok, I could reproduce this problem and I solved it with your changes, but I could also reinstall CSFML 2.0 which relies on FindSFML.cmake (unmodified) without any problem. :/

I compared the usage of find_library() in several FindXXX.cmake scrips found in /usr/share/cmake/Modules/* and this seems not to be a common practice. So I guess it should be okay without these extra lines.

Anyway, I need to figure that out, and thank you for reporting it! :)

Python / Re: installing python-sfml on osx 10.8
« on: August 26, 2013, 09:59:03 am »
pySFML v1.3 is based on SFML 2.0 :)

General / Re: FindSFML.cmake update suggestion
« on: August 25, 2013, 05:30:26 pm »
The @, *, and / are all standard *nix stuff when you ask for a directory listing with ls -CF.
Alright, I didn't know that but if you use a regular ls, *.so files will show up, so they do exist. And I had no problem using FindSFML.cmake to compile CSFML  so I guess you set up something wrong.

The only mistake is CMake which doesn't install SFML libraries in the right directory on x64 systems. So, on Fedora x86_64, there's an extra step:
cd SFML-2.1
sudo make install
sudo mv /usr/local/lib/libsfml-* /usr/local/lib64
sudo ldconfig

Pages: 1 2 [3] 4 5 ... 12