10-30-2018, 01:08 PM | #106 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@jackie_w:
I may have skimmed the code a wee bit too fast... * Yeah, it only writes the state to the config if retainStateOverRestart is enabled in the [state] section... :/. * I may have totally missed how the parser handled ini sections... . i.e., the test should probably be grep -q "invertActive = yes", since state is the section, so, a [state] header, and not a state: prefix like it's handled in the code. ---- Random comment: since here, both -C & -B are passed, one could also simply invert the arguments instead of using -h . (Not that there's anything wrong with -h: I checked ). Last edited by NiLuJe; 10-30-2018 at 01:13 PM. |
10-30-2018, 01:18 PM | #107 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
I'll try the other suggestions. |
|
Advert | |
|
10-30-2018, 01:50 PM | #108 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Absolutely. I now understand why. My FT only came with a shared library, so I can't compile with -static anyway. |
|
10-30-2018, 02:06 PM | #109 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP: I ended up bundling the static one because that's how the Kindle version is built, so, more practical for me ;p.
-lfbink *will* pickup the static library if that's the only one there (it prefers shared libs, but that's it). Conversely, -l:libfbink.a will *only* pickup the static library, even if the shared one is present in the search paths . |
10-30-2018, 02:17 PM | #110 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
@NiLuJe, I understand that
but a shared compile expectedly gives Code:
[root@kindle tcc]# tcc -Iinclude -Iinclude/freetype2/freetype -Iinclude/freetype2 -Iinclude/fbink -L/mnt/us/linkfonts/lib/autohint -lfreetype -L/mnt/us/usbnet/bin -lfbink -o fbinkpantspatrol fbinkpantspatrol.c tcc: undefined symbol 'fbink_init' tcc: undefined symbol 'fbink_print_raw_data' Code:
[root@kindle tcc]# tcc -Iinclude -Iinclude/freetype2/freetype -Iinclude/freetype2 -Iinclude/fbink -L/mnt/us/linkfonts/lib/autohint -lfreetype -L/mnt/us/usbnet/bin -lfbink -static -o fbinkpantspatrol fbinkpantspatrol.c
tcc: cannot find -lfreetype
Last edited by PoP; 10-30-2018 at 02:19 PM. Reason: j -> J |
Advert | |
|
10-30-2018, 02:21 PM | #111 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP:
1. There's a very strong possibility poor TCC doesn't know how to deal with LTO objects in the static library . 2. Never pass -static to anything, anywhere, ever ^^. -static ranges from evil to actively broken when using the glibc. It's only useful in very, very, very specific circumstances (generally, when you're static linking to an alternate libc that's designed for that, f.g., musl). Last edited by NiLuJe; 10-30-2018 at 02:47 PM. |
10-30-2018, 02:36 PM | #112 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,002
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
|
|
10-30-2018, 02:46 PM | #113 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP: Switched to a shared lib.
In any case, it's smaller, so, eh, I'll consider that a win-win . (You'll need some rpath shenanigans when compiling, or some LD_LIBRARY_PATH shenanigans when running, to properly pickup the libs at runtime ). EDIT: And on the off-chance a recent build of TCC helps, here goes. Last edited by NiLuJe; 09-04-2019 at 08:30 AM. Reason: Bump to 09/03/19 |
10-30-2018, 03:35 PM | #114 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
However, when NightMode rewrites nightmode.ini, the format of the line changes slightly. Original .ini: Code:
[state] invertActive = no # yes / no Code:
[state] invertActive = no Code:
if grep -Eq "invertActive\s*=\s*yes" "/mnt/onboard/.kobo/nightmode.ini" ; then |
|
10-30-2018, 04:03 PM | #115 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I'll have to double-check what the busybox version of grep bundled on the Kobo supports, exactly, and I'll get back to you (dinner time), but, yeah, the idea'll be to ignore the whitespace, thanks for the config excerpt, that's what I was missing ^^.
|
10-30-2018, 05:20 PM | #116 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@jackie_w: Yep, that works!
(I always forgot what the backslash character classes refer to, so I tend to go with [[:blank:]] instead, but, yeah, \s matches a whitespace, so, that does the trick ). |
10-30-2018, 05:35 PM | #117 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Maybe I didn't need the grep -Eq because your original grep -q seems to work fine. I didn't realise that grep understood regex patterns by default. |
|
10-30-2018, 05:44 PM | #118 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@jackie_w: There's a quirk involved in that it understands a specific syntax/subset of regex by default, while -E enables another syntax with more features .
And no, I can never remember which is which, so, I tend to bring out the big guns by default ;p. |
10-30-2018, 05:48 PM | #119 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I think \s* is about as basic as regex gets so I'll document it with the simpler -q option.
|
11-02-2018, 03:36 PM | #120 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.8.0!
A fairly juicy release, since it introduces OpenType/TrueType rendering, thanks to @sherman's work! It also fixes a stupid bug that broke everything on the black K4, as well as implementing the fgless mode discussed earlier . |
Tags |
eips, fbink |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FBInk: A small tool/library to print crap on your screen! | NiLuJe | Kobo Developer's Corner | 282 | 04-22-2024 02:51 AM |
Small print | Broadback | Conversion | 12 | 12-12-2011 02:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 03:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 09:02 AM |