Commit Graph

18 Commits

Author SHA1 Message Date
Sam Edwards 52e7c952b3 putil: Rename config_util to config_putil 2018-05-14 02:36:42 -06:00
rdb 94ceace5af android: add activity for running Python programs
It can be launched from the termux shell using the provided run_python.sh script, which can communicate with the Panda activity using a socket (which is the only way we can reliably get command-line output back to the program.)

The Python script needs to be readable by the Panda activity (which implies it needs to be in /sdcard).

The standard library is packed into the .apk, and loaded using zipimport.  Extension modules are included using a special naming convention and import hook in order to comply with Android's strict demands on how libraries must be named to be included in an .apk.

[skip ci]
2018-03-11 22:53:08 +01:00
rdb 8e8283cbe1 android: enable writing stdout/stderr to a socket
This can be done by setting the extra string org.panda3d.OUTPUT_URI to tcp://host:port
Writing to a log file can still be done using file:///path/to/log.txt

[skip ci]
2018-03-11 22:36:17 +01:00
rdb 95eee0cab2 android: load prc files from assets. Move assets to /android_asset 2018-02-17 20:09:24 +01:00
rdb 6bd1976892 android: support writing png/jpg/webp via android.graphics.Bitmap 2018-02-17 18:40:08 +01:00
rdb d269f7c6c3 android: allow stdout/stderr capture using extra field on intent
This allows launching the Panda apk from termux and getting command-line output back to termux.
2018-02-06 22:42:40 +01:00
rdb ae0f82911b android: allow launching pview by opening models (using Intents)
Also add code to show notification toasts.
Also enable model cache by default (pointing to app cache dir)
2018-02-06 22:36:21 +01:00
rdb 10789f6936 android: fix issue loading some image files 2018-02-06 22:33:57 +01:00
rdb c1fccd311b android: properly support multiple Java threads 2018-02-06 22:32:22 +01:00
rdb 0fa8980be2 android: fix activity lifecycle issues (froze upon quit or resume)
It seems Android doesn't want an application to just quit on its own accord; after main() returns we need to kindly request Android to finish the activity and keep handling events until Android destroys the app.
2018-01-29 20:08:29 +01:00
rdb 7c1dd4050b android: change assets mount dir, point binary path to .apk
The binary path we get from /proc/self/exe isn't very useful; the path to the .apk is barely more useful but it still doesn't make a whole lot of sense.  It might make more sense to set it to the path of the native .so that is being loaded by NativeActivity.
2018-01-29 19:44:39 +01:00
rdb d35e6c5113 android: include android_native_app_glue in repository
These files are from the NDK, but don't seem to be included in termux.  Since they are two small files that change very rarely, it's easier to just include them in the Panda repo.

[skip ci]
2018-01-28 14:27:35 +01:00
rdb 47388b0dbc Separate out CPython calls from core libs; eliminate need for pystub 2016-07-20 14:30:41 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 40739c6b5f Fix link issues and crashes with Android build 2016-02-06 11:46:56 +01:00
rdb 16e7831566 Remove executable permissions from files that don't need them 2015-04-05 15:41:49 +02:00
rdb fbc3564bf9 More work on Android port 2014-10-08 15:09:25 +00:00
rdb bc85e1a4f2 More android support 2013-01-24 20:17:08 +00:00