mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Clean up new host process launching
This commit is contained in:
@@ -617,12 +617,12 @@ void PluginBridge::launch_vst_host() {
|
|||||||
// TODO: Connect to and launch group host processes
|
// TODO: Connect to and launch group host processes
|
||||||
|
|
||||||
#ifndef USE_WINEDBG
|
#ifndef USE_WINEDBG
|
||||||
std::vector<std::string> args{vst_host_path.string()};
|
std::vector<std::string> host_command{vst_host_path.string()};
|
||||||
#else
|
#else
|
||||||
// This is set up for KDE Plasma. Other desktop environments and window
|
// This is set up for KDE Plasma. Other desktop environments and window
|
||||||
// managers require some slight modifications to spawn a detached terminal
|
// managers require some slight modifications to spawn a detached terminal
|
||||||
// emulator.
|
// emulator.
|
||||||
std::vector<std::string> args{"/usr/bin/kstart5",
|
std::vector<std::string> host_command{"/usr/bin/kstart5",
|
||||||
"konsole",
|
"konsole",
|
||||||
"--",
|
"--",
|
||||||
"-e",
|
"-e",
|
||||||
@@ -632,23 +632,23 @@ void PluginBridge::launch_vst_host() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_WINEDBG
|
#ifndef USE_WINEDBG
|
||||||
args.push_back(vst_plugin_path.string());
|
const fs::path plugin_path = vst_plugin_path;
|
||||||
const fs::path starting_dir = fs::current_path();
|
const fs::path starting_dir = fs::current_path();
|
||||||
#else
|
#else
|
||||||
// winedbg has no reliable way to escape spaces, so we'll start the process
|
// winedbg has no reliable way to escape spaces, so we'll start the process
|
||||||
// in the plugin's directory
|
// in the plugin's directory
|
||||||
args.push_back(vst_plugin_path.filename().string());
|
const fs::path plugin_path = vst_plugin_path.filename();
|
||||||
const fs::path starting_dir = vst_plugin_path.parent_path();
|
const fs::path starting_dir = vst_plugin_path.parent_path();
|
||||||
|
|
||||||
if (vst_plugin_path.filename().string().find(' ') != std::string::npos) {
|
if (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
|
||||||
|
const fs::path socket_path = socket_endpoint.path();
|
||||||
args.push_back(socket_endpoint.path());
|
|
||||||
|
|
||||||
vst_host =
|
vst_host =
|
||||||
bp::child(args, bp::env = set_wineprefix(), bp::std_out = wine_stdout,
|
bp::child(host_command, plugin_path, socket_path,
|
||||||
|
bp::env = set_wineprefix(), bp::std_out = wine_stdout,
|
||||||
bp::std_err = wine_stderr, bp::start_dir = starting_dir);
|
bp::std_err = wine_stderr, bp::start_dir = starting_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user