Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packaging/macosx/3_make_hb_darktable_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,24 @@ for dtSharedObj in $dtSharedObjDirs; do
cp -LR "$homebrewHome"/lib/"$dtSharedObj"/"$dtSharedObjVersion"/* "$dtResourcesDir"/lib/"$dtSharedObj"
done

# Add ONNX Runtime (for AI support)
if ! ls "$dtResourcesDir"/lib/darktable/libonnxruntime.*.dylib &>/dev/null \
&& ! ls "$dtResourcesDir"/lib/libonnxruntime.*.dylib &>/dev/null; then
ortLibDir=""
if [[ -d "$buildDir/_deps/onnxruntime/lib" ]]; then
ortLibDir="$buildDir/_deps/onnxruntime/lib"
elif [[ -d "../../src/external/onnxruntime/lib" ]]; then
ortLibDir="../../src/external/onnxruntime/lib"
fi
if [[ -n "$ortLibDir" ]]; then
echo "Installing ONNX Runtime from $ortLibDir"
ortDylib=$(find "$ortLibDir" -maxdepth 1 -name 'libonnxruntime.*.dylib' | head -1)
if [[ -n "$ortDylib" ]]; then
cp -L "$ortDylib" "$dtResourcesDir/lib/$(basename "$ortDylib")"
fi
fi
fi

# Add homebrew translations
dtTranslations="gtk30 gtk30-properties gtk-mac-integration iso_639-2 gphoto2 exiv2"
for dtTranslation in $dtTranslations; do
Expand Down
2 changes: 1 addition & 1 deletion src/ai/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ elseif(APPLE)
file(GLOB _ORT_DYLIB "${ONNXRuntime_LIB_DIR}/libonnxruntime.*.dylib")
if(_ORT_DYLIB)
install(FILES ${_ORT_DYLIB}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/darktable
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
elseif(WIN32)
Expand Down
Loading