AppLoad's quirk of removing framebuffer when nothing's holding framebuffer even though app is running prevented crash handling and restarting KOReader to fail, so introduce a keep-alive process (which was LLM assisted, and it's very cursed, but it works!) to work around this issue.
It wasn't a problem for shimmed version since shim loaded even for sh handling shell script too, which acted as keep-alive.
The previous handling had two problems:
- current dir only appended if argc == 1
- multiple args passed as one to reader.lua
As a result:
- `bin/koreader -v -d` doesn't work (reader.lua sees it as one arg)
- `bin/koreader -d abc.epub` doesn't work either (for the same reason)
The fix is to go through args one by one and use `set -- …` to keep them
as an array of args (preserves white-space and avoid unintended
expansions that might happen if we attempted to do some eval trickery
instead).
Note that reader.lua doesn't currently handle multiple file/dir args, so
we could instead just look at the last arg and add pwd to that one.
Unfortunately doing this in POSIX sh isn't any simpler than processing
all args. :-)
(While at it, use `$PWD` which is required by POSIX to always be
present.)
Tested with bash 5.3.9, busybox 1.37.0 and dash 0.5.12.
- don't truncate version (stop removing arguably the most important part)
- add `macos` to the name to avoid confusion with other artifacts
- add deployment target too
Cf. koreader/kobase#2298.
The `linux` update target now build an AppImage too.
Other miscellaneous changes:
- AppImage:
* better icons
* update filename to conform to spec (`ApplicationName-$VERSION-$ARCH.AppImage`)
* running from extracted contents will behave like the Linux distribution (multi-user mode)
- Debian package:
* better icons
* update version to include git commit
* drop fakeroot requirement for building
* fix dependencies (based on our targeted Ubuntu LTS: 22.04, AKA Jammy)
- Linux distribution:
* better icons
* improved start-up script (can be symlinked to)
On some Onyx Boox devices, the SurfaceView surface is not recreated
after the rapid activity cycling that the Boox system performs on wake,
leaving android.app.window permanently nil. This caused a black screen
after font size change + sleep + wake.
The SurfaceView with setZOrderOnTop(true) was introduced for NGL4/Tolino
devices. The Onyx Qualcomm EPD API (View.refreshScreen) does not require
a SurfaceView — einkUpdate() already falls back to the DecorView content
view when no SurfaceView exists. Setting
OnyxEPDController.needsView()=false makes Onyx devices use
NativeActivity's default DecorView surface, which follows the standard
activity lifecycle and correctly survives wake.
Fixes#12445
- prior to #14719, `$KOREADER_DIR` was not part of the environment,
so an update relying on it without a restart from the parent
launcher would crash KOReader on startup
- pocketbook: fix check (`koreader.app` is located in `$KOREADER_DIR/..`)
- remarkable: ensure `$KOREADER_DIR` remain correct after relocalization
- Updated changelog with proper version & date.
- Updated description (based on common metadata)
- Removed duplicated files that are condensed in /usr/share/doc/koreader
Misc:
- make `frontend/device/devicelistener.lua` non executable
- make `plugins/terminal.koplugin/profile` executable