ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.65k stars 370 forks source link

Android release preparations #6008

Closed ihhub closed 1 year ago

ihhub commented 1 year ago

Preliminary checks

Describe the problem requiring a solution

Even having a very basic Android build we are far away from a proper release for this platform. We need to make multiple changes and adjustments in order to make it user-friendly and ready to be published in App Store.

Describe the possible solution

Additional info

No response

oleg-derevenetz commented 1 year ago

@zenseii

I looked up what I believe is the CPU from reference sites and it says 64-bit on Intel's own page (just scroll to the bottom of the page

Yeah, but even if CPU itself supports 64-bit, it doesn't mean that vendor runs 64-bit Android on it. It could as well run 32-bit Android.

oleg-derevenetz commented 1 year ago

@zenseii he can try the APK from #6324. Please note that this is the non-optimized debug build, it is only suitable to check the ability to basically run on his device, and not to evaluate the performance and speed.

ihhub commented 1 year ago

Hi @oleg-derevenetz and @zenseii , should we include scripts for Linux and Windows to download a demo version of the game for the Android archive? I have a feeling people would ask us about the way to download the demo.

zenseii commented 1 year ago

Hi, @ihhub. It would be a good idea. Some users might not know how to go through all the transferring of files and this will at least let them try it.

oleg-derevenetz commented 1 year ago

@ihhub

should we include scripts for Linux and Windows to download a demo version of the game for the Android archive?

We can simply specify the URL of the demo version in the README. Making a special script just to download and unpack one ZIP file is, in my opinion, excessive. It was convenient for installation maintenance in these systems, because it was able to copy demo files to the appropriate places, but on Android people should copy files themselves.

ihhub commented 1 year ago

I am okay to at least modify the README file to include the link so users at least know where to get it. However, we should specify that we have no affiliation with the host of this demo version.

Laserlicht commented 1 year ago

It would be great if we could get the app in the app store soon. Since the manual update on my device is not really great (app can not be overwritten, must be deleted and reinstalled with the additional files).

Maybe first at F-Droid. This is usually used by more experienced users. It is not so bad if it is not so perfect yet.

zenseii commented 1 year ago

It would be great if we could get the app in the app store soon. Since the manual update on my device is not really great (app can not be overwritten, must be deleted and reinstalled with the additional files).

Maybe first at F-Droid. This is usually used by more experienced users. It is not so bad if it is not yet so perfect.

Hi, @Laserlicht. I only have the problem you mentioned whenever I try to install the "debug" version, like the ones you can get from build artifacts from PRs, and I currently have the "release" version installed, which you can grab from releases or snapshots. If you go from one release build to another more recent one it should be possible to just install it over it.

oleg-derevenetz commented 1 year ago

@Laserlicht Debug builds from PR artifacts and release builds from releases section (including the "latest snapshot") are signed by different signatures. If you don't need to install builds from PRs, then just avoid this :)

Laserlicht commented 1 year ago

Hi @zenseii & @oleg-derevenetz Thank you very much. ๐Ÿ˜Š

oleg-derevenetz commented 1 year ago

@Laserlicht I doubt that Google Play will accept this app in its current form, at least we should add some sort of "launcher" activity with minimal user-friendly UI that should help the unprepared user to copy OG files in place (for example, user should point out to the ZIP archive with OG files and that activity should extract OG files from this ZIP).

Laserlicht commented 1 year ago

@oleg-derevenetz

Wouldn't it be even better (besides the possibility to extract the files from a zip) if we integrate the innoextract (license would allow it?!)? I think most have their files from GOG. That would really be the easiest way for the user. Log in to GOG on your smartphone, download the exe and select it the first time you start fheroes2. No data handling on PC.

Just tested it. With the command line variant of innoextract and the EXE from GOG you can get the appropriate files without problems.

I would also like it, by the way, if the ZIP file (or EXE) would also work in the desktop variant and (if no assets available) an openfile dialog opens.

oleg-derevenetz commented 1 year ago

@Laserlicht not all users have their HoMM2 installations from GoG, many people have older distributions (for example, those that were still distributed on CD). First we will need to make a more universal version, and only then maybe we will be able to extend it.

Laserlicht commented 1 year ago

@oleg-derevenetz Of course. One step after the other.

But I think the Play Store App should keep the entry barrier as low as possible. Many people barely use the classic PC/Laptop these days (hard to believe ๐Ÿ˜…). For them, installing, copying and zipping on the PC (and copying to the phone) is of course a barrier.

oleg-derevenetz commented 1 year ago

@Laserlicht well, at least they definitely have a PC since they already bought the game that runs on PC only :) AFAIK there is still no way to run the GoG HoMM2 distribution on Android :) I don't even know if it possible to buy it directly on mobile device.

Laserlicht commented 1 year ago

@oleg-derevenetz I was just interested... ๐Ÿ˜…

Buying on an Android seems to be possible (but I already have it ๐Ÿ˜‰). Download of the EXE is possible.

ihhub commented 1 year ago

We cannot release Android version to Google Play Store by 2 reasons:

These are things which should be done before even starting any integration from GoG.

Mr-Bajs commented 1 year ago

Any plans of releasing this on F-droid? Even though initial istallation would require som manual handling with the original files, but it would be more convienient to keeping up to date with the latest fheroes2 release on Android though.

oleg-derevenetz commented 1 year ago

Even though initial istallation would require som manual handling with the original files

Now this should be easier for an end user because of new "toolset" activity.

Any plans of releasing this on F-droid?

Maybe when we get to that. There are no specific deadlines yet.

ihhub commented 1 year ago

Hi @oleg-derevenetz , after the latest update for Android build I am unable to build it on my Windows machine with Android studio:

The project is using an incompatible version (AGP 7.4.1) of the Android Gradle plugin. Latest supported version is AGP 7.3.1
See Android Studio & AGP compatibility options.
oleg-derevenetz commented 1 year ago

@ihhub What version of Android Studio you using? Project builds just fine with Electric Eel 2022.1.1 Patch 1. It looks like you are using some older version.

ihhub commented 1 year ago

Hi @oleg-derevenetz , I use:

Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 amd64
ihhub commented 1 year ago

I am updating Android Studio to see if it helps.

oleg-derevenetz commented 1 year ago

@ihhub Well, yes, this version is a bit old. Try to update it ("Help" -> "Check for Updates...").

ihhub commented 1 year ago

It's fixed :)

oleg-derevenetz commented 1 year ago

@ihhub New Android SDKs want new build tools, which in turn want new Gradle plugin, which in turn want new Android Studio, because older AS are not able to work with newer plugins... :)

ihhub commented 1 year ago

But what was the reason to update new tools?

oleg-derevenetz commented 1 year ago

But what was the reason to update new tools?

I updated the target Android SDK to the latest one (API 33). Previously we used the penultimate one (31). It is recommended to always use the latest SDK, and Google Play even enforces this by rejecting apps built with older SDKs (older by 2 years or so).

ihhub commented 1 year ago

Thanks for the explanation!

oleg-derevenetz commented 1 year ago

@ihhub

https://developer.android.com/google/play/requirements/target-sdk

ihhub commented 1 year ago

Hi @oleg-derevenetz , I believe we covered all basic aspect of Android release so we can close this issue. What do you think?

oleg-derevenetz commented 1 year ago

@ihhub yes, it seems so :)