Process launcher updates (#6183)
* Enable process and ap connection tests on linux * Updated 'OpenProjectManager' to use new the ProcessLauncher argument type * Add logic to double-escape escaped double quotes in arguments on windows platforms * Updated argument for LaunchProjectManager to reflect new ProcessLauncher argument type * Fixed unit test arguments for 'arg=value' condition * Fix compile errors for BuilderManager and RHI.Edit\Utils.cpp * PAL'ify the GetCommandLineParametersAsString() to handle windows specific behavior Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Co-authored-by: byrcolin <byrcolin@amazon.com>
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include <AzCore/std/smart_ptr/shared_ptr.h>
|
||||
#include <AzCore/std/smart_ptr/scoped_ptr.h>
|
||||
#include <AzCore/std/parallel/thread.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <AzFramework/Process/ProcessWatcher.h>
|
||||
#include <AzFramework/Process/ProcessCommunicator.h>
|
||||
|
||||
@@ -22,7 +21,7 @@ namespace AzFramework
|
||||
AZStd::scoped_ptr<ProcessWatcher> pWatcher(LaunchProcess(processLaunchInfo, communicationType));
|
||||
if (!pWatcher)
|
||||
{
|
||||
AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: Unable to launch process '%s %s'\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.m_commandlineParameters.c_str());
|
||||
AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: Unable to launch process '%s %s'\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.GetCommandLineParametersAsString().c_str());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -31,7 +30,7 @@ namespace AzFramework
|
||||
ProcessCommunicator* pCommunicator = pWatcher->GetCommunicator();
|
||||
if (!pCommunicator || !pCommunicator->IsValid())
|
||||
{
|
||||
AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: No communicator for watcher's process (%s %s)!\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.m_commandlineParameters.c_str());
|
||||
AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: No communicator for watcher's process (%s %s)!\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.GetCommandLineParametersAsString().c_str());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzFramework/Process/ProcessCommon_fwd.h>
|
||||
#include <AzCore/std/containers/variant.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
@@ -37,7 +38,7 @@ namespace AzFramework
|
||||
* On windows, the command line will be passed as-is to the shell (with quotes)
|
||||
* on UNIX/OSX, the command line will be converted as appropriate (quotes removed, but used to chop up parameters)
|
||||
*/
|
||||
AZStd::string m_commandlineParameters;
|
||||
AZStd::variant<AZStd::string, AZStd::vector<AZStd::string>> m_commandlineParameters;
|
||||
|
||||
/**
|
||||
* (optional) If you specify a working directory, the command will be executed with that directory as the current directory.
|
||||
@@ -50,6 +51,8 @@ namespace AzFramework
|
||||
|
||||
//Not Supported On Mac
|
||||
bool m_showWindow = true;
|
||||
|
||||
AZStd::string GetCommandLineParametersAsString() const;
|
||||
};
|
||||
|
||||
static const AZ::u32 INFINITE_TIMEOUT = (AZ::u32) -1;
|
||||
|
||||
Reference in New Issue
Block a user