19 Commits

Author SHA1 Message Date
Benoit Pierre
64529e755a android: libarchive based luajit-launcher
Some checks failed
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Has been cancelled
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Has been cancelled
- https://github.com/koreader/koreader-base/pull/2088
- https://github.com/koreader/android-luajit-launcher/pull/552
- https://github.com/koreader/android-luajit-launcher/pull/558
- https://github.com/koreader/android-luajit-launcher/pull/559
2025-05-28 11:00:21 +02:00
Benoit Pierre
97e566ec70 minor cleanup 2025-05-28 11:00:21 +02:00
Benoit Pierre
c04023f1d1 make: factorize code for generating release updates (#12655)
Instead of splitting remove / exclusion of unwanted files in 2-3 places
(`all` rule, `update` rule, and update script in some cases), install
the same files in debug & release builds, and exclude unwanted stuff
when generating the update.

This should finally fix the CI issue with OCR tests (since we don't
remove the `data/dict` & `data/tessdata` directories on release build
anymore).
2024-11-23 20:48:37 +01:00
Benoit Pierre
35918326f0 android: fix apkanalyzer location
- fix SDK location: our install has 2 different versions: under
  `tools/bin/apkanalyzer` and `cmdline-tools/latest/bin/apkanalyzer`,
   but only the later is functional (trying to use the former raise
   some classpath exceptions)
- always use the SDK location, don't try to detect it: it's better to
  fail with a more explanatory "apkanalyzer: command not found" error
  than having the shell try to run a command with the wrong executable
  (`manifest …` because `$(APKANALYZER)` is empty)
2024-10-02 14:35:56 +02:00
Benoit Pierre
120d418b7e android: switch to monolibtic mode (#12576)
We can get rid of the `libs` and `sdcv` symlink in application files.

Depend on koreader/koreader-base#1920.

Close #12348.
2024-10-02 09:19:57 +02:00
Benoit Pierre
6e7ccf2320 android: add custom adb logcat formatter (#12385)
- standalone: no other dependencies than Python (>= 3.7) and adb
  (Android >= 4.3 [Jelly Bean])
- filter KOReader's traces, and other processes chatter about KOReader
  (e.g. mentions of its application ID or PID)
- show time, PID, TID (when different), tag, priority, and message
- only parse the log (don't rely on `adb shell` commands)
- can be used as a filter, including on its own (uncolored) output
- we can simplify instructions to users when asking for detailed logs

Why not use pidcat?
- project is unmaintained
- does not support Python 3 (need at least one extra patch)
- mangle long lines by wrapping them, even when not outputting to a terminal,
  which is a big no-no, IMHO (as it break searching, copy pasting, etc…)
2024-08-25 23:41:25 +02:00
Benoit Pierre
4ba106a6a3 android: improve update rule
Remove old in-tree build artifacts that could conflict (`assets/libs` & `assets/module`).
2024-08-17 22:35:09 +02:00
Benoit Pierre
9107147742 android: tweak APK name
Use `ANDROID_NAME` for last part so setting it as an environment
variable to something like `dev` allows for a stable APK name
across different revisions.
2024-08-17 22:35:09 +02:00
Benoit Pierre
9aeb0f394b android: silence unnecessary verbose update step 2024-08-17 22:35:09 +02:00
Benoit Pierre
050c7a96ac make: add run rule for android targets 2024-08-15 09:37:49 +02:00
Benoit Pierre
de2a9d54f1 make: reword comment 2024-08-11 17:31:10 +02:00
Benoit Pierre
5fe0d4a4a2 make: fix missing android APK asset
Missing `module/version.txt` would trigger a "new install" on every launch.
2024-08-11 17:31:10 +02:00
Benoit Pierre
bd4a651fbf make: improve android update
- out-of-tree luajit-launcher build: no leftovers after `make clean`
- use the luajit library compiled by base: no point wasting time
  building a second (different, possibly incompatible) version
2024-08-10 23:34:17 +02:00
Benoit Pierre
13cc21b769 make: fix android update sdcv (#12275)
Need the real stuff, not a symlink.
2024-08-03 08:35:49 +02:00
Benoit Pierre
14f105707d make: always symlink, even for release builds (faster) 2024-07-31 08:45:48 +02:00
Benoit Pierre
040e033edb make: move android variables where they belong 2024-07-31 08:45:48 +02:00
Benoit Pierre
5a465f413b tweaks for new build system
- forward unknown make targets to base
- add `cmake` and `staging` directories to ignored output artifacts
- drop `package.path` and `package.cpath` luarocks specific entries
2024-05-29 22:02:06 +02:00
Benoit Pierre
25d29aca4a android: fix building with kodev (#11817)
If the Android NDK and/or SDK are not setup, `kodev` will try to invoke
the `android-ndk` and/or `android-sdk` make targets.  This can't be done
with `TARGET=android`, as `base/Makefile.defs` will error out trying to
call the (missing) compiler to get the target machine. Those rules need
to be available to all targets.
2024-05-14 10:30:15 +02:00
Benoit Pierre
f749fc2fd9 make: move target specific rules to dedicated files 2024-05-12 09:48:15 +02:00