Skip to content

Commit

Permalink
bitfocus: fix windows process launch
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jan 7, 2025
1 parent 7449895 commit b32534d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ static QString toNodePath(QString nodeVersion)
auto version = QDir{name}.dirName().split('.');
if(!version.isEmpty())
{
QString path = name + "/bin";
QString path = name;
#if defined(_WIN32)
path += "/node.exe";
#else
path += "/node";
path += "/bin/node";
#endif
node_path_cache["node" + version.front()] = path;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <ossia/detail/fmt.hpp>

#include <QDebug>
#include <QFile>
#include <QLocalSocket>

#include <stdio.h>
Expand Down Expand Up @@ -291,8 +292,8 @@ module_handler_base::module_handler_base(
genv.insert("NODE_CHANNEL_SERIALIZATION_MODE", "json");
genv.insert("NODE_CHANNEL_FD", "3");

std::string cmdline
= fmt::format("\"{}\" {}", node_path.toStdString(), entrypoint.toStdString());
std::string cmdline = fmt::format(
"\"{}\" {}", node_path.replace("/", "\\").toStdString(), entrypoint.toStdString());
handles->startProcess(cmdline, module_path.toStdString(), genv);
}

Expand Down

0 comments on commit b32534d

Please sign in to comment.