Commit 13ed1c26 authored by Eriksson Monteiro's avatar Eriksson Monteiro

enable macos build

parent c458db90
......@@ -922,18 +922,34 @@ int BrowserMainLoop::CreateThreads() {
int BrowserMainLoop::CreateMillixNode() {
base::FilePath dir_exe = base::FilePath();
base::PathService::Get(base::DIR_EXE, &dir_exe);
LOG(INFO) << "running node from " << dir_exe.value().c_str();
base::LaunchOptions options;
options.current_directory = base::FilePath(L"./millix_node");
#if defined(OS_WIN)
options.current_directory = base::FilePath("./millix_node");
base::CommandLine millix_command_line(
base::FilePath(L"./millix_node/nodejs/node.exe"));
base::FilePath("./millix_node/nodejs/node.exe"));
millix_command_line.AppendArg(
"./nodejs/node_modules/@babel/node/bin/babel-node.js");
#else
options.current_directory = dir_exe.AppendASCII("millix_node");
base::CommandLine millix_command_line(
base::FilePath("./nodejs/bin/node"));
millix_command_line.AppendArg(
"./nodejs/lib/node_modules/@babel/node/bin/babel-node.js");
#endif
millix_command_line.AppendArg("index.js");
// --enable-logging --v=2
LOG(INFO) << "Starting millix node: " << millix_command_line.GetCommandLineString();
#if defined(OS_WIN)
options.inherit_mode = base::LaunchOptions::Inherit::kAll;
options.start_hidden = true;
millix_process_ = std::make_unique<base::Process>(base::LaunchProcess(millix_command_line.GetCommandLineString(), options));
#endif
millix_process_ = std::make_unique<base::Process>(base::LaunchProcess(millix_command_line, options));
if (!millix_process_->IsValid()) {
LOG(ERROR) << "Unable to run millix node " << millix_command_line.GetCommandLineString().c_str();
return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment