Author Topic: GLideN64 Android port  (Read 119759 times)

Offline Gillou68310

  • Developer
  • long
  • *****
  • Posts: 112
    • View Profile
Re: GLideN64 Android port
« Reply #15 on: April 20, 2015, 06:43:12 AM »
Quote
I tried to build via command line:

ndk-build - build with no errors

ant debug
BUILD FAILED
/home/sergey/WS/android-sdk-linux/tools/ant/build.xml:601: Invalid file: /home/sergey/WS/mupen64plus-ae/libs/extras/android/support/v7/gridlayout/build.xml

full ant log attached.

What do I wrong?


@Gonetz you need to run "android update project" in both appcompat and gridlayout directories before you can run ant debug.

Code: [Select]
android update project --name appcompat --target 2 --path /home/gilles/workspace/mupen64plus-ae/libs/extras/android/support/v7/appcompat
android update project --name gridlayout --target 2 --path /home/gilles/workspace/mupen64plus-ae/libs/extras/android/support/v7/gridlayout

Target 2 beeing API 21 on my computer (android list target) 

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #16 on: April 20, 2015, 06:55:22 AM »
Thanks, that's helpful Gilles.  I'm going to take some time this morning to try to get to the bottom of all this.

@Gonetz I just wanted to mention a couple things:
 - Alpha 19 should be plenty sufficient for initial integration testing, and it doesn't contain any of the appcompat stuff that may be causing some of the build issues Gilles describes.
 - Alpha 19 should build just fine without modification.  Note that with mupen64plus-ae, everything you need to build is included in that single repository -- you don't need to pull any upstream repositories.  GlideHQ will be disabled, but the whole project will still build and run fine.  There's no need to add Boost just to start testing -- unless GlideN64 requires it.  (Does it?)
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #17 on: April 20, 2015, 08:01:34 AM »
BTW the tip of mupen64plus-ae master is now in sync with the latest from upstream.  I'll look into the linux build issues now.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #18 on: April 20, 2015, 09:22:19 AM »
@Gonetz concerning your issue with appcompat, make sure API 21 is installed via SDK manager before importing the project in eclipse. I had a similar issue on windows where eclipse used a lower (but not compatible) API version.

SDK manager has tons of options which look redundant for me. Could you check that my current setup is ok? Screenshot attached.

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #19 on: April 20, 2015, 09:30:11 AM »
There's no need to add Boost just to start testing -- unless GlideN64 requires it.  (Does it?)

PC version of GlideN64 is linked with GLideNHQ (GL port of GlideHQ). GLideNHQ uses Boost system and filesystem.
I can cut that link for Android and I'll do it as the first step to Android compatibility. However, I'd like to bring to Android full power of PC version.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #20 on: April 20, 2015, 09:32:31 AM »
@Gonetz
Looks like your installation should be fine to build the latest tip (which includes appcompat libraries) or Alpha 19 (which does not include appcompat and therefore is easier to build).

I agree that the full power should be in Android if at all possible.  I think disabling HQ for now just to get building is reasonable.  We always planned to get GlideHQ into Android, we just ran out of time/higher priorities/etc.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Gillou68310

  • Developer
  • long
  • *****
  • Posts: 112
    • View Profile
Re: GLideN64 Android port
« Reply #21 on: April 20, 2015, 10:25:37 AM »
I managed to build Glide64 with GlideHQ support, using this library:
https://github.com/MysticTreeGames/Boost-for-Android

I didn't check if it's actually functionnal, but I'm not sure we can use it anyway as their is no support for armv7 or x86.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #22 on: April 20, 2015, 10:44:32 AM »
@Gonetz
After cloning, did you create an initial project file, as described in mupen64plus-ae/README.md?

Quote

Download and install the prerequisites
    Android SDK
    Android NDK
    Eclipse ADT plugin
Clone the mupen64plus-ae repository and initialize the working copy
    git clone https://github.com/mupen64plus-ae/mupen64plus-ae.git
    cp .project.init .project
Import the Eclipse project and dependencies
    Open Eclipse
    Select File → Import → Android → Existing Android Code Into Workspace, and press Next
    Browse to root of cloned repository, and press OK
    Select all projects, and press Finish
Add native support to the Eclipse project
    Right-click the mupen64plus-ae project in the Eclipse Package Explorer window
    Select Android Tools → Add Native Support...
    Accept the default library name (mupen64plus-ae), and press Finish
    Delete the unneeded generated C++ file: rm jni/mupen64plus-ae.cpp
Build and run the app from Eclipse
    Select the mupen64plus-ae project in the Eclipse Package Explorer window
    Select Run → Run
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #23 on: April 20, 2015, 10:58:34 AM »
@Gonetz
I just verified that I could build the latest tip of master using Ubuntu 14.04 64-bit, using a fresh install of the SDK, NDK, ADT, and Eclipse Luna.  I followed the instructions in the README.md exactly without any deviations.

I did have to apt-get install a few things, which I found through a quick google search
    sudo apt-get install lib32z1 lib32stdc++6

In the Android SDK manager, I have only four things installed
    - Android SDK Tools 24.1.2
    - Android SDK Platform-tools 22
    - Android SDK Build-tools 21.1.2
    - Android 5.0.1 (API 21) -> SDK Platform

Note that I do NOT have the Android Support Library installed.  We mirrored the select elements from ASL into the mupen64plus-ae repository specifically to make it easy to build out of the box for build scripts, users, etc.

I would suggest you delete your git clone, remove unneeded components in the Android SDK Manager, and start fresh.  If you get any build errors, you might just need to apt-get install some dependencies.  Restart Eclipse and clean the build between updates.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: GLideN64 Android port
« Reply #24 on: April 20, 2015, 11:17:17 AM »
Edit: @Gillou:Some release notes from the boost library website has mentions of armv7.

1.54.0

Code: [Select]
Chrono:
Fixed Bugs:
#8367 chrono does not compile with clang from XCode 4.5.2 with -std=c++11 -stdlib=libc++ and -arch armv7

1.56.0 (unrelated to current "for Android" build version limit)

Code: [Select]
Atomic:
Improved support for ARMv6 and later with GCC. Implemented all atomic operations as assembler blocks instead of CAS-based loops. 64-bit operations are supported with ARMv7.

I hope this helps out.

Edit: The Boost for Android github page lists versions including 1.54.0 so I'd assume armv7 is supported in 1.54.0 and 1.55.0 of the Android one.
Then again,what architecture does current Android run on...armv7 and x86.
(and x86-64bit when on Lollipop for supported devices)

...Wait,how could it or "Boost for Android" not be supported on either armv7 and x86?
Those are the main architectures. (especially x86 for computers in 32bit then 64bit form)


(another) Edit:There is one thing on that github page showing "armeabi" that now confuses me.

Just trying to help however I can.
« Last Edit: April 20, 2015, 01:27:56 PM by retroben »

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #25 on: April 20, 2015, 11:30:59 AM »
Eclipse Luna...
I tried to use Version: 3.8.1 from Ubuntu Software Center.
Ok, I'll get fresh soft and try again.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #26 on: April 20, 2015, 11:38:27 AM »
@Gonetz
I figured out the ant build issue and will push a fix in a little bit.  Just want to test it all again on a fresh checkout first.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Gonetz

  • Developer
  • long
  • *****
  • Posts: 104
    • View Profile
Re: GLideN64 Android port
« Reply #27 on: April 20, 2015, 12:58:39 PM »
@littleguy
Many thanks for the detailed instructions!
I did everything as you said and got working build with no problems.
Now I can switch to issues with my code.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: GLideN64 Android port
« Reply #28 on: April 20, 2015, 01:17:47 PM »
Excellent!  I'll probably have the fix for ant pushed up later if you prefer ant instead of eclipse.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Gillou68310

  • Developer
  • long
  • *****
  • Posts: 112
    • View Profile
Re: GLideN64 Android port
« Reply #29 on: April 20, 2015, 01:31:47 PM »
Thanks for your help @retroben but iI think I found what I was looking for:
https://github.com/sorccu/Boost-for-Android/commits/multiabi-refactor

I'll test this tomorrow ;)