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

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

0 Members and 5 Guests are viewing this topic.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #120 on: April 11, 2014, 04:20:44 pm »
As i remember that task was in my practice a year ago. It was part of an engine of one software company which hired me to outsourcing. I forgot everything, but it was pretty simple. Or it was not OpenAL? =) I need to learn all stuff from the very begining...

Yes, i even found MK from it:
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := openal
LOCAL_SRC_FILES :=             \
        OpenAL32/alAuxEffectSlot.c \
        OpenAL32/alBuffer.c        \
        OpenAL32/alDatabuffer.c    \
        OpenAL32/alEffect.c        \
        OpenAL32/alError.c         \
        OpenAL32/alExtension.c     \
        OpenAL32/alFilter.c        \
        OpenAL32/alListener.c      \
        OpenAL32/alSource.c        \
        OpenAL32/alState.c         \
        OpenAL32/alThunk.c         \
        Alc/ALc.c                  \
        Alc/alcConfig.c            \
        Alc/alcEcho.c              \
        Alc/alcModulator.c         \
        Alc/alcReverb.c            \
        Alc/alcRing.c              \
        Alc/alcThread.c            \
        Alc/ALu.c                  \
        Alc/android.c              \
        Alc/bs2b.c                 \
        Alc/null.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/OpenAL32/Include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/AL
LOCAL_CFLAGS := -DAL_BUILD_LIBRARY -DAL_ALEXT_PROTOTYPES
LOCAL_LDLIBS := -llog -Wl,-s
include $(BUILD_SHARED_LIBRARY)
« Last Edit: April 11, 2014, 04:24:03 pm by ChronicRat »

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #121 on: April 11, 2014, 09:02:42 pm »
Yep, building of latest OpenAL from repo is not so simple. At the current moment i'm stuck with two things: 1) tons of multiple definitions, 2) i don't know why am i doing it. =)

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #122 on: April 13, 2014, 05:50:33 pm »
sfml-activity.so and all others are in APK file, but error on start:
Code: [Select]
04-13 19:48:45.121    4368-4368/com.familyxoft.croger E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.familyxoft.croger/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: sfml-activity
Any ideas?
upd: No info about libraries in META-INF files.
« Last Edit: April 13, 2014, 06:06:11 pm by ChronicRat »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #123 on: April 14, 2014, 12:20:51 am »
Make sure you've got the proper module name set for the native ability. Right now it's still looking for "sfml-activity" rather than whatever you've defined.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #124 on: April 14, 2014, 08:10:19 am »
I'm not sure about build.gradle, no, i'm sure that my build.gradle is incorrect. Google changed project's structure in Android Studio again! So, this question is not for this topic, it's for Google. Is there full AS documentation anywhere?

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #125 on: April 14, 2014, 05:13:08 pm »
Well, in Eclipse all builds perfectly. Another question, how to buld SFMLES with gnustl_static?
And second question, if i build my engine part as shared library, what is right way to call "loadLibrary" for it from game's shared object?
« Last Edit: April 14, 2014, 05:56:13 pm by ChronicRat »

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #126 on: April 15, 2014, 09:04:10 am »
Code: [Select]
04-15 11:00:41.925: D/jdwp(8769): sendBufferedRequest : len=0x45
04-15 11:00:41.928: W/asset(8769): AssetManager-->addDefaultAssets CIP path not exsit!
04-15 11:00:42.487: D/libEGL(8769): loaded /system/lib/egl/libEGL_mali.so
04-15 11:00:42.496: D/libEGL(8769): loaded /system/lib/egl/libGLESv1_CM_mali.so
04-15 11:00:42.499: D/libEGL(8769): loaded /system/lib/egl/libGLESv2_mali.so
04-15 11:00:42.543: V/PhoneWindow(8769): DecorView setVisiblity: visibility = 4
04-15 11:00:42.581: V/PhoneWindow(8769): DecorView setVisiblity: visibility = 0
04-15 11:00:43.049: A/libc(8769): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 8813 (milyxoft.croger)
Program built, apk contains all libs and meta-info, on start crash with this output. What can this be? Now i'll try to build all my code  with debug enabled.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #127 on: April 15, 2014, 12:33:28 pm »
In deubg build SFMLES eglCheckError is undefined reference.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #128 on: April 15, 2014, 12:57:19 pm »
Quote
In deubg build SFMLES eglCheckError is undefined reference.
It shouldn't. Make a clean build to be sure ;)
Laurent Gomila - SFML developer

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #129 on: April 15, 2014, 01:43:31 pm »
Well, may be, i'm mixing with SFML and SFMLES, so i can't be sure absolutly. sf::String, for example, i copied from main branch.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #130 on: April 15, 2014, 01:45:09 pm »
You shouldn't have to do any modifications on your own, just grab the ios_and_android branch off SFML's main repostiory on GitHub. You might just have to skip SFML audio for now.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Android and iOS ports available for testing
« Reply #131 on: April 15, 2014, 01:52:12 pm »
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).
Since I don't have the time, to search and teach me all the things around Android and NDK and yet, still would like to test the Android port, is there an easy and at best step by step guide for this?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #132 on: April 15, 2014, 01:55:28 pm »
You shouldn't have to do any modifications on your own, just grab the ios_and_android branch off SFML's main repostiory on GitHub. You might just have to skip SFML audio for now.
There was some trouble with String. I'll check now, where i went wrong.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #133 on: April 15, 2014, 02:26:17 pm »
Here it is:
error: 'class sf::String' has no member named 'toUtf8'

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Android and iOS ports available for testing
« Reply #134 on: April 15, 2014, 02:40:12 pm »
sf::String::toUtf8() was added after SFML 2.1, and it seems not to be part of the ios_and_android branch yet.

By the way, ChronicRat, please use the Edit function if you're adding information to a previous post. Earlier you posted 3 posts and 4 posts in a row; it really makes the thread unnecessarily long and more difficult to read. Users are also notified if you edit the post.
« Last Edit: April 15, 2014, 02:46:39 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything