Update to the latest Platform::CreateProcess

This commit is contained in:
Wojtek Figat
2023-03-22 14:18:52 +01:00
parent c31e4023c4
commit 7d4bf8356e
11 changed files with 103 additions and 32 deletions

View File

@@ -9,6 +9,7 @@
#include "Engine/Engine/Globals.h"
#include "Engine/Core/Collections/Sorting.h"
#include "Engine/Platform/File.h"
#include "Engine/Platform/CreateProcessSettings.h"
#include "Engine/Serialization/Json.h"
#if PLATFORM_WINDOWS
@@ -242,8 +243,14 @@ void RiderCodeEditor::OpenFile(const String& path, int32 line)
// Open file
line = line > 0 ? line : 1;
const String args = String::Format(TEXT("\"{0}\" --line {2} \"{1}\""), _solutionPath, path, line);
Platform::StartProcess(_execPath, args, StringView::Empty);
CreateProcessSettings procSettings;
procSettings.FileName = _execPath;
procSettings.Arguments = String::Format(TEXT("\"{0}\" --line {2} \"{1}\""), _solutionPath, path, line);
procSettings.HiddenWindow = false;
procSettings.WaitForEnd = false;
procSettings.LogOutput = false;
procSettings.ShellExecute = true;
Platform::CreateProcess(procSettings);
}
void RiderCodeEditor::OpenSolution()
@@ -255,8 +262,14 @@ void RiderCodeEditor::OpenSolution()
}
// Open solution
const String args = String::Format(TEXT("\"{0}\""), _solutionPath);
Platform::StartProcess(_execPath, args, StringView::Empty);
CreateProcessSettings procSettings;
procSettings.FileName = _execPath;
procSettings.Arguments = String::Format(TEXT("\"{0}\""), _solutionPath);
procSettings.HiddenWindow = false;
procSettings.WaitForEnd = false;
procSettings.LogOutput = false;
procSettings.ShellExecute = true;
Platform::CreateProcess(procSettings);
}
void RiderCodeEditor::OnFileAdded(const String& path)