Android port

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

pi1985
Engineer
Engineer
Posts: 107
Joined: 16 May 2013 08:22
Location: Ukraine

Re: Android port

Post by pi1985 » 04 Mar 2017 23:48

I vant to build an android version of Spring PP, but...

Code: Select all

$ ./build.sh
Android NDK: WARNING: APP_PLATFORM android-18 is larger than android:minSdkVersion 9 in jni/../AndroidManifest.xml    
Android NDK: WARNING:jni/../jni/nanogl/Android.mk:nanogl: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/../jni/xerces/Android.mk:xerces: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/../jni/yaml-cpp/Android.mk:yaml-cpp: LOCAL_LDLIBS is always ignored for static libraries    
jni/../jni/application/Android.mk:93: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-armeabi.so'
jni/../jni/application/Android.mk:93: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-armeabi.so' игнорируются
jni/../jni/application/Android.mk:100: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-armeabi-v7a.so'
jni/../jni/application/Android.mk:100: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-armeabi-v7a.so' игнорируются
jni/../jni/application/Android.mk:106: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-armeabi-v7a-hard.so'
jni/../jni/application/Android.mk:106: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-armeabi-v7a-hard.so' игнорируются
jni/../jni/application/Android.mk:112: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-mips.so'
jni/../jni/application/Android.mk:112: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-mips.so' игнорируются
jni/../jni/application/Android.mk:118: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-x86.so'
jni/../jni/application/Android.mk:118: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-x86.so' игнорируются
jni/../jni/application/Android.mk:124: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-arm64-v8a.so'
jni/../jni/application/Android.mk:124: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-arm64-v8a.so' игнорируются
jni/../jni/application/Android.mk:130: предупреждение: переопределение способа для цели `jni/../jni/application/src/libapplication-x86_64.so'
jni/../jni/application/Android.mk:130: предупреждение: старый способ для цели `jni/../jni/application/src/libapplication-x86_64.so' игнорируются
Android NDK: WARNING:jni/../jni/nanogl/Android.mk:nanogl: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/../jni/xerces/Android.mk:xerces: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/../jni/yaml-cpp/Android.mk:yaml-cpp: LOCAL_LDLIBS is always ignored for static libraries    
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
../setEnvironment-armeabi-v7a.sh: line 41: syntax error near unexpected token `;;'
../setEnvironment-armeabi-v7a.sh: line 41: `                    crypto) echo crypto.so.sdl.1;;'
make: *** [jni/../jni/application/src/libapplication-armeabi-v7a.so] Ошибка 1
make: *** Ожидание завершения заданий...
^Cmake: *** [jni/../jni/application/src/libapplication-x86.so] Прерывание
$
What's wrong?
Image
Image
Image.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 05 Mar 2017 02:11

Strange error. What OS do you use? Did you put any spaces in the path to sourcrs?

pi1985
Engineer
Engineer
Posts: 107
Joined: 16 May 2013 08:22
Location: Ukraine

Re: Android port

Post by pi1985 » 05 Mar 2017 03:33

I use AltLinux distribution.
Moved dir to ~, but nothing changed. It was some Cyrillic symbols, but no spaces.
Image
Image
Image.

User avatar
Zhall
Tycoon
Tycoon
Posts: 1244
Joined: 17 Jul 2007 01:36
Skype: moonray_zdo
Location: Teh matrix, duh.
Contact:

Re: Android port

Post by Zhall » 09 Mar 2017 07:18

So.. how do I access my network saves from my pc?

Amak
Engineer
Engineer
Posts: 18
Joined: 13 Feb 2017 14:48

Re: Android port

Post by Amak » 09 Mar 2017 09:55

Zhall wrote:So.. how do I access my network saves from my pc?
Easiest method:

Use dropbox and set both save folders to sync.

Medium method:
Share openttd save folder (mydocs/openttd normally), use ES File explorer to copy whichever saves to device.

Hardest method:
https://forums.geforce.com/default/topi ... tem-root-/

probably various other methods/apps todo with folder sync as well.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 09 Mar 2017 18:15

Your save files are at <SD card>/Android/data/org.openttd.sdl/files/.openttd/save
Just plug your phone into PC and copy them using a file manager.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 20 Mar 2017 21:26

I've had just enough free time today to release OpenTTD 1.7.0-RC1 to the beta channel on Play Store.
I'm planning a big GUI revamp for the final release, increasing buttons size even more, but I cannot promise that I will actually manage to do it.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 26 Mar 2017 21:52

I'm designing a new, more compact toolbar layout, with 10 buttons on each side of the screen.
I'd like some comments about button placement, I think that 'Town directory' button at the bottom left could be replaced with something that is used more often.

Which 'information' button do you use most often? Aside from Trains/Cars/Ships/Airplanes, which have fixed position on the right side.

Image

Image

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 02 Apr 2017 21:22

1.7.0 update is out on Google Play.
It includes my attempt to improve touchscreen UI even further, you can activate it by disabling 'Title bars' setting in Game Options dialog.
This feature is active by default for new installations. To close dialogs in the game, drag them to the screen edge.
This release also includes a small easter egg, which was supposed to be April's joke, but I did not manage to publish it on April 1-st. I'll remove it in a week or two.

WalenTheBlue
Engineer
Engineer
Posts: 4
Joined: 06 Apr 2017 19:48

Re: Android port

Post by WalenTheBlue » 07 Apr 2017 09:39

[Copied from the main forum]

Horizontal toolbar missing ctrl/shift buttons

Why does the new mobile release change the toolbar layout? Vertical one is just fine as it used to be, but the horizontal layout is not. Having to plug in a physical keyboard kinda defeats the purpose of playing on a touch-based tablet. And my preference is to use the horizontal setting.

Any quick workarounds? Btw, it is an unrooted device so no tinkering with files directly is possible.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 07 Apr 2017 20:46

Should be fixed in release 1.7.0.69

mr jj
Engineer
Engineer
Posts: 39
Joined: 10 Apr 2017 12:43
Location: Lisboa,Portugal

Re: Android port

Post by mr jj » 10 Apr 2017 12:48

Hi Pelya ! Is it possible to use the NRT roads in android ? Or is only possible on computer ?

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 10 Apr 2017 13:58

I only provide Android builds for the official OpenTTD releases.
If you want patched OpenTTD for Android, you will have to patch and recompile Android version yourself

ADN707
Engineer
Engineer
Posts: 6
Joined: 31 May 2016 15:51

Re: Android port

Post by ADN707 » 20 Apr 2017 16:21

An issue since the latest update is my screen doesn't time out anymore. Is there a setting for this? It's killing my battery. ?( Thanks for the port, love this game.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 20 Apr 2017 17:44

Yes, I thought it would be better to prevent the phone from sleeping when the app is open, like all other games do.
How is this an issue? Are you forgetting to lock your phone?

ADN707
Engineer
Engineer
Posts: 6
Joined: 31 May 2016 15:51

Re: Android port

Post by ADN707 » 20 Apr 2017 22:41

It's my tablet. I play for about 10 to 30 minutes at a time then just put it down. I can see it would be a help at times, but it doesn't work for me. A setting somewhere, say in options, would be great. :D

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 20 Apr 2017 22:50

There's no such setting, sorry.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 27 Jun 2017 17:55

New release 1.7.1.70 removes 'switch toolbar' button, and puts all actions into submenus, the setting is called 'Compact vertical toolbar'.

Did anyone notice window border ornament in Android version? I am kind of worried, it's been half-year already, and no one has complained about this. Did I pick too muted color for it?

User avatar
ir1n1o57
Traffic Manager
Traffic Manager
Posts: 209
Joined: 01 Jun 2017 10:03

Re: Android port

Post by ir1n1o57 » 01 Jul 2017 12:24

Why it's requiring google play games?
It's just a DOS game.
Is it strange?
Sent from my Ubuntu 16.04 LTS

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya » 01 Jul 2017 13:18

For cloud saves. It will work without Google Play.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: xarick and 3 guests