The old AlfCrypto DLL, SO and DYLIB files are ancient,
I don't have the systems to recompile them all, they
cause issues on ARM Macs, and I doubt with all the Python
improvements over the last years that they have a significant
performance advantage. And even if that's the case, nobody is
importing hundreds of DRM books at the same time so it shouldn't
hurt if some decryptions might take a bit longer.
This allows us to clean up the code a lot.
On Windows, it isn't installed by default and
most of the time not be found at all.
On M1 Macs, the kernel will kill the process instead.
Closes#33.
The Kobo Desktop program will (when running under Wine on Linux) put all
of its data in the current working directory. This means that there
may be more than one Kobo.sqlite floating around by the user, which
leads to Obok showing an outdated list of books and the user being
confused by Obok cannot find the full list of books.
Solving this completely appears to be a bit too complicated, so this
patch is a best-effort improvement for the worst cases which can be
caused by this:
1. If the user deletes the files but Obok has already cached the path,
previously Obok would just error out rather than trying to search
for a new Kobo.sqlite path and updating the cache.
2. We search $HOME before searching /, which speeds up initial usage of
Obok in the common case (usually Kobo Desktop will be installed in
~/.wine/drive_c) and also ensures that we correctly preference the
current user's Kobo Desktop installation.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>