Android port
Moderator: OpenTTD Developers
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Android port
Depending on where you have the app installed (by default its installed to your internal memory), you'll want to goto your internal or external memory (ie SD card) and look for the android folder, and hopefully there should be a org.openttd.sdl where it'll have a bunch of stuff for openttd
I can't find where it installs the downloaded content to but by adding a folder called "data" there, it seems openttd is able to see that when it searchs for grfs on start up and when you reload grfs in the grf menu. I was able to get the OpenTTD Gantry style waypoint grf into the game by doing this.
I can't find where it installs the downloaded content to but by adding a folder called "data" there, it seems openttd is able to see that when it searchs for grfs on start up and when you reload grfs in the grf menu. I was able to get the OpenTTD Gantry style waypoint grf into the game by doing this.
Proud Canadian
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: Android port
All downloaded files and savegames are on SD card / public storage, in Android/data/org.openttd.sdl/files/.openttd (note the dot, some file managers will hide such files)
Re: Android port
Thanks, that seems to have worked.pelya wrote:All downloaded files and savegames are on SD card / public storage, in Android/data/org.openttd.sdl/files/.openttd (note the dot, some file managers will hide such files)
You just lost The Game.
Re: Android port
I tried to compile from source but it failed:
I tried to look why it wasn't included, but I failed to reach a solution...
Do you have any idea why it fails?
Code: Select all
compilation terminated.
Makefile:64: recipe for target 'getoptdata.o' failed
make[2]: *** [getoptdata.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/miguel/workspace/commandergenius/project/jni/application/src/src/src/endian_check.cpp:21:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
Makefile:91: recipe for target 'endian_check' failed
Do you have any idea why it fails?
Re: Android port
No idea. Do you have Android SDK and NDK installed?
Re: Android port
Yes I do.
NDK version is r10e
Full logs:
NDK version is r10e
Full logs:
Code: Select all
Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 9 in jni/../AndroidManifest.xml
jni/../jni/application/Android.mk:88: warning: overriding commands for target `jni/../jni/application/src/libapplication-armeabi.so'
jni/../jni/application/Android.mk:88: warning: ignoring old commands for target `jni/../jni/application/src/libapplication-armeabi.so'
jni/../jni/application/Android.mk:95: warning: overriding commands for target `jni/../jni/application/src/libapplication-armeabi-v7a.so'
jni/../jni/application/Android.mk:95: warning: ignoring old commands for target `jni/../jni/application/src/libapplication-armeabi-v7a.so'
jni/../jni/application/Android.mk:101: warning: overriding commands for target `jni/../jni/application/src/libapplication-armeabi-v7a-hard.so'
jni/../jni/application/Android.mk:101: warning: ignoring old commands for target `jni/../jni/application/src/libapplication-armeabi-v7a-hard.so'
jni/../jni/application/Android.mk:107: warning: overriding commands for target `jni/../jni/application/src/libapplication-mips.so'
jni/../jni/application/Android.mk:107: warning: ignoring old commands for target `jni/../jni/application/src/libapplication-mips.so'
jni/../jni/application/Android.mk:113: warning: overriding commands for target `jni/../jni/application/src/libapplication-x86.so'
jni/../jni/application/Android.mk:113: warning: ignoring old commands for target `jni/../jni/application/src/libapplication-x86.so'
jni/../jni/application/Android.mk:119: warning: overriding commands for target `jni/../jni/application/src/libapplication-arm64-v8a.so'
jni/../jni/application/Android.mk:119: warning: ignoring old commands for target `jni/../jni/application/src/libapplication-arm64-v8a.so'
rm -f ./libs/arm64-v8a/lib*.so ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/armeabi-v7a-hard/lib*.so ./libs/mips/lib*.so ./libs/mips64/lib*.so ./libs/x86/lib*.so ./libs/x86_64/lib*.so
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/armeabi-v7a-hard/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
cd jni/../jni/application/src && until mkdir .lock >/dev/null 2>&1; do sleep 1; done && \
./AndroidBuild.sh armeabi-v7a arm-linux-androideabi && rmdir .lock >/dev/null 2>&1
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/armeabi-v7a-hard/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
cd jni/../jni/application/src && until mkdir .lock >/dev/null 2>&1; do sleep 1; done && \
./AndroidBuild.sh x86 i686-linux-android && rmdir .lock >/dev/null 2>&1
[x86] Install : libsdl-1.2.so => libs/x86/libsdl-1.2.so
install -p ./obj/local/x86/libsdl-1.2.so ./libs/x86/libsdl-1.2.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/libsdl-1.2.so
[x86] Install : libsdl_native_helpers.so => libs/x86/libsdl_native_helpers.so
install -p ./obj/local/x86/libsdl_native_helpers.so ./libs/x86/libsdl_native_helpers.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/libsdl_native_helpers.so
[x86] Install : libtimidity.so => libs/x86/libtimidity.so
install -p ./obj/local/x86/libtimidity.so ./libs/x86/libtimidity.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/libtimidity.so
[x86] Install : libexpat.so => libs/x86/libexpat.so
install -p ./obj/local/x86/libexpat.so ./libs/x86/libexpat.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/libexpat.so
[x86] Install : libfontconfig.so => libs/x86/libfontconfig.so
install -p ./obj/local/x86/libfontconfig.so ./libs/x86/libfontconfig.so
[x86] Install : liblzma.so => libs/x86/liblzma.so
install -p ./obj/local/x86/liblzma.so ./libs/x86/liblzma.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/libfontconfig.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/liblzma.so
[x86] Install : liblzo2.so => libs/x86/liblzo2.so
install -p ./obj/local/x86/liblzo2.so ./libs/x86/liblzo2.so
/home/miguel/workspace/android-ndk-r10e/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/i686-linux-android-strip --strip-unneeded ./libs/x86/liblzo2.so
[armeabi-v7a] Install : libsdl-1.2.so => libs/armeabi-v7a/libsdl-1.2.so
install -p ./obj/local/armeabi-v7a/libsdl-1.2.so ./libs/armeabi-v7a/libsdl-1.2.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libsdl-1.2.so
NDK /home/miguel/workspace/android-ndk-r10e
[armeabi-v7a] Install : libtimidity.so => libs/armeabi-v7a/libtimidity.so
install -p ./obj/local/armeabi-v7a/libtimidity.so ./libs/armeabi-v7a/libtimidity.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libtimidity.so
[armeabi-v7a] Install : libsdl_native_helpers.so => libs/armeabi-v7a/libsdl_native_helpers.so
[armeabi-v7a] Install : libexpat.so => libs/armeabi-v7a/libexpat.so
install -p ./obj/local/armeabi-v7a/libsdl_native_helpers.so ./libs/armeabi-v7a/libsdl_native_helpers.so
install -p ./obj/local/armeabi-v7a/libexpat.so ./libs/armeabi-v7a/libexpat.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libsdl_native_helpers.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libexpat.so
[armeabi-v7a] Install : liblzma.so => libs/armeabi-v7a/liblzma.so
install -p ./obj/local/armeabi-v7a/liblzma.so ./libs/armeabi-v7a/liblzma.so
[armeabi-v7a] Install : libfontconfig.so => libs/armeabi-v7a/libfontconfig.so
install -p ./obj/local/armeabi-v7a/libfontconfig.so ./libs/armeabi-v7a/libfontconfig.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/liblzma.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libfontconfig.so
[armeabi-v7a] Install : liblzo2.so => libs/armeabi-v7a/liblzo2.so
install -p ./obj/local/armeabi-v7a/liblzo2.so ./libs/armeabi-v7a/liblzo2.so
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/liblzo2.so
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make[1]: Entering directory '/home/miguel/workspace/commandergenius/project/jni/application/openttd/openttd-build-armeabi-v7a'
make[2]: Entering directory '/home/miguel/workspace/commandergenius/project/jni/application/openttd/openttd-build-armeabi-v7a/objs/lang'
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith
-W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual
-fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -DNDEBUG -I /home/miguel/workspace/commandergenius/project/jni/application/src/openttd-build-armeabi-v7a/objs/lang
-std=gnu++0x -Wno-narrowing -rdynamic /home/miguel/workspace/commandergenius/project/jni/application/src/src/src/endian_check.cpp -o endian_check
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith
-W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual
-fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -DNDEBUG -I /home/miguel/workspace/commandergenius/project/jni/application/src/openttd-build-armeabi-v7a/objs/lang
-std=gnu++0x -Wno-narrowing -DSTRGEN -c -o getoptdata.o /home/miguel/workspace/commandergenius/project/jni/application/src/src/src/misc/getoptdata.cpp
In file included from /home/miguel/workspace/commandergenius/project/jni/application/src/src/src/misc/../stdafx.h:41:0,
from /home/miguel/workspace/commandergenius/project/jni/application/src/src/src/misc/getoptdata.cpp:12:
/home/miguel/workspace/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
# include_next <stdint.h>
^
compilation terminated.
/home/miguel/workspace/commandergenius/project/jni/application/src/src/src/endian_check.cpp:21:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
Makefile:91: recipe for target 'endian_check' failed
make[2]: *** [endian_check] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:64: recipe for target 'getoptdata.o' failed
make[2]: *** [getoptdata.o] Error 1
make[2]: Leaving directory '/home/miguel/workspace/commandergenius/project/jni/application/openttd/openttd-build-armeabi-v7a/objs/lang'
Makefile:56: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/miguel/workspace/commandergenius/project/jni/application/openttd/openttd-build-armeabi-v7a'
make: *** [jni/../jni/application/src/libapplication-armeabi-v7a.so] Error 1
make: *** Waiting for unfinished jobs....
Last edited by planetmaker on 03 Jul 2015 06:47, edited 1 time in total.
Reason: added some line breaks in the long list of compiler and linker options
Reason: added some line breaks in the long list of compiler and linker options
Re: Android port
When I'm compiling it, I'm getting much more include dirs in the compiler command line. That's the output when compiling getoptdata.cpp:
It includes generated files, and works when trying to build in clean environment.
Before running build.sh, please run command
mkdir project/libs
to fix dependency error in build.sh. I've fixed that in Git, but ths fix is not in the release archive yet.
Could you try to compile from the source archive at https://sourceforge.net/projects/libsdl ... k/OpenTTD/arm-linux-androideabi-g++ -O2 -fomit-frame-pointer -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -O2 -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=300 -DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security -isystem/home/pelya/src/endless_space/android-ndk-r10e/platforms/android-14/arch-arm/usr/include -isystem/home/pelya/src/endless_space/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -isystem/home/pelya/src/endless_space/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -isystem/home/pelya/src/endless_space/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include/backward -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl-1.2/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../application/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl-1.2/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl_main/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl_native_helpers/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../jpeg/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../png/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../ogg/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../flac/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../vorbis/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../freetype/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../jpeg/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../png/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../freetype/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../timidity/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../expat/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../fontconfig/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../lzma/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../lzo2/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icui18n/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../iculx/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icule/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icudata/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icuuc/include -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -DWITH_SDL -I/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl-1.2/include -D_REENTRANT -DWITH_ZLIB -DWITH_LZMA -DWITH_LZO -I/home/pelya/src/endless_space/SDL-android/project/jni/application/src/src/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/include/libpng12 -DWITH_FONTCONFIG -I/usr/include/freetype2 -DWITH_FREETYPE -I/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl-1.2/include -D_GNU_SOURCE=1 -D_REENTRANT -DWITH_ICU -D_FORTIFY_SOURCE=2 -D_REENTRANT -I/home/pelya/src/endless_space/SDL-android/project/jni/application/../icuuc/include -DLIBTIMIDITY -DENABLE_NETWORK -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\".openttd\" -DGLOBAL_DATA_DIR=\"./\" -I /home/pelya/src/endless_space/SDL-android/project/jni/application/src/openttd-build-armeabi-v7a/objs/release -I /home/pelya/src/endless_space/SDL-android/project/jni/application/src/openttd-build-armeabi-v7a/objs/lang -I /home/pelya/src/endless_space/SDL-android/project/jni/application/src/openttd-build-armeabi-v7a/objs/setting -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -O2 -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=300 -DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security -isystem/home/pelya/src/endless_space/android-ndk-r10e/platforms/android-14/arch-arm/usr/include -isystem/home/pelya/src/endless_space/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -isystem/home/pelya/src/endless_space/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -isystem/home/pelya/src/endless_space/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include/backward -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl-1.2/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../application/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl-1.2/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl_main/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../sdl_native_helpers/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../jpeg/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../png/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../ogg/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../flac/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../vorbis/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../freetype/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../jpeg/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../png/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../freetype/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../timidity/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../expat/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../fontconfig/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../lzma/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../lzo2/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icui18n/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../iculx/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icule/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icudata/include -isystem/home/pelya/src/endless_space/SDL-android/project/jni/application/../icuuc/include -frtti -fexceptions -std=gnu++0x -Wno-narrowing -c -o misc/getoptdata.o /home/pelya/src/endless_space/SDL-android/project/jni/application/src/src/src/misc/getoptdata.cpp
It includes generated files, and works when trying to build in clean environment.
Before running build.sh, please run command
mkdir project/libs
to fix dependency error in build.sh. I've fixed that in Git, but ths fix is not in the release archive yet.
Re: Android port
Just tried the same thing happens. It is like the setEnvironment is ignored. The CXXFLAGS are there but does not influence the build process.
Re: Android port
Well a clean enviroment solved my previous issue, now I'm stuck at the linking stage...
From what I've read every version from libpng starting at 1.4.X has this symbol. My system's version is 1.6.16
Maybe you are linking another version and somehow it is interfering?
Code: Select all
/home/miguel/Downloads/ttd/project/jni/application/src/src/src/heightmap.cpp:125: error: undefined reference to 'png_set_longjmp_fn'
/home/miguel/Downloads/ttd/project/jni/application/src/src/src/screenshot.cpp:245: error: undefined reference to 'png_set_longjmp_fn'
/home/miguel/Downloads/ttd/project/jni/application/src/src/src/screenshot.cpp:296: error: undefined reference to 'png_set_longjmp_fn'
Maybe you are linking another version and somehow it is interfering?
Re: Android port
Yup, Android SDL repo has libpng 1.2.46
Up to now this did not cause issues. Maybe your environment somehow pulled header files from /usr/include? Could you please copy your compilation output (includes etc), or maybe deinstall libpng-dev from your system?
https://github.com/pelya/commandergeniu ... png.h#L478
Up to now this did not cause issues. Maybe your environment somehow pulled header files from /usr/include? Could you please copy your compilation output (includes etc), or maybe deinstall libpng-dev from your system?
https://github.com/pelya/commandergeniu ... png.h#L478
Re: Android port
Hi lads
It's been a while since I played the game on Android, I must admit, but I've ran into quite a problem. I can't interact with the game world - as in all left-click actions are broken inside the world. All the menus and surrounding buttons work fine but if I click on a factory, town, station or unit (ie any in-game object) the information dialogues don't pop up. On top of that, I can't place anything down in the world. Right-click wise it seems to be working as I can look around and zoom in/out.
I've reinstalled the game (including deleting the data folder), tried all the different mouse emulation settings, and even copied my configs from my PC. Considering this is such a disabling bug, I'm surprised I'm first to report it.
My phone is a OnePlus One 64Gb running Cyanogenmod 12.1 (Lollipop 5.1.1).
If you need me to test anything, provide logs or bomb alien spaceships I'll be glad to help.
And just like all other random well hearted forum help-seekers, I'd like to say that this port is godly. I tried the PSP and NDS ports back in the day but god were they buggy. Keep up the good work.
It's been a while since I played the game on Android, I must admit, but I've ran into quite a problem. I can't interact with the game world - as in all left-click actions are broken inside the world. All the menus and surrounding buttons work fine but if I click on a factory, town, station or unit (ie any in-game object) the information dialogues don't pop up. On top of that, I can't place anything down in the world. Right-click wise it seems to be working as I can look around and zoom in/out.
I've reinstalled the game (including deleting the data folder), tried all the different mouse emulation settings, and even copied my configs from my PC. Considering this is such a disabling bug, I'm surprised I'm first to report it.
My phone is a OnePlus One 64Gb running Cyanogenmod 12.1 (Lollipop 5.1.1).
If you need me to test anything, provide logs or bomb alien spaceships I'll be glad to help.
And just like all other random well hearted forum help-seekers, I'd like to say that this port is godly. I tried the PSP and NDS ports back in the day but god were they buggy. Keep up the good work.
Re: Android port
Are you using mouse? With touchscreen and fingers, tapping a factory should show pop-up information box.
Re: Android port
I'm using touchscreen and tapping the factories does nothing. I tried laptop mode mouse emulation too, and mapped physical keys to the clicks but no luck there either.pelya wrote:Are you using mouse? With touchscreen and fingers, tapping a factory should show pop-up information box.
Re: Android port
That's something weird, the only thing I can think of is your touchscreen is so imprecise that it janks cursor hard enough each time you touch it so the touch is getting recognized as scroll. But then other apps would stop working too, and also mapping physical key to left mouse button would work.
And you told that you reinstalled the app, so it must not have any broken NewGRFs either.
Could you please try USB mouse with OTG cable? Could you please install this app, and check the touch coordinate does not jump wildly when you tap the screen?
https://play.google.com/store/apps/deta ... .debug.app
And you told that you reinstalled the app, so it must not have any broken NewGRFs either.
Could you please try USB mouse with OTG cable? Could you please install this app, and check the touch coordinate does not jump wildly when you tap the screen?
https://play.google.com/store/apps/deta ... .debug.app
Re: Android port
From what I can tell, the touch coordinates are very stable on my phone. Even if I my finger around then stop it stabilises very very quickly.pelya wrote:Could you please try USB mouse with OTG cable? Could you please install this app, and check the touch coordinate does not jump wildly when you tap the screen?
https://play.google.com/store/apps/deta ... .debug.app
I don't have an OTG cable handy but if I can find one or a Bluetooth mouse I'll test it out.
I find it very odd that all the menus and GUI buttons work (eg main menu, minimap, news ticker) but world interaction doesn't. Surely this means the hardware is ok?
EDIT: Things just got weirder. It seems I can place stations, but not vehicle depots. I can't open the menus for either when I tap/click them though.
Re: Android port
Most probably yes. How the game got broken that badly, I have no idea about.
Could you please record your screen when trying to play? You can do that using this app:
https://play.google.com/store/apps/deta ... nrecording
Also please enable 'Show touches' in developer options in settings. You can enable developer options by tapping build number 10 tines in the About screen.
Could you please record your screen when trying to play? You can do that using this app:
https://play.google.com/store/apps/deta ... nrecording
Also please enable 'Show touches' in developer options in settings. You can enable developer options by tapping build number 10 tines in the About screen.
Re: Android port
I've made a short video of what's happening, but my screen is 1080p and my internet sucks. Its going to take 40 minutes to upload so if I'm still awake I'll send you the link, otherwise I'll append it to this post in the morning.
Thanks for all these quick responses BTW. I'm having a fun time keeping up on mobile
Thanks for all these quick responses BTW. I'm having a fun time keeping up on mobile
Re: Android port
Considering the game itself limits resolution to 854x480, 1080p video won't do much differemce.
Re: Android port
Fixed it.
I was reading through the rest of this topic and I noticed you have been working on the GUI. My client has never looked like that so I just reinstalled the game yet again. The buttons are a lot bigger, and sure enough, when I loaded up a world, all was good.
I think what I was doing was copying all the content from my PC to phone and overwriting something important. This time I let the SDL launcher thing do the download and it worked.
Sorry for all the hassel. You've been a great help nevertheless. This new GUI is so much more comfortable than what I have been attempting to use.
I was reading through the rest of this topic and I noticed you have been working on the GUI. My client has never looked like that so I just reinstalled the game yet again. The buttons are a lot bigger, and sure enough, when I loaded up a world, all was good.
I think what I was doing was copying all the content from my PC to phone and overwriting something important. This time I let the SDL launcher thing do the download and it worked.
Sorry for all the hassel. You've been a great help nevertheless. This new GUI is so much more comfortable than what I have been attempting to use.
Re: Android port
Okaaaaay. 'Something important' being OpenTTD config file. Just copy your saveganes and newgrfs.m1cr0man wrote: I think what I was doing was copying all the content from my PC to phone and overwriting something important. This time I let the SDL launcher thing do the download and it worked.
Who is online
Users browsing this forum: No registered users and 1 guest