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

Author Topic: Android and iOS ports available for testing  (Read 331387 times)

0 Members and 1 Guest are viewing this topic.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #225 on: June 08, 2014, 12:57:15 pm »
Hah! Got it working again (and this time my source and build directories for OpenAL are in a clean and tidy state; I've somehow had quite a mess before). :)

I only had to perform one tiny adjustment:

  • Clone the official(?) OpenAL-soft repository from git://repo.or.cz/openal-soft.git (just the master branch is enough).
  • Open the CMakeLists.txt file and comment out line 1022:
Code: [Select]
#SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION})
  • Create a build directory for each architecture and use SFML master's toolchain file with CMake to create makefiles. (I commented out the toolchain warnings to speed things up.)
  • Everything should build out of the box and create the library files in libs/<architecture>. The common.a libs can be ignored.
  • Do not use make install, copy the static libraries by hand.
« Last Edit: June 08, 2014, 01:01:07 pm by Mario »

arbitergoten

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Android and iOS ports available for testing
« Reply #226 on: June 15, 2014, 10:34:03 pm »
when I call ndk-build on the sfml android example i get this error

Android NDK: WARNING: APP_PLATFORM android-17 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml   
Android NDK: jni/Android.mk: Cannot find module with tag 'sfml' in import path   
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?   
Android NDK: The following directories were searched:   
Android NDK:         
jni/Android.mk:18: *** Android NDK: Aborting.    .  Stop.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #227 on: June 15, 2014, 10:39:07 pm »
Sounds like "make install" for SFML somehow failed. Do you have the directory [ndk]/sources/sfml?

arbitergoten

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Android and iOS ports available for testing
« Reply #228 on: June 16, 2014, 11:24:05 am »
no I don't  have [ndk]/sources/sfml

this is how my cmake-gui looks like

source code: /home/heresh/Downloads/SFML-master/

where to build: /home/heresh/Documents/sfml-build


BUILD_SHARED_LIBS =  TRUE
CMAKE_BUILD_TYPE  = Release
CMAKE_INSTALL_PREFIX = /usr/local
GLEW_INSTALL_PATH = /usr/include
GLEW_LIBRARY  = /usr/lib/i386-linux-gnu/libGLEW.so
SFML_BUILD_DOC      =    TRUE
SFML_BUILD_EXAMPLES       =   TRUE
SFML_INSTALL_PKGCONFIG_FILES    =   TRUE
SFML_OPENGL_ES    =    TRUE
UDEV_INCLUDE_DIR  =  /usr/include
UDEV_LIBRARIES  = /usr/lib/i386-linux-gnu/libudev.so

then i go to  where it put the build files and call
make
sudo make install

and everything works fine no errors


 

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #229 on: June 16, 2014, 01:47:23 pm »
Ah, you're building and installing the desktop version of SFML I guess. Building for Android is a bit more complicated unfortunately. :) I'll see if I have time to write some short readme/guide for the wiki.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #230 on: June 16, 2014, 03:57:53 pm »
Okay, started a new wiki page explaining building SFML for Android. It's still incomplete and might contain mistakes as well. If anyone feels like improving the page, go for it!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Android and iOS ports available for testing
« Reply #231 on: June 16, 2014, 04:01:05 pm »
Very nice Mario, thanks a lot! That will certainly open the Android port for more people, and it could even be used as inspiration for the official tutorials :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: Android and iOS ports available for testing
« Reply #232 on: June 16, 2014, 04:22:52 pm »
Okay now you're talkin' :) Thanks Mario, I needed that stuff :)

Peixinho

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Android and iOS ports available for testing
« Reply #233 on: June 26, 2014, 03:29:50 pm »
Hi there,

is there any way to build a GL ES2.0 context? Can't seem to find any solution.

Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #234 on: June 26, 2014, 03:49:32 pm »
Nop, at the moment SFML is entirely based on GL ES 1.1.
Laurent Gomila - SFML developer

Peixinho

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Android and iOS ports available for testing
« Reply #235 on: June 26, 2014, 04:09:42 pm »
I just need the context, the rest of it is handle by me. Just want to use the window and events with SFML.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #236 on: June 26, 2014, 05:51:20 pm »
It is currently hard-coded. On iOS (EAGL) it should be farily easy to turn it into a public option, I don't know about EGL (Linux / Android).
Laurent Gomila - SFML developer

Peixinho

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Android and iOS ports available for testing
« Reply #237 on: June 26, 2014, 06:50:08 pm »
That would be great if it could go public option!
« Last Edit: June 26, 2014, 06:56:47 pm by Peixinho »

XeRaCKeR

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #238 on: July 08, 2014, 10:23:07 pm »
Hi

I already built SFML-2.1 for android with mingw x32-4.8.1-posix-dwarf-rev3



It's all I need? I'm quite disorientated and I don't know how to compile my code for android


Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #239 on: July 08, 2014, 11:07:41 pm »
https://github.com/SFML/SFML/wiki/Building-SFML-for-Android

To write some actual app, have a look at the Android example.

 

anything