Commit Graph

74 Commits

Author SHA1 Message Date
Mis012
67480873ab main-executable: handle NULL icon/package name jstring 2024-06-13 20:57:59 +02:00
Mis012
debbded4c5 main-executable: fix description for -X 2024-05-28 00:17:51 +02:00
Mis012
4374ac01ad AssetManager: use libandroidfw to read assets straight from the apk file
they can still be put on the filesystem and will be read from there
preferentially, though overriding assets in this way can confuse
some creatively written apps and cause them to crash.
2024-05-26 00:10:16 +02:00
Mis012
54dd61da3d main-executable: add '-e' cmdline option
Some multi-platform apps accept cmdline options using the `-e` option
of `am`. For example, you can now use `-e unity='<unity cmdline>'`
to pass cmdline arguments to a unity game.
2024-05-22 17:06:28 +02:00
Mis012
b35ce06b8d main-executable: allow passing arbitrary options to ART 2024-05-08 20:04:23 +02:00
Mis012
ab2eaffe91 main-executable: add ATL_SKIP_NATIVES_EXTRACTION env 2024-05-08 20:04:23 +02:00
Julian Winkler
62f91e8d3e install option: install apk to base app data dir
The default location is $HOME/.local/share/android_translation_layer/_installed_apks_/
2024-04-13 19:20:38 +02:00
Julian Winkler
5e674e1410 add option to install desktop entry with dynamic launcher portal
A desktop entry is needed to have window icons on Wayland.
2024-04-13 19:20:38 +02:00
Julian Winkler
1150402e38 Wayland: set application_id to package name for window icons
This needs a {package_name}.desktop file defining the icon
2024-04-13 15:45:22 +02:00
Julian Winkler
322f650d2c use g_get_user_data_dir() to locate app_data_dir_base
In order to be compatible with the XDG base specification
2024-04-13 15:45:22 +02:00
Mis012
49436ef172 main: add ATL_FORCE_FULLSCREEN env 2024-03-21 21:11:26 +01:00
Julian Winkler
cdcc3411aa NotificationManager: delete ongoing and MediaStyle notifications on exit
The XDG Portal API doesn't have a concept of ongoing notifications.

MediaStyle notifications could be changed to MPRIS in the future.
2024-03-18 15:41:44 +01:00
Mis012
49aef9ff08 main: set window icon to apk's launcher icon
Note this currently only works with Gtk's X11 backend, because
there is no way for to do this on Wayland even if Gtk wanted to.
2024-03-11 15:15:44 +01:00
Julian Winkler
61d74cb690 update JDWP arguments for new ART version 2024-02-10 10:28:48 +01:00
Julian Winkler
3284518418 AssetManager: use libandroidfw instead of ARSClib for resources.arsc parsing
This reduces startup time and RAM usage. Not yet feature complete with
the ARSClib based implementation, but Gravity Defied runs already
2024-02-06 16:41:48 +01:00
Mis012
bcd2617c9e add -Xcheck:jni, fix some errors it finds 2024-01-23 22:32:09 +01:00
Mis012
529f5f1168 main-executable: error out if apk path doesn't exist 2023-12-07 14:56:04 +01:00
Mis012
9ef2151c5e GLSurfaceView: remove old implementation, import the one from AOSP
Now that we have a reasonably well working SurfaceView implementation,
it is actually cleaner to just implement GLSurfaceView the way AOSP
does. In fact, their code doesn't have any weird dependencies, and
can mostly be used as-is.

The AOSP code is pure Java, which means we had to implement some
EGL wrappers.

This change fixes issues with Wayland (it only ever worked because
the pbuffers were allocated using an XWayland EGLDisplay), and
with resizing (which we simply didn't support), all while getting
rid of quite some (arguably not very readable) LoC.
2023-10-20 20:54:37 +02:00
Julian Winkler
299a474aa0 move startActivity function to Context class
This way it can also be called on Application Context
2023-10-14 18:29:33 +02:00
Julian Winkler
55a1ff2cc5 create ContentProvider from AndroidManifest.xml
This is required for androidx startup library.
Only onCreate method is called for now.
2023-10-14 18:29:33 +02:00
Mis012
8b7b02d81f src/main-executable/main.c: change the naming scheme for app data dirs to fix Unity
Unity can't comprehend that a directory name could end in .apk, and will not handle
obb files properly if the path to the obb file includes such a folder.

To convert your existing app data dirs to the new scheme, simply `cd` into
the app_data_dir (`~/.local/share/android_translation_layer` by default)
and run `find . -maxdepth 1 -exec mv {} {}_ \;`
2023-10-06 21:17:11 +02:00
Mis012
4e22428a27 api-impl-jni/app/android_app_Activity.c: call OnWindowFocusChanged in activity_update_current
also rename apk_main_activity to activity since that's the class it's now for
2023-09-25 19:54:25 +02:00
Julian Winkler
029b26beb2 main.c: window size needs to be set before calling set_up_handle_cache()
the Context class init creates a static DisplayMetric
2023-08-23 14:52:56 +02:00
Julian Winkler
a8e39cd613 get Application class from AndroidManifest.xml and call onCreate() 2023-08-22 15:53:09 +02:00
Mis012
c936333c74 src/main-executable: show actual package name as window title, preparation for showing app icon, re-add some missing stuff 2023-08-12 13:05:34 +02:00