Commit Graph

62 Commits (37a01100b7a4733ae26871c4d929114aff8ea143)

Author SHA1 Message Date
NiLuJe 37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
4 years ago
yparitcher 70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
4 years ago
NiLuJe de15ab3a87
Unbreak OTA on crappy shells (#5850)
* Unbreak OTA on crappy shells

  Very, very old ash versions abort on set -o failures (as mandated by
POSIX, granted). This makes it impossible to reliably catch failures in
a single step.

So do it from the Lua side instead.

Should fix #5844

* Launch the zsync wrapper through bash on Cervantes
4 years ago
NiLuJe 73659b6bd6
Print zsync2's output on screen (#5824)
* Also remove the temporary files when doing a full retry
* Bump base
  Pickup the required zsync2/FBInk updates
  (https://github.com/koreader/koreader-base/pull/1038)
* Actually does what it says on the tin for Abort
  i.e., cleanup temporary files
4 years ago
Martín Fernández 67627ce2d9
Remarkable port (#5828)
Touchscreen is mirrored in X & Y and has a different resolution from the eink panel.

Uses systemd for time/date/suspend/poweroff/reboot
Two systemd units for platform integration. button-listen is a very
simple launcher.
to-do: add support for wifi by implementing  a wpa supplicant dbus client.

Authored-by: Thomas Spurden <tcrs@users.noreply.github.com>
4 years ago
NiLuJe 9a20fb5836
Switch to zsync2 (#5810)
* Switch to zsync2

Requires https://github.com/koreader/koreader-base/pull/1036

* Simplify FBInk syntax

The weird-ass workarounds for -s's subopts handling are
no longer needed w/ FBInk >= 1.21.0

* Update base

* Re-enable HW dithering on Kindle
  (https://github.com/koreader/koreader-base/pull/1034)
* Update SQLite to 3.31.1
  (https://github.com/koreader/koreader-base/pull/1035)
* reMarkable port
  (https://github.com/koreader/koreader-base/pull/1023)
* zsync2
  (https://github.com/koreader/koreader-base/pull/1036)

* zsync2 means we can finally have nice things

(OpenStack backed storage)

* We also no longer need that insane workaround on ARM

* And comment out @chrox's mirror, which appears to be down.

* Warn that a malformed URL will horribly blow up in fun and interesting
ways
4 years ago
Martín Fernández 51ed411ee4 android: OTA fallback using the browser
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
4 years ago
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
4 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Robert 3a4ac1964c [UX] Offer to restart KOReader after update (#5150)
Adding the option to restart KOReader after update.
Close: #5144
5 years ago
Frans de Jonge b1ed2838c8
[UX] Add Device:openLink() stub for Linux SDL (#4822)
References #4821.
5 years ago
Frans de Jonge 6ddba11392
[UX] Alternative update message when ota_version < local_version (#4661)
See https://github.com/koreader/koreader/issues/4650#issuecomment-466965983 and https://github.com/koreader/koreader/pull/4661#issuecomment-467088984
5 years ago
Martín Fernández 0532d7a507 [Android] (re)enable update downloads using full apks (#4639) 5 years ago
Frans de Jonge 8e5c1addf5
[feat] Update check (#4620)
The concept is quite simple: stick a file on the OTA server named
something like `koreader-appimage-latest-stable` (by analogy with
`koreader-cervantes-latest-stable.zsync`), which contains nothing
but a filename.

The difference with the zsync update is that the link is then launched
in the user's browser (AppImage) or DownloadManager (Android, not yet
implemented).

* Android hasOTAUpdate = no for the moment
5 years ago
NiLuJe 27b6c1546a [fix, Kindle] Fix i.MX 6/7 detection pattern (#4539)
Some variants have a space before the number, others don't :/.

Followup to #4475
5 years ago
NiLuJe e1cb983cec Point the Kindle 4 to non-legacy OTAs
It uses the same CPU as a Kindle Touch ;).
5 years ago
NiLuJe 6ed66384c8 Properly point Kindle PW2+ to the PW2+ OTAs
Re #4497
5 years ago
NiLuJe 92b8d70342 [fix] If zsync eats dirt during an OTA update, allow to fallback to a full download (#4438)
* On zsync delta failure, offer to retry OTA update with a full download

Fix #4429

* Bring the "this may take a while" popup back up before full DL

Don't rebuild the local tarball for a full dl, we're ignoring it anyway
;)

Co-Authored-By: NiLuJe <ninuje@gmail.com>
5 years ago
Frans de Jonge a9964309ac
[Android] OTA: Differentiate architectures (#4402)
This seems like a good thing to have. However, Android OTA seems to be broken due to some permission issue.
5 years ago
Martín Fernández 1e69fae7bc [feat] Add support for BQ/Fnac devices (#4294)
Adds support for devices found in https://blog.bq.com/es/bq-ereaders-developers-program/. Tested on BQ Cervantes 4 (last BQ device from 2017).

It adds a new touch input event handler (discussed in #4275) which should work on other single touch devices (ie: Kobo Touch, Mini, Glo, Aura HD) but wasn't tested.

Includes base bump with: [feat] Add BQ/Fnac device support (https://github.com/koreader/koreader-base/pull/745)
6 years ago
Martín Fernández b8d95984d1 [UX] Show OTA updates only on supported devices (#4256) 6 years ago
NiLuJe ababbd7aad
Enhanced visual feedback around tar & zsync! (#4194)
* Move Kindle scripts to FBInk
* Proper progress bars around tar invocations
* Spinner during zsync processing
6 years ago
NiLuJe d222fe25b6
Fix OTAManager tar invocations (#4150)
* Bump base

* Fix tar flag ordering in OTAManager

So that no-recursion actually gets honored, preventing us from creating
extra-large archives with unrelated content...
(Tar started being pickier about flag ordering in a recent version bump).

Fix #4147
Closes #4148 (by superceding it)
6 years ago
NiLuJe 4ffd959df4
Handle OTA updates during the restart loop on Kobo/Kindle (#4049)
* Handle OTA updates during the restart loop on Kobo/Kindle

So we can actually process OTA updates without ever truly exiting
KOReader (i.e., via the "Restart KOReader" menu entry) ;).
6 years ago
NiLuJe 8089d916a5
Visual feedback around tar/zsync on Kobo during OTA updates (#4043)
* With a bonus version normalizer fix.
  * And a zsync bump/fix to avoid softlocks with OpenStack HTTP frontends (also, pull those from the OTA mirror list).
6 years ago
NiLuJe 3cc9313cc6 Update OTA mirrors (#3901)
Drop outdated mirror
Relocate mine, and give them actually accurate name given their location
6 years ago
Qingping Hou 6f037cec30 ota(fix): do not create 0 size installed file if index is missing 7 years ago
Frans de Jonge 89099e2c94 Swipe for menu and quickstart guide (#2761)
* Swipe for menu and quickstart guide

Because swiping for the menu is a big change from what we're used to, this commit includes a new quickstart guide.

Fixes #2608.

* add some dev docs
* add FileConverter spec
* add QuickStart spec
* add Version module
* add Version spec
7 years ago
Frans de Jonge 0256601e85 UX and language fixes
* lang: changed `...` in CloudStorage to real ellipses
* chore: reordered requires in CloudStorage per coding style
* UX: switched "Close" and "Stay alive" in KeepAlive per UX style
* lang: improved message in CloudStorage
* chore: reordered requires in OTAManager per coding style
* lang: removed "your" from "Your KOReader is up to date" in OTAManager
7 years ago
Frans de Jonge 1c25d0fd1b Language: improve confirmboxes
Generic "OK" buttons should be avoided. Thanks to @lightonflux for pointing this out https://github.com/koreader/koreader/issues/2555#issuecomment-291039945
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
retrue eae730d140 Some uppercase fixes (#2421) 7 years ago
Qingping Hou bd43e59fe7 fix: disable network info menu when device is not connected 8 years ago
Qingping Hou 8ff05707d2 ota: support legacy kindle devices 8 years ago
Qingping Hou d6aa3b9c8c ota: add new default server 8 years ago
Qingping Hou 20eb36a03d feat: add network management UI for kobo 8 years ago
Allan Nordhøy bc16ed5035 Spelling of calibre and KOReader. Ellipsis. 8 years ago
chrox 3a9cb659d1 add OTA update on Android 8 years ago
NiLuJe a4137fd8a6 Add a bunch of OTA mirrors...
With much better peerings & bandwidth than my fallback.
-eu is in Central Europe
-af is in Western Europe
-na is in North America
8 years ago
Qingping Hou 3c647ff244 minor: various luacheck fixes 8 years ago
chrox a60544b1ad Koreader Ubuntu-touch port
Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
9 years ago
chrox fdc56f39a3 Show OTA channel info when package is unavailable
so that users could be aware that there is other channels to check.
9 years ago
chrox 3f691bab93 add stable OTA channel
This should fix #1353.
9 years ago
chrox c11a2bbf1e fix ota update for PocketBook 9 years ago
chrox b403a45228 fix OTA server broken on checking stable release 10 years ago
Frans de Jonge 66f04af8fb Various applications of util.template
This is the first bunch for #1276. I'd like to resolve #1281 before doing more.
10 years ago
chrox 111ad02143 fix #1154
And koreader release version is normalized to a 10 digits containing
a four digits year field followed by a two digits month field followed
by a four digits revision field like "2014041079".
10 years ago
Frans de Jonge ff4e2f3458 Minor English improvements. 10 years ago
chrox befa3aa63c normalize version when checking packages in OTA manager
This fixes a bug that version 987 was treated newer than version 1010.
10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago