* Modernize jit syntax
It's built-in, no need for a require anymore.
* Flag Android should_restrict_JIT again
It's mildly helpful at putting off the inevitable.
(very, very, very, very mildly).
* Bump android-luajit-launcher
https://github.com/koreader/android-luajit-launcher/pull/281
That way images can be made to work in a more generic, portable manner, such as:
```
return function(html, dict_path)
html = html:gsub('<rref[^>]*>([^<]*%.jpg)</rref>', '<img src="'..dict_path..'res/%1">')
return html
end
```
Cf. <https://github.com/koreader/koreader/issues/6056>.
* Don't paint invisible background-colored rounded corners
Made obvious when testing #7042
* Only enforce a highlight radius on buttons that don't already set a
custom one ;).
(Mostly, square buttons with a 0 radius ^^).
ffi/blitbuffer already handles radius being nil, which suits us just fine
:)
Avoid opening two connections in //, by feeding the current connection
to saveSetting, like we were already doing for loadSettings...
It somehow worked just fine on Kobo/Emu, but blew up in fun and
interesting ways on Kindle, probably because of the Fuse proxy.
It was still pretty dumb nonetheless.
* Comment the brew shenanigans
(And support non-standard brew prefixes, just in case)
* Bump base to pickup https://github.com/koreader/koreader-base/pull/1260
* Handle libsodium, too
Co-authored-by: Martín Fernández <paziusss@gmail.com>
* Implement proper alpha-blending of SVG icons
Also, instead of doing that every time, cache a pre-composited version
that matches the screen's BB type.
This is faster, and also has the advantage of making icon highlights
behave.
Jot down a few notes about corner-cases or future improvements, e.g.,
dimming icons on non-white backgrounds, and nightmode with color icons.
- Add IconWidget, use it for icons instead of ImageWidget.
Specify icons by name only, look for them (with either
.svg or .png suffixes) in multiple directories (including
koreader/settings/icons/ to allow customizing them).
Don't crash when icon name not found, shown a black
background warning icon instead.
- Don't trust the icons' native sizes: replace
scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE,
so all icons get the same (tunable) size - except in
a few specific use cases.
- Top and bottom menu bars: normalize, and have icons
properly centered in them, extend vertical line
separators up to the edges.
- TOC: adjust expand/collapse icons size to items size
The theme is a lighter, simpler line-based theme.
Many are based on MaterialDesignLight or MaterialDesign
by Austin Andrews (Templarian).
As of this commit, no SVG are actually used, they will be
integrated in future commits.
* BookInfoManager:
* Use ZSTD instead of zlib to compress thumbnails, because zlib is the absolute worst in terms of performance nowadays.
Like in CRe, slightly smaller DB, slightly faster compression, hilariously faster decompression.
* Also revamps the schema a tiny bit following recent discussions:
* Added `filesize`, `filemtime` columns, and split `series` into `series` and `series_index`.
* Made the DB migration slightly less harsh (i.e., preserve settings, and a bit of visual feedbad).
* A few `__gc` metamethod tweaks as mentioned in base.
os.exit.
This ensures a saner teardown of the Lua state, which is mildly helpful
when instrumenting a run...
(e.g., there's a final GC cycle, among other things).
* Avoid the Lua string copies when compressing/uncompressing the bb
thumbs
* Delay the statement reset so that the pointer returned by the BLOB
query is actually usable ;).
* Re-use a ZSTD decompression context
* Store date & mtime for successfully extracted documents
c.f., 10477501f9 (r44914917)
* Switch to user_version pragma to handle DB schema versioning
* Update file size/date on *each* extraction attempt.
@poirez-z raised a good point, this ought to be useful to deem a file
re-parseable after an update.
* Remove xutil
Functionality has been moved to ffi/zlib & ffi/zstd
* Preserve settings when migrating the BookInfo DB
* Warn via InfoMessage that the DB was updated
* Only store the series name in series, and move the index in series_index
(Column names chosen to match Calibre's).
* Handle the new series_index column in BookInfo consumers
* This allows us to get rid of the code that stripped empty decimals
from series index in *most* places, since it's now a real Lua
number, and the string formatting library does that magic on its
own.
* stride is now a size_t
On some platforms, that's 64 bits, which means it's no longer
automatically converted to a Lua number to avoid precision loss.
Do that ourselves, because lua-serialize doesn't know how to handle an
uint64_t cdata ;).
* Update log android to match the current issue template
* Fix GUI gdb frontends getting wrecked by the older glib library we ship w/
KOReader
* Slightly more aggressive valgrind defaults
It's slower, but interpreting results without leak-check=full ends up
costing more time than just running with it.
* Add a callgrind shortcut
* Use getopt instead of a hand-rolled hack for option parsing
* Make it clearer that complex args should be quoted
* Document prompt
* Add a Valgrind suppression file for libdrm/mesa on AMD hardware
Because mesa/libdrm isn't built w/ -D valgrind=enabled on Gentoo,
and Valgrind is very much not happy with mesa ;p.
* Allow toggling reader.lua's sane return mode
(Enabled automatically under gdb/valgrind).
Should hopefully weed out some noise from valgrind reports.
* Propagate reader.lua's return code
* Sim a few other common devices
* Handle assigning values to short options with an equal instead of a space, like the previous solution
(This is purely for backward compatibility purposes, this is a syntax that'd fail with the C getopt, too).
* Add gnu-getopt to the build requirement on macOS, because of course everything is terrible.