pgaskin / nickelhook Goto Github PK
View Code? Open in Web Editor NEWA library for creating mods for Kobo's eReader software, Nickel.
A library for creating mods for Kobo's eReader software, Nickel.
The failsafe works perfectly fine right now, but there's room for improvement. It would also be nice to be able to use the failsafe at times other than just startup.
I'm thinking of having an API like:
nh_failsafe_t *nh_failsafe_create(const char *fn, const char *fn_temp)
- creates a new failsafe for the specified filenh_failsafe_t *nh_failsafe_global()
- returns or creates the global instancenh_failsafe_claim_t nh_failsafe_claim(nh_failsafe_t*, int timeout)
- creates a claim with an optional timeout, activates the failsafe if it isn't active, and extends the it to remain active while the claim existsvoid nh_failsafe_release(nh_failsafe_t*, nh_failsafe_claim_t, int delay)
- releases a claim after an optional delayvoid nh_failsafe_trigger(nh_failsafe_t*)
- triggers the failsafe (works even when there aren't any claims)void nh_failsafe_uninstall(nh_failsafe_t*)
- deletes the temporary fileNH_FAILSAFE(failsafe, timeout, delay)
- macro to create a claim and use the GCC cleanup
attribute to release it when it goes out of scopeI noticed your little note regarding a versioning mechanism. Is it too early to discuss this? ๐
One option is to do something similar to what I prototyped in NDB. Another potential option might be some sort of external version file(s).
Ideally, a mod should be able to be included in a KoboRoot.tgz without fear of clobbering a newer version that is already installed.
Hi,
I have been struggling with this for a few days now - and I'm sure it's something trivial I am doing wrong, but I am frustrated.
I am having difficulties setting things up. I can correctly combine, and I can correctly edit the preload to get the library to load.
When I do I get the following error:
fatal: dlopen libnickel: libQtSolutions_IOCompressor-2.3.so.1: cannot open shared object file: No such file or directory
I can get past this by opening the files it throws for before the lib nickel is opened.
dlopen("/usr/local/Kobo/libQtSolutions_IOCompressor-2.3.so.1", RTLD_LAZY|RTLD_NODELETE);
dlopen("/usr/local/Kobo/libsunpinyin.so.3", RTLD_LAZY|RTLD_NODELETE);
dlopen("/usr/local/Kobo/librmsdk.so.1", RTLD_LAZY|RTLD_NODELETE);
It seems to then load, it informs me that the symbol has been replaced.
However, it seems to just keep loading itself over and over.
All I am currently doing is printing, and then returning the original implementation. Absolutely nothing is printed. I originally thought this might be a null or something similar, but I'd expect it to log before this happens.
https://gist.github.com/Podginator/8bb19abf009673abc8eb1cf9f19afe05
I am probably doing something wrong, but I have had similar issues trying to load the examples in kobo_mods, and NickelClock.
Any help is greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.