Commit Graph

78 Commits (master)

Author SHA1 Message Date
NiLuJe 0f194d88b9 OTAManager: Slightly less cryptic error on connectivity issues
(On either end).

Re: #11258
4 months ago
Benoit Pierre d4421130f8
otamanager: fix OTA model name for Android x86_64 (#10997) 7 months ago
Martín Fernández 5336e2f11d
[ota]: deprecation check & notice (#10639) 10 months ago
Frans de Jonge 1faf0a1786 OTAManager: pick the right binaries on Android x86_64 1 year ago
Frans de Jonge c713df1dc7 OTAManager: pick the right binaries on Android aarch64 (arm64) 1 year ago
NiLuJe 92ebed577b OTAManager: Pick the right binaries on Kindles running on the Bellatrix
platform

Re: https://github.com/koreader/koreader/pull/4539#issuecomment-1411707712
1 year ago
zwim 4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 2 years ago
NiLuJe 83a2965d6b
Misc: Unify error logging on network errors (#9523)
Making sure we get the relevant information in the logs, and that the UI feedback (if any), is meaningful and readable.
2 years ago
zwim 617bb896f9
OTAManager: Check for update -> immediately show hourglass (#9083) 2 years ago
Frans de Jonge 19a607b548
[i18n] Add context to "Update" (#8519)
In response to the comment by @ilyats on Weblate:

> Text appears in code twice, as menu item and as dialog button label. Ideally, translations should be different.
2 years ago
Evan Boehs 9bb6b70c7a
Check for update → Check for updates (#8027) 3 years ago
Martín Fdez ffd5b88c87 warn before downgrading APK. Prompt for download in the browser to get a notification 3 years ago
Martín Fdez 23b7bfe0ce move android specific bits outside OTAManager 3 years ago
Martín Fernández 939fcf7f0e
android: avoid downloading the APK again if there's one download in progress + fix signature error (#7657) 3 years ago
Martín Fernández d303fdf694
android: Prompt for install updates when they're downloaded (#7632) 3 years ago
NiLuJe 2f9db25969
Unify LuaSocket usage (#7405)
* Add a new socketutil module with a few helper functions that allow us to:
  * Always use a sane User-Agent (previously, only Wikipedia did so)
  * Set timeouts in an almost sane manner. Doing it explicitly prevents an interaction with KOSync that does crazy stuff I don't even want to try to understand.
* Unified said timeouts based on the request's intended usage (except for Wikipedia, which already had meaningful timeout values).
* Stopped using LuaSec directly, LuaSocket defers to LuaSec sanely on its own. Everything now transparently supports HTTPS without code duplication.
3 years ago
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