aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'libs/plugin_python/src/proxy')
-rw-r--r--libs/plugin_python/src/proxy/CMakeLists.txt6
-rw-r--r--libs/plugin_python/src/proxy/proxypython.cpp11
2 files changed, 9 insertions, 8 deletions
diff --git a/libs/plugin_python/src/proxy/CMakeLists.txt b/libs/plugin_python/src/proxy/CMakeLists.txt
index ed212a3..f7e6f31 100644
--- a/libs/plugin_python/src/proxy/CMakeLists.txt
+++ b/libs/plugin_python/src/proxy/CMakeLists.txt
@@ -96,19 +96,17 @@ if(NOT WIN32)
# Build-tree runtime layout expected by proxypython.cpp.
add_custom_command(TARGET proxy POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/src/src/plugins"
- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/src/src/plugins/dlls"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/src/src/plugins/libs"
- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/src/src/plugins/plugin_python/dlls"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/src/src/plugins/plugin_python/libs"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:proxy>"
"${CMAKE_BINARY_DIR}/src/src/plugins/$<TARGET_FILE_NAME:proxy>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:runner>"
- "${CMAKE_BINARY_DIR}/src/src/plugins/dlls/$<TARGET_FILE_NAME:runner>"
+ "${CMAKE_BINARY_DIR}/src/src/plugins/libs/$<TARGET_FILE_NAME:runner>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:runner>"
- "${CMAKE_BINARY_DIR}/src/src/plugins/plugin_python/dlls/$<TARGET_FILE_NAME:runner>"
+ "${CMAKE_BINARY_DIR}/src/src/plugins/plugin_python/libs/$<TARGET_FILE_NAME:runner>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:mobase>"
"${CMAKE_BINARY_DIR}/src/src/plugins/libs/$<TARGET_FILE_NAME:mobase>"
diff --git a/libs/plugin_python/src/proxy/proxypython.cpp b/libs/plugin_python/src/proxy/proxypython.cpp
index 0037991..6e4acad 100644
--- a/libs/plugin_python/src/proxy/proxypython.cpp
+++ b/libs/plugin_python/src/proxy/proxypython.cpp
@@ -139,12 +139,11 @@ bool ProxyPython::init(IOrganizer* moInfo)
// load the pythonrunner library, this is done in multiple steps:
//
- // 1. we set the dlls/ subfolder (from the plugin) as the DLL directory so Windows
- // will look for DLLs in it, this is required to find the Python and libffi DLL, but
- // also the runner DLL
+ // 1. On Windows, set the dlls/ subfolder as the DLL directory so Windows
+ // can find the Python, libffi, and runner DLLs.
//
- const auto dllPaths = pluginDataRoot / "dlls";
#ifdef _WIN32
+ const auto dllPaths = pluginDataRoot / "dlls";
if (SetDllDirectoryW(dllPaths.c_str()) == 0) {
DWORD error = ::GetLastError();
m_LoadFailure = FailureType::DLL_NOT_FOUND;
@@ -229,7 +228,11 @@ bool ProxyPython::init(IOrganizer* moInfo)
return true; // return true so the plugin stays loaded (shows diagnostic)
}
else {
+#ifdef _WIN32
m_Runner->addDllSearchPath(pluginDataRoot / "dlls");
+#else
+ m_Runner->addDllSearchPath(pluginDataRoot / "libs");
+#endif
}
return true;