Fix the with-winedbg option

This commit is contained in:
Robbert van der Helm
2020-12-10 19:16:53 +01:00
parent 4a056dcd31
commit aae98d518c
+17 -14
View File
@@ -93,25 +93,27 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
host_path(find_vst_host(plugin_info.native_library_path, host_path(find_vst_host(plugin_info.native_library_path,
plugin_info.plugin_arch, plugin_info.plugin_arch,
false)), false)),
host(launch_host(host_path, host(launch_host(
plugin_type_to_string(host_request.plugin_type), host_path,
plugin_type_to_string(host_request.plugin_type),
#ifdef WITH_WINEDBG #ifdef WITH_WINEDBG
host_request.plugin_path.filename(), plugin_info.windows_plugin_path.filename(),
#else #else
host_request.plugin_path, host_request.plugin_path,
#endif #endif
host_request.endpoint_base_dir, host_request.endpoint_base_dir,
bp::env = plugin_info.create_host_env(), bp::env = plugin_info.create_host_env(),
bp::std_out = stdout_pipe, bp::std_out = stdout_pipe,
bp::std_err = stderr_pipe bp::std_err = stderr_pipe
#ifdef WITH_WINEDBG #ifdef WITH_WINEDBG
, // winedbg has no reliable way to escape spaces, so , // winedbg has no reliable way to escape spaces, so
// we'll start the process in the plugin's directory // we'll start the process in the plugin's directory
bp::start_dir = plugin_path.parent_path() bp::start_dir = plugin_info.windows_plugin_path.parent_path()
#endif #endif
)) { )) {
#ifdef WITH_WINEDBG #ifdef WITH_WINEDBG
if (plugin_path.filename().string().find(' ') != std::string::npos) { if (plugin_info.windows_plugin_path.filename().string().find(' ') !=
std::string::npos) {
logger.log("Warning: winedbg does not support paths containing spaces"); logger.log("Warning: winedbg does not support paths containing spaces");
} }
#endif #endif
@@ -143,7 +145,8 @@ GroupHost::GroupHost(boost::asio::io_context& io_context,
true)), true)),
sockets(sockets) { sockets(sockets) {
#ifdef WITH_WINEDBG #ifdef WITH_WINEDBG
if (plugin_path.string().find(' ') != std::string::npos) { if (plugin_info.windows_plugin_path.string().find(' ') !=
std::string::npos) {
logger.log("Warning: winedbg does not support paths containing spaces"); logger.log("Warning: winedbg does not support paths containing spaces");
} }
#endif #endif