NeuralNote icon indicating copy to clipboard operation
NeuralNote copied to clipboard

Linux support

Open polygon opened this issue 8 months ago • 3 comments

I've made NeuralNote build under Linux and was wondering if there is interest to upstream the changes. This PR would be the first step and contains the required changes to the code and the build system. The changes I was doing are:

  • Remove LTO when building for Linux as it was causing undefined reference issues
  • Refactor font loading into a singleton class to circumvent the "static initialization catastrophe" which seems to happen only under Linux since JUCE tries to read the fonts.conf XML file and the XML parser will use certain static strings that are not initialized at that time. I've written more about this here: https://github.com/DamRsn/NeuralNote/issues/33#issuecomment-1783775194
  • Create folder for NeuralNote inside the received temporary directory since NeuralNote would try to erase the whole /tmp directory otherwise, usually taking some temp-files of other applications with it

This change also requires an accompanying change to libonnxruntime-neuralnote to get a Linux build there which I have also available. But first wanted to start here to gauge interest in something like this.

There is another issue with external Drag&Drop not working properly in Linux. This seems to be a JUCE issue and I have a workaround available. But since this requires patching the external JUCE dependency I think that would probably be more suitable to put into the build scripts. Also, it's not strictly required for a Linux build.

Edit: Link to patched libonnxruntime-neuralnote: https://github.com/polygon/libonnxruntime-neuralnote/tree/linux

polygon avatar Nov 01 '23 09:11 polygon