In case you didn't see the post on the front page, Bobby is now open source under a 100% "do what you want" license. Would love to hear about anyone that has checked the code out of SVN for whatever reason!
I think Bobby is great and I checked out (of git), but I can't find any instructions to compile it! I think it would be great to have on f-droid.org (as well as the other games). I can handle compiling an android project but I have no idea where to get the liballegro prebuilts.
Edit: I searched for Allegro and sucessfully compiled it. Now can't compile libass.so because it thinks I don't have fribidi.
Edit: I got prebuilts from Elemental repo and I've put them in android-proj/libs/armeabi. But now I just get Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /home/gerry/android-ndk-r8b/ndk-build/jni/Android.mk
/home/gerry/android-ndk-r8b/
Is it something to do with LOCAL_CFLAGS := -I$(ANDROID_NDK_TOOLCHAIN_ROOT)/user/armeabi/include -DDEBUGMODE -DWITHOUT_GAMECENTER?
Trent
Monday, March 11, 2013 - 14:49
I'm not sure if this helps, but from the android-proj directory I build the game with this script:
Wait, I don't have a tool chain. What is it and where do I get one?
Trent
Tuesday, March 19, 2013 - 16:05
You must have a toolchain if you compiled Allegro. :)
The Allegro Android README describes how to setup a toolchain.
daithib8
Tuesday, March 26, 2013 - 16:28
Oh yes! But I don't have ttf library ... Using Allegro 5.1. Also I got libass mixed up with libbass :-( Where do I get source/binaries for that?
So ndk-build with toolchain says: Compile thumb : Bobby <= Bobby.c
Compile++ thumb : Bobby <= bassstuff.cpp
jni/bassstuff.cpp:1:18: fatal error: bass.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/Bobby/bassstuff.o] Error 1
make: *** Waiting for unfinished jobs....
jni/Bobby.c:15:30: fatal error: allegro5/allegro.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/Bobby/Bobby.o] Error 1
Trent
Tuesday, March 26, 2013 - 20:02
You get BASS from http://www.un4seen.com. You can configure Freetype to build with the Android toolchain. You'll probably have to Google it. It would be something like ./configure --host=arm-linux-gnueabi but I don't know precisely. Looks like you don't have Allegro installed in the right spot either (missing allegro.h.) You should install Allegro to your toolchain directory under user/armeabi/. If you're using arm7 I think armeabi may be armv7 instead. Not sure, it's something different for arm7. Hope this helps.
daithib8
Tuesday, March 26, 2013 - 21:47
Sadly, BASS is proprietary. I don't think this app can be classified as free software as a result.
Trent
Sunday, March 31, 2013 - 05:01
It wouldn't be very difficult to use Allegro for audio (with some preprocessor flag controlling it.) This is what I did for Monster RPG 2 when I released the source. Unfortunately, I'm really busy until at least mid-late week this coming week, so I'll definitely not have a chance to do it. I'll consider doing it when I get all the pressing stuff I'm doing now finished.
daithib8
Sunday, April 7, 2013 - 17:12
That's great news. So I'll have a look at Monster RPG 2. I've got so far, but I'm not sure about where to copy allegro once it has been built. I've put my best effort in our forum topic: http://f-droid.org/forums/topic/monster-rpg-2-now-is-free-and-open-source-software.
Trent
Sunday, April 7, 2013 - 20:09
Out of curiosity, could you just take the Android binary from http://www.monster-rpg.com/download.html and use that?
Trent
Monday, April 8, 2013 - 01:40
I just updated Bobby in git with Allegro audio support. I didn't test it on Android but it should be fine. To use it you'll have to modify the makefiles, link with allegro_audio and allegro_acodec. You'll also have to compile with the KCM_AUDIO preprocessor define for it to use Allegro instead of BASS. Make sure you remove references to bass from src/com/nooskewl/AllegroActivity and add references to allegro_audio and allegro_acodec. If you run into any problems let me know!
Thanks
daithib8
Friday, April 12, 2013 - 20:04
OK, I patched up the files with a little help from my programmer buddies. First problem is that toolchain command only installs toolchain/user/armeabi-v7a not armeabi. Second is that ndk-build complains that allegro5/allegro_ttf.h is missing. I tried following some instructions for installing freetype in a toolchain:
./configure --host=arm-linux-androideabi PLATFORM_PREFIX=../toolchain/ \
NDK_PATH=$$NDK$$ NDK_PLATFORM=android-9 && make && sudo make install
You can run an f-droid compatible repo if you want and we would probably promote it within the client, but practically every apk now on f-droid.org
is built from source ourselves. see the first part of http://f-droid.org/manual for setting up a repo with prebuilt apks.
Trent
Friday, April 12, 2013 - 23:18
Ok, I think you're going about building freetype wrong. Try a command like this, followed by make:
If you're using the armv7 compiler, those "arm-linux-androideabi" commands may all be named something slightly different.
When you run cmake for Allegro does it say FreeType disabled? You'll probably have to run:
cmake .. <all of your switches here> -DFREETYPE_LIBRARY=/path/to/libfreetype.a -DFREETYPE_INCLUDE_DIR_freetype=/some/path/ending/in/freetype/or/freetype2 -DFREETYPE_INCLUDE_DIR_ft2build=/path/to/ft2build.h/not/including/file/itself
daithib8
Sunday, April 14, 2013 - 10:11
Looks like a problem with CC= when I run ./configure.
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [setup] Error 77
Also I need to give the absolute path to --prefix or else it complains
Trent
Monday, April 15, 2013 - 05:41
Hm did you forget the --host= part? You could post the config.log...
daithib8
Wednesday, April 17, 2013 - 15:35
Sure, here is config.log. http://paste.debian.net/250106/
N.B. changed to new url.
If I do full path to host: configure:2524: error: /bin/sh ./config.sub /home/gerry/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/arm-linux-androideabi failed
Trent
Wednesday, April 17, 2013 - 17:24
From the config.log:
./configure: line 2920: arm-linux-androideabi-gcc: command not found
So you need to give it the correct gcc command or if that is correct try putting the bin directory in your path.
daithib8
Thursday, April 18, 2013 - 11:46
Thanks for your help. We're within arms reach , I can feel it! Error 77 now : http://paste.debian.net/250255/
Trent
Thursday, April 18, 2013 - 16:43
Seems like your toolchain is messed up somehow. The important error is:
crtbegin_dynamic.o: No such file: No such file or directory
I have that file in my toolchain dir under sysroot/usr/lib/crtbegin_dynamic.o. Do you have it?
daithib8
Saturday, April 20, 2013 - 19:05
Yes I have that: -rw-r--r-- 1 gerry users 1796 Mar 14 21:52 crtbegin_dynamic.o
; crtbegin_dynamic.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
The only thing I can think of trying is prepend LDFLAGS="-L/path/to/crtfile" (without filename) to the configure command. If that doesn't work it seems the standalone toolchain you created may be corrupt somehow.
I think Bobby is great and I checked out (of git), but I can't find any instructions to compile it! I think it would be great to have on f-droid.org (as well as the other games). I can handle compiling an android project but I have no idea where to get the liballegro prebuilts.
Edit: I searched for Allegro and sucessfully compiled it. Now can't compile libass.so because it thinks I don't have fribidi.
Edit: I got prebuilts from Elemental repo and I've put them in android-proj/libs/armeabi. But now I just get Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /home/gerry/android-ndk-r8b/ndk-build/jni/Android.mk
/home/gerry/android-ndk-r8b/
Is it something to do with LOCAL_CFLAGS := -I$(ANDROID_NDK_TOOLCHAIN_ROOT)/user/armeabi/include -DDEBUGMODE -DWITHOUT_GAMECENTER?
I'm not sure if this helps, but from the android-proj directory I build the game with this script:
ANDROID_NDK_TOOLCHAIN_ROOT=$HOME/code/android-toolchain $HOME/code/android-ndk-r7b/ndk-build -j 2 $1
Then ant debug or ant release.
Wait, I don't have a tool chain. What is it and where do I get one?
You must have a toolchain if you compiled Allegro. :)
The Allegro Android README describes how to setup a toolchain.
Oh yes! But I don't have ttf library ... Using Allegro 5.1. Also I got libass mixed up with libbass :-( Where do I get source/binaries for that?
So ndk-build with toolchain says: Compile thumb : Bobby <= Bobby.c
Compile++ thumb : Bobby <= bassstuff.cpp
jni/bassstuff.cpp:1:18: fatal error: bass.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/Bobby/bassstuff.o] Error 1
make: *** Waiting for unfinished jobs....
jni/Bobby.c:15:30: fatal error: allegro5/allegro.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/Bobby/Bobby.o] Error 1
You get BASS from http://www.un4seen.com. You can configure Freetype to build with the Android toolchain. You'll probably have to Google it. It would be something like ./configure --host=arm-linux-gnueabi but I don't know precisely. Looks like you don't have Allegro installed in the right spot either (missing allegro.h.) You should install Allegro to your toolchain directory under user/armeabi/. If you're using arm7 I think armeabi may be armv7 instead. Not sure, it's something different for arm7. Hope this helps.
Sadly, BASS is proprietary. I don't think this app can be classified as free software as a result.
It wouldn't be very difficult to use Allegro for audio (with some preprocessor flag controlling it.) This is what I did for Monster RPG 2 when I released the source. Unfortunately, I'm really busy until at least mid-late week this coming week, so I'll definitely not have a chance to do it. I'll consider doing it when I get all the pressing stuff I'm doing now finished.
That's great news. So I'll have a look at Monster RPG 2. I've got so far, but I'm not sure about where to copy allegro once it has been built. I've put my best effort in our forum topic: http://f-droid.org/forums/topic/monster-rpg-2-now-is-free-and-open-source-software.
Out of curiosity, could you just take the Android binary from http://www.monster-rpg.com/download.html and use that?
I just updated Bobby in git with Allegro audio support. I didn't test it on Android but it should be fine. To use it you'll have to modify the makefiles, link with allegro_audio and allegro_acodec. You'll also have to compile with the KCM_AUDIO preprocessor define for it to use Allegro instead of BASS. Make sure you remove references to bass from src/com/nooskewl/AllegroActivity and add references to allegro_audio and allegro_acodec. If you run into any problems let me know!
Thanks
OK, I patched up the files with a little help from my programmer buddies. First problem is that toolchain command only installs toolchain/user/armeabi-v7a not armeabi. Second is that ndk-build complains that allegro5/allegro_ttf.h is missing. I tried following some instructions for installing freetype in a toolchain:
./configure --host=arm-linux-androideabi PLATFORM_PREFIX=../toolchain/ \
NDK_PATH=$$NDK$$ NDK_PLATFORM=android-9 && make && sudo make install
and got toolchain/freetype/freetype.h but running
cmake .. -DANDROID_NDK_TOOLCHAIN_ROOT=../../toolchain -DWANT_ANDROID=on -DWANT_EXAMPLES=OFF -DWANT_DEMO=OFF -DCMAKE_BUILD_TYPE=Debug
doesn't give any allegro-ttf.so.
You can run an f-droid compatible repo if you want and we would probably promote it within the client, but practically every apk now on f-droid.org
is built from source ourselves. see the first part of http://f-droid.org/manual for setting up a repo with prebuilt apks.
Ok, I think you're going about building freetype wrong. Try a command like this, followed by make:
If you're using the armv7 compiler, those "arm-linux-androideabi" commands may all be named something slightly different.
When you run cmake for Allegro does it say FreeType disabled? You'll probably have to run:
Looks like a problem with CC= when I run ./configure.
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [setup] Error 77
Also I need to give the absolute path to --prefix or else it complains
Hm did you forget the --host= part? You could post the config.log...
Sure, here is config.log. http://paste.debian.net/250106/
N.B. changed to new url.
If I do full path to host: configure:2524: error: /bin/sh ./config.sub /home/gerry/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/arm-linux-androideabi failed
From the config.log:
So you need to give it the correct gcc command or if that is correct try putting the bin directory in your path.
Thanks for your help. We're within arms reach , I can feel it! Error 77 now : http://paste.debian.net/250255/
Seems like your toolchain is messed up somehow. The important error is:
I have that file in my toolchain dir under
sysroot/usr/lib/crtbegin_dynamic.o. Do you have it?Yes I have that: -rw-r--r-- 1 gerry users 1796 Mar 14 21:52 crtbegin_dynamic.o
; crtbegin_dynamic.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
./configure --prefix=/tmp/toolchain/ --host=arm-linux-androideabi --enable-static=yes --enable-shared=no CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-cpp AR=arm-linux-androideabi-ar
The only thing I can think of trying is prepend LDFLAGS="-L/path/to/crtfile" (without filename) to the configure command. If that doesn't work it seems the standalone toolchain you created may be corrupt somehow.