15 Commits

Author SHA1 Message Date
hikari_no_yume
7aedb6c9f7 Use DocumentsProvider.getContext() to get context
This must have been an oversight when implementing the documents
provider (6d714bbf0d). There is a
method on DocumentsProvider that gives us access to the context, so
trying to get it via the Application is unnecessary, and we can delete
that code. Apparently this also fixes the mysterious crashes when
opening the file manager the first few times.

Change-Id: Iab674e05104a7c895a2df2a2fcf9d0f1942f125b
2025-06-29 20:33:35 +02:00
hikari_no_yume
d671600d78 Add icon and meaningful versioning to Android APK
Also plumbs through the "branding", giving a different package name and
display name to (for example) preview builds.

Change-Id: I2bd40dbc560de55c2ef9b16efc5dd4a28a769c36
2025-06-29 18:34:30 +02:00
Alexander Cieslewicz
7293034d8d Specify generator for android builds on windows
The default generator on windows does not respect CC and CXX env
variables. Instead of manually overwriting the compiler for all c/c++
builds we can overwite the generator with one that respects the
environment ie ninja.

Change-Id: Iae72276b09c77f1f45fc121bd0ed44a8c2307b11
2025-06-15 18:24:49 +00:00
hikari_no_yume
aa8cbb665c Bump Android Gradle Plugin and Gradle versions (and related changes)
I upgraded to Android Studio 2024.3.2 Patch 1 locally, and then:

- The AGP and Gradle versions were bumped using Android Studio's
  Upgrade Assistant. It also made some required config changes:
  - The package name was moved from AndroidManifest.xml to
    build.gradle
  - Some stuff was added to gradle.properties
- I updated the CI and build docs for these changes.
- The Kotlin plugin version was manually updated due to an
  incompatibility with the newer JDK bundled with Android Studio,
  as suggested here: https://stackoverflow.com/a/79167210
- JDK target versions for Java and Kotlin were specified in order
  to fix the newly-fatal error when they don't match.

Change-Id: I4a9e838cf4b3f8243fc66d4dc3a4e1b3194a8baf
2025-06-14 20:31:32 +02:00
Alexander Cieslewicz
39a5ce61f4 Remove unused proguard remnants from libsdl
We are not using minification so this line does nothing.

Change-Id: If3752dcc7b887f34ee205a9cd35f2901ad726b39
2025-06-14 16:41:59 +02:00
Alexander Cieslewicz
7c2ef6603e Remove build as library functionality
I can't see a use case for building touchHLE as a library. This
simplfies the build and makes it easier to move to the new modern
practices. Also matches what libsdl does nowdays.

Change-Id: I4d65ae650b679c849a55e3b42225bda4ffd14939
2025-06-14 16:37:24 +02:00
ciciplusplus
113ca1ac86 Allow network access for Android
Change-Id: Idcdfe35dd2247c59f77a3d6382017760b172e9b2
2025-03-25 23:55:16 +01:00
Alexander Cieslewicz
474dd15789 Specify C and CXX for android build on windows
Ensures that windows uses the ndk bundled compiler for android builds

Co-authored-by: ciciplusplus <ciciplusplus@gmail.com>
Co-authored-by: Oscar1640 <oscarduvan4950@gmail.com>
Change-Id: Iaec1d7a7dccb0964f3c75fd74aa1ded43ed56a2e
2025-03-02 20:21:24 +00:00
hikari_no_yume
a050b1da7c Add GitHub Actions workflow for building for Android
This commit also contains some Android build fixes. For some reason,
the GitHub Actions runner encountered problems I don't get on my
machine.

Change-Id: I8f052aa0feadbbbd356d453a2f44220decf52111
2024-02-23 16:23:40 +01:00
hikari_no_yume
bbbfca29fb When building for Android, don't override the version from the manifest
https://github.com/hikari-no-yume/touchHLE/issues/188#issuecomment-1791251243

Change-Id: I2a649108650ef8b93c05b6c05491187f14bca20e
2024-02-23 16:23:40 +01:00
hikari_no_yume
6d714bbf0d Implement an Android document provider
Change-Id: I81aa15e1a925ce84418b3f73b5b110dd442e5f43
2023-09-21 17:39:55 +02:00
hikari_no_yume
13e4c8a493 Fix Android build: sdl2/bundled needs to be set
1881e89974 accidentally broke the Android
build because it made the bundled feature not be set in Cargo.toml.
While it's redundant where the default features are set, we don't use
those for the Android build, so it needs to explicitly ask for this.
2023-08-23 19:01:29 +02:00
hikari_no_yume
ea1618fb99 Store bundled fonts, dylibs and default options as APK assets 2023-05-31 20:37:25 +02:00
hikari_no_yume
3e06f0d5ce Unify build instructions 2023-05-08 15:54:14 +02:00
hikari_no_yume
b7792fa773 Implement Android support
This is a squashed merge of the Android branch, the final commit of
which was 3c517a36b1, tagged as
android-before-merge.

@ciciplusplus took the initiative to start porting touchHLE to Android
and got the first version working. @hikari-no-yume's contributions came
later and are mostly fixes and cleanups of various kinds.

There are still various unfinished things in this port, but it's now
in a clean enough state that it no longer needs its own branch.

(Merged pull request by @ciciplusplus, resolves #88.)

Co-authored-by: ciciplusplus <ciciplusplus@gmail.com>
2023-05-06 23:25:49 +02:00