VCMI for Android

Sadly this is something I have like zero idea about so all I can do is just google it.

Just create pull request and Travis will compile it. :wink:

We’ll also be able to find if there something need to be fixed.

Welcome to team! If seriously we obviously not give everyone access to main repository since not everyone actually need them, but I think github have teams inside organizations so there no problem to invite you and then let you control repositories you want and non-develop branch.

Warmonger / AVS might need comment on this though since I don’t have full permissions on github.

I don’t think it’s stable, but it’s far better than 0.97 for sure.

I think they forgive us. Or we could ask for ownership over other package later that in fact represent our domain.

VCMI Organization membership give no additional access, only Teams do and on repository level. There is no way to control access to individual branches

@Fay I`ve sent invitation

There is. GitHub allow to limit pushes to protected branches from certain teams:
help.github.com/articles/about- … -branches/

So for instance we can let Fay to keep Android-specific changes in main repository branch even without giving develop (protected branch) push access. Of course we can also just ask nicely to not push directly anything unless it’s absolutely obvious and tested fix.

Okay, so I accepted the invitation and created the pull request.

Currently I can’t transfer the launcher project, because “You don’t have the permission to create repositories on vcmi”.

I suppose you need permissions to create repositories.

BTW I also need it since I want to upload server configuration to github organization.

Repository creation should be allowed now.

@Fay
Another thing I want to request once you have free time for that.
Try to setup Android build for Travis CI, it’s will be really helpful.

I transferred the launcher repo to vcmi ( github.com/vcmi/vcmi-android ).

I can look at the CI config after android support pull request is sorted out.
In theory it should be possible to automate the build without much problem (because it already works kinda automatically via the python script), but at the moment I’m not sure what I need to specify there. Anyway, I will check that out.

Maybe a long shot, but dailies for android build?

This is one of two reasons why we need CI. Since we now have plenty space to host them there will be at least builds for Windows and OSX from Travis.

Okaaay, so after reading a bit about travis, I added an experimental config to lint.travis-ci.org/vcmi/vcmi-android says it’s syntactically valid, but I can’t really check anything more).
travis-ci.org/vcmi/vcmi-android says that travis is not enabled for this repo so I think you need to turn it on manually to check?

Btw, android app on master should compile/work correctly on android 4.1+.

I`ve enabled travis for "vcmi-android ". Next commit there should trigger build.

Okay, I tinkered with it for some time, but have to give up for today.
I think I’m past “obvious” errors already, because travis starts actual cmake build. Hopefully not much left until it builds correctly, because there errors are killing me. :stuck_out_tongue:

Might be will be able to check whats wrong in few days.
If build starts then dependency hell shouldnt be so much of a problem.

I’ll probably be able to continue working on it tomorrow. But if it’s still broken after few days, you’ll be welcome to help. :wink:

Build passed. I can’t really verify atm if everything is correct, but at least it finished and is all green now. :wink:

Great! Once I fix urgent “let’s remove user home directory” bug I’ll try to setup deploy from Travis to our new daily build server. :slight_smile:

Okay, I managed to detect the data path from previous version and migrate Data, Mp3, Saves and Maps folders and config/settings.json file. I decided to skip Mods folder though (I think it could cause problems aaand it would take more time to implement).

Edit ~ actually, the saves probably aren’t even compatible with current version, so probably they shouldn’t get migrated…

Feel free to mess with the travis file. :wink:
If you need it, generated artifacts should be in ./project/vcmi-app/build/outputs/apk/*.apk

There are still some (minor) things to solve for daily builds. Currently travis builds only one configuration (debug, api16+, armeabi-v7a). I think that ideally 2 packages should be created (release,api16,armeabi-v7a and release,api21,all abis). Changing the build to 2 packages is probably a matter of fiddling with travis config (+ less hardcoding in ./travis-extras/vcmiconf.json.in) and to build release package, we would need to add some “fake” signing to repo.

Two question regarding Android build. First of all I want to start use std::atomic. Is it working fine with NDK?

Also there is scary comment about NO_STD_TOSTRING. I see replacement provided enough convert unsigned short int to std::string, but what about other types? I suppose we shouldn’t use it right?

It’s hard to say exactly what works correctly and what doesn’t. Atomic should work, I used it for client/server synchronization.

More explanation about ndk features was in the PR for vcmi android support: github.com/vcmi/vcmi/pull/299/f … 499d876728 .
Full support of standard lib in ndk should come “soon”. E.g. according to github.com/android-ndk/ndk/issues/82 this is in development and currently planed for ndk r16 (which, I think, should be available in july).

I’m not sure what you mean. The replacement should handle everything that can be put into stringstream.