Skip to content

Commit

Permalink
- fix warnings on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Hart committed Nov 8, 2024
1 parent db04474 commit bab0acf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
6 changes: 6 additions & 0 deletions hi_tools/hi_neural/onnx_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ ONNXLoader::ONNXLoader(const String& rootDir):
{
auto dllFile = File(rootDir);

#if JUCE_DEBUG
#if JUCE_WINDOWS
dllFile = dllFile.getChildFile("Builds/VisualStudio2022/x64/Debug/Dynamic Library");
#else
dllFile = dllFile.getChildFile("Builds/MacOSX/build/Debug");
#endif
#endif

#if JUCE_WINDOWS
dllFile = dllFile.getChildFile("onnx_hise_library.dll");
Expand Down
6 changes: 2 additions & 4 deletions hi_tools/hi_standalone_components/AdvancedCodeEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ struct TextEditorWithAutocompleteComponent: public Timer,

struct LookAndFeelMethods
{
virtual ~LookAndFeelMethods() {};

virtual void drawAutocompleteBackground(Graphics& g, TextEditor& te, Rectangle<float> b, const StringArray& itemToShow, int selectedIndex)
{
b = b.reduced(10.0f);
Expand All @@ -102,12 +104,8 @@ struct TextEditorWithAutocompleteComponent: public Timer,
g.setColour(Colours::white.withAlpha(0.3f));
g.drawRoundedRectangle(b, 5.0f, 2.0f);



b.reduced(5.0f);
b.removeFromLeft(10.0f);


b.removeFromTop(2.5f);

g.setFont(te.getFont());
Expand Down
4 changes: 2 additions & 2 deletions hi_tools/hi_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ using ComponentWithMiddleMouseDrag = juce::Component;
#include "hi_neural/hi_neural.h"
#endif

#include "hi_neural/onnx_loader.h";
#include "hi_neural/onnx_loader.h"

#if !HISE_NO_GUI_TOOLS

Expand All @@ -311,4 +311,4 @@ using ComponentWithMiddleMouseDrag = juce::Component;

#if !HISE_NO_GUI_TOOLS
#include "hi_multipage/multipage.h"
#endif
#endif
11 changes: 8 additions & 3 deletions tools/onnx_lib/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

This project will build a dynamic library that wraps the ONNX runtime and can be loaded dynamically (the official ONNX runtime release needs to be linked dynamically).

For now I won't include the compiled library so you have to build it yourself if you want to use that feature...
For now I won't include the compiled library so you have to build it yourself if you want to use that feature, but this might change in the future.

## Build instructions

Download the static library builds from [here](https://github.com/csukuangfj/onnxruntime-libs/releases) and move the static library files into `Source/lib/Debug/` / `Source/lib/Release/` then open the projucer project and compile the dynamic libraries.
Download the static library builds from [here](https://github.com/csukuangfj/onnxruntime-libs/releases) and move:

> Note that on macOS you might have to use an older release because of some weird C++ library errors. [That](https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.3/onnxruntime-osx-universal2-static_lib-1.17.3.zip) one worked for me (Universal binary)
- the static library files into `Source/lib/Debug/` / `Source/lib/Release/`
- the include directory to `Source/include`

then open the projucer project and compile the dynamic libraries.

> Note that on macOS you might have to use an older release because of some weird C++ library errors. [That](https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.17.3/onnxruntime-osx-universal2-static_lib-1.17.3.zip) one worked for me (Universal binary).
If all went through fine, put the `.dll` / `.dylib` file into the this directory so that will be picked up by HISE.

Expand Down

0 comments on commit bab0acf

Please sign in to comment.