Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt launcher for Android #3817

Merged
merged 12 commits into from
Jun 8, 2024
Merged

Conversation

kambala-decapitator
Copy link
Collaborator

@kambala-decapitator kambala-decapitator commented Apr 22, 2024

  • Qt launcher now builds for Android
  • old launcher and most Java code removed
  • gradle project adjustments to satisfy androiddeployqt assumptions
  • SDL for Android updated to 2.26.5
  • added launcher option to ignore SSL errors when downloading mods list - disabled by default, useful on old OSs that no longer update system certificates
  • launcher's icons and translations are now packaged inside the binary (using Qt resource system) for all platforms
  • Android additionally packages config and Mods dirs inside the binary and unpacks that at launcher start: this replaces packing them in a zip and unpacking with Java code
  • Qt code to copy oh3 files from existing directory doesn't work on Android, so it was taken from the old Java implementation

@kambala-decapitator
Copy link
Collaborator Author

dev docs to be updated

@nullkiller
Copy link
Member

Abort message: 'terminating with uncaught exception of type std::runtime_error: Resource with name CONFIG/FILESYSTEM and type JSON wasn't found.' samsung

@kambala-decapitator
Copy link
Collaborator Author

Abort message: 'terminating with uncaught exception of type std::runtime_error: Resource with name CONFIG/FILESYSTEM and type JSON wasn't found.' samsung

next build should solve it

@Laserlicht
Copy link
Contributor

Also add the possibility to add scrolling to the elements: Laserlicht/vcmi@0c236da...2ac85d9

After that the only remaining issue is that after changing the language in setup it's not possible to proceed (error with resizing). And some long texts.

@kambala-decapitator
Copy link
Collaborator Author

Also add the possibility to add scrolling to the elements: Laserlicht/vcmi@0c236da...2ac85d9

Nice trick! Will definitely add both changes.

android/vcmi-app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
launcher/CMakeLists.txt Show resolved Hide resolved
@@ -88,16 +89,16 @@ jobs:
preset: windows-mingw-conan-linux
conan_profile: mingw32-linux.jinja
- platform: android-32
os: ubuntu-22.04
os: macos-14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this test change or permanent one?
Github offers more Linux CI runners than macOS runners. Having a lot of macOS runners might slow down CI queue

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could provide Qt host tools (all the stuff in bin folder, plus androiddeployqt) for Linux, then we can use Linux builder again.

@nullkiller
Copy link
Member

Was not able to pass initial wizard. First of all language selector is quite laggy. But main problem is file storage. Was not able to upload files there using standard controls. Says can not detect HOMM3 files when I select a folder which previous launcher was able to accept. Maybe copying them manually may work.

@nullkiller
Copy link
Member

After manually moving files was able to start random map but not campaign. Was not able to use Install GOG Files

@nullkiller
Copy link
Member

Was not able to start a regular map as well. 2024-04-24 21:20:46.730 25602-25722/? E/libc++abi: terminating with uncaught exception of type std::runtime_error: Failed to find object of type randomResource::object

@nullkiller
Copy link
Member

#6 pc 0000000000e531a0 /data/app/~~geG1DA1WdRGmf9Cv0LgjYw==/is.xyz.vcmi.daily-2av4AcFJ8wkIA7hvKitSCg==/lib/arm64/libvcmiclient_arm64-v8a.so (VCMI::CObjectClassesHandler::getHandlerFor(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator<char

@nullkiller
Copy link
Member

Daily build from develop works fine.

@kambala-decapitator
Copy link
Collaborator Author

applied all suggestions

@nullkiller that was upstream issue

@kambala-decapitator
Copy link
Collaborator Author

still need to update dev docs and rename apk to include commit hash / branch name

@IvanSavenko
Copy link
Member

Not sure if you've tested it, but there is also bundle_release job that generates .aab for Google Play. Not sure if it will work as it or if it needs adjustments

@kambala-decapitator
Copy link
Collaborator Author

Not sure if you've tested it, but there is also bundle_release job that generates .aab for Google Play. Not sure if it will work as it or if it needs adjustments

only signing fails locally because I don't have the key. I've made adjustments to CI, should work I believe. In the worst case let's fix it after upload attempt fails.

@IvanSavenko
Copy link
Member

IvanSavenko commented May 1, 2024

Was not able to pass initial wizard. First of all language selector is quite laggy. But main problem is file storage. Was not able to upload files there using standard controls. Says can not detect HOMM3 files when I select a folder which previous launcher was able to accept. Maybe copying them manually may work.

I also have this problem right now.
Selecting directory with data / maps / mp3 directories from H3 results in "data not found" message. (exact message: "Failed to detect valid Heroes III data in chosen directory. Please select directory with installed Heroes III data.")
And gog.com installer files are not selectable if I try to pick innoextract option.
Latest beta build on PC works, so does not looks like an upstream regression.

Manual copy still works.
I have not tried data import with previous build, so might not be a new problem.

===

However if files are copied manually, everything seems to be working as intended! Yeah, some things are not very suitable for touchscreens, and I would tone down that "overshot" effect when you try to scrolling too far, especially on mod list.

But these things are quite minor and certainly something we can live with.

@kambala-decapitator
Copy link
Collaborator Author

the gog fix made it to the beta branch, should I retarget PR?

@IvanSavenko
Copy link
Member

Sure. Don't see any problems with targeting beta, it is not like we have to merge it in 1.5.0 if you do so.

But probably won't fix not working "copy existing data" option.

@kambala-decapitator kambala-decapitator changed the base branch from develop to beta May 1, 2024 19:08
@kambala-decapitator
Copy link
Collaborator Author

targetSdkVersion is the reason most probably, thanks!

@dydzio0614
Copy link
Member

googling shows this: testOnly="true" means the APK can only be installed via adb (which Android Studio uses)

@kambala-decapitator
Copy link
Collaborator Author

let's see if it's fixed, then will remove the temp commit

@IvanSavenko
Copy link
Member

Apk installs, but translations are broken? Changing language does nothing.

Everything else seems to be working so far

@kambala-decapitator
Copy link
Collaborator Author

Apk installs, but translations are broken? Changing language does nothing.

Everything else seems to be working so far

yeah, sorry, copied fix blindly from #4091 and didn't test it. Reverted it and removed the temp commit.

@IvanSavenko
Copy link
Member

IvanSavenko commented Jun 6, 2024

Seems to be working.

Issues that I've noticed:

Any way to fix/alleviate 1st issue? Progress bar would be great, but even simple "copying data, please wait" message would be better than UI freeze.

In any case don't see anything critical. Will try to look into these issues after merge. Perhaps post on Discord and if nothing critical is found - merge tomorrow?

@kambala-decapitator
Copy link
Collaborator Author

  • using "Import existing files" leads to UI freeze, with no indication of progress

yes, I already mentioned it above

Buttons to open directories in "Help" tab do nothing
Mod list lags a lot when dragged

same on iOS

Any way to fix/alleviate 1st issue? Progress bar would be great, but even simple "copying data, please wait" message would be better than UI freeze.

it's doable, but would need more Java code (and possibly notifying Qt app to show the progress bar / message if we want to display it from Qt)

@IvanSavenko
Copy link
Member

it's doable, but would need more Java code (and possibly notifying Qt app to show the progress bar / message if we want to display it from Qt)

Would be great to fix that for 1.5.3. Progress bar would be amazing, but even simple "Copying data, please wait" message will do, whether via Java or via Qt.
This is going to be one of the first things new player is going to see after all.

Can look into rest of issues I've mentioned myself, but probably not this one unfortunately.

@kambala-decapitator
Copy link
Collaborator Author

ok, will try to implement that

@IvanSavenko
Copy link
Member

Perhaps merge as it and fix UI freeze in separate PR? What do you think?

If yes - can you rebase PR to fix that merge conflict?

@kambala-decapitator
Copy link
Collaborator Author

Perhaps merge as it and fix UI freeze in separate PR? What do you think?

If yes - can you rebase PR to fix that merge conflict?

Fine for me. Will rebase in the evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants