|
Getting Started With Android? |
jmasterx
Member #11,410
October 2009
|
I would like to eventually port my game to Android, but I feel it is tricky to just get the examples running. I was wondering if anyone has either: Or possibly, build scripts for addons, template project files, etc. Trent made something similar for iOS which was very, very useful for me. I would be willing to send someone $10 via PayPal for some decent build scripts / template project. Thanks! Agui GUI API -> https://github.com/jmasterx/Agui |
Yodhe23
Member #8,726
June 2007
|
Using Linux thesedays it is comparatively straight forward, tbh. www.justanotherturn.com |
jmasterx
Member #11,410
October 2009
|
I have no objection to using Linux (I use Mac which is *nix-like) But I still am not sure how to build the deps (aside from trivial ones like libpng) and how to get a basic example going. I got the NDK, setup my toolchain, but build scripts would really help, if you have any advice I'd really appreciate it. Agui GUI API -> https://github.com/jmasterx/Agui |
Mark Oates
Member #1,146
March 2001
|
I'm kinda on the edge of my seat for the answer to this thread. I'll kick in $10, too . PayPal or Bitcoin. -- |
Yodhe23
Member #8,726
June 2007
|
Having been there myself (see https://www.allegro.cc/forums/thread/615363) As of the last time I built for android on the 1st June 2015, I could build the following dependencies- (assuming you copied/git'd allegro to $HOME/allegro) Note The cross.cmake file that is used is as follows, Note you will have to change the home/yodhe... to match your directories on your system. 1#
2# this one is important
3SET(CMAKE_SYSTEM_NAME Linux)
4#this one not so much
5SET(CMAKE_SYSTEM_VERSION 1)
6
7# specify the cross compiler
8SET(CMAKE_C_COMPILER /home/yodhe/android-toolchain/bin/arm-linux-androideabi-gcc)
9SET(CMAKE_CXX_COMPILER /home/yodhe/android-toolchain/bin/arm-linux-androideabi-g++)
10
11# where is the target environment
12SET(CMAKE_FIND_ROOT_PATH /home/yodhe/android-toolchain)
13
14# search for programs in the build host directories
15SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
16# for libraries and headers in the target directories
17SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
18SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
19#
freetype-2.5.5 physfs-2.0.3 (turn off CD Options in cmake file to build) DUMB-0.9.3 libogg-1.3.2 (DOESN'T WORK WITH API 19+ tested with Allegro 5.1.10, and previous) libvorbis-1.3.5 (As above due to ogg dependency) libtheora-1.1.1 (See ogg issue) Now I can't get the following two dependencies to build Openal-soft-1.16.0 (RUNTIME ERROR lookupUINT function not found in adb log) sudo make LDFLAGS=avoid-version sudo make LDFLAGS=avoid-version install Flac-1.3.1 (RUNTIME ERROR) If anyone can get Openal or Flac to work I would appreciate how they do it. I would also really appreciate if the "powers that develop" could fix OGG with Android 5+. (And if people REALLY want to help me/give me cookies, I have an allegro (android) game coming out next month for £2.49 I would really appreciate people buying it a giving an honest review.) www.justanotherturn.com |
jmasterx
Member #11,410
October 2009
|
Thank you very much, I will be sure to buy your game and review it! It might be in a month though as Ive only just recently ordered Android Tablets. I had a quick question: that libogg issue, if you compile against < api 19, will the app still have sound on an api19+ device or is the problem only when you initially compile against api19+? Agui GUI API -> https://github.com/jmasterx/Agui |
Yodhe23
Member #8,726
June 2007
|
Ogg won't work with any Android version 5+ that I've tested (5, 5.02, and 5.1.1) and produces a runtime crash. It does work with 4.4.2 and less, but I haven't tested on any device running less than actually 4.0. www.justanotherturn.com |
jmasterx
Member #11,410
October 2009
|
So if I compile vorbis with --without-ogg ill be alright,the sound will work or 4+? Agui GUI API -> https://github.com/jmasterx/Agui |
Yodhe23
Member #8,726
June 2007
|
Well you have to compile the dependencies "--without-ogg" anyway? www.justanotherturn.com |
George24
Member #14,359
June 2012
|
I did get the examples to work and documented this in detail on this Wiki page: |
|