Closed mattjlewis closed 2 years ago
Is that related to #207 ?
Yes. I initially removed the call to AnsiConole.systemInstall as I primarily run my apps on Linux which don't need this (AnsiConsole.systemInstall() fails on ARMv6). However, I have recently been running some applications from within my IDE (Eclipse) and was annoyed to see the control characters. I now do this:
// Attempt to initialise Jansi
try {
AnsiConsole.systemInstall();
} catch (Throwable t) {
// Ignore
Logger.trace(t, "Jansi native library not available on this platform: {}", t);
}
BTW I have setup Docker based compilation for diozero that supports x86, ARMv6, ARMv7 and AArch64 - I basically compile GCC 8 for ARMv6 and use standard tools for the rest. https://github.com/mattjlewis/diozero/tree/main/docker
Is it possible for jansi to fail gracefully if the native library fails to load? I.e. ignore any colour output requests and output plain text instead.