Fix engine CommandLine argument value usage
This commit is contained in:
@@ -740,7 +740,7 @@ namespace FlaxEditor
|
||||
var procSettings = new CreateProcessSettings
|
||||
{
|
||||
FileName = Platform.ExecutableFilePath,
|
||||
Arguments = string.Format("-project \"{0}\"" + (_projectIsNew ? " -new" : string.Empty), _projectToOpen),
|
||||
Arguments = string.Format("-project=\"{0}\"" + (_projectIsNew ? " -new" : string.Empty), _projectToOpen),
|
||||
ShellExecute = true,
|
||||
WaitForEnd = false,
|
||||
HiddenWindow = false,
|
||||
|
||||
@@ -29,7 +29,7 @@ const Char* SplashScreenQuotes[] =
|
||||
#elif PLATFORM_LINUX
|
||||
TEXT("Try it on a Raspberry"),
|
||||
TEXT("Trying to exit vim"),
|
||||
TEXT("sudo flax --project HelloWorld.flaxproj"),
|
||||
TEXT("sudo flax --project=HelloWorld.flaxproj"),
|
||||
#elif PLATFORM_MAC
|
||||
TEXT("don't compare Macbooks to oranges."),
|
||||
TEXT("Why does macbook heat up?\nBecause it doesn't have windows"),
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
|
||||
#if USE_EDITOR
|
||||
/// <summary>
|
||||
/// -project !path! (Startup project path)
|
||||
/// -project=<path> (Startup project path)
|
||||
/// </summary>
|
||||
String Project;
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
Nullable<bool> ClearCookerCache;
|
||||
|
||||
/// <summary>
|
||||
/// The build preset (-build !preset.target! or -build !preset!) (run game building on startup and exit app on end).
|
||||
/// The build preset (-build=<preset.target> or -build=<preset>) (run game building on startup and exit app on end).
|
||||
/// </summary>
|
||||
Nullable<String> Build;
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
Nullable<bool> Exit;
|
||||
|
||||
/// <summary>
|
||||
/// -play !guid! ( Scene to play, can be empty to use default )
|
||||
/// -play=<guid> ( Scene to play, can be empty to use default )
|
||||
/// </summary>
|
||||
Nullable<String> Play;
|
||||
#endif
|
||||
|
||||
@@ -439,8 +439,7 @@ namespace Flax.Build.Projects.CMake
|
||||
var args = new List<string>();
|
||||
if (configuration.Platform == TargetPlatform.Linux || configuration.Platform == TargetPlatform.Mac)
|
||||
args.Add("-std");
|
||||
args.Add("-project");
|
||||
args.Add(project.WorkspaceRootPath);
|
||||
args.Add($"-project=\"{project.WorkspaceRootPath}\"");
|
||||
args.Add("-skipCompile");
|
||||
arguments = args.ToArray();
|
||||
return program;
|
||||
|
||||
@@ -401,7 +401,7 @@ namespace Flax.Build.Projects.VisualStudio
|
||||
cppTargetsFileContent.AppendLine(" <TargetName>$(RootNamespace)$(Configuration.Split('.')[0])</TargetName>");
|
||||
cppTargetsFileContent.AppendLine(" <TargetPath>$(OutDir)/$(TargetName)$(TargetExt)</TargetPath>");
|
||||
if (!string.IsNullOrEmpty(debuggerProjectPath))
|
||||
cppTargetsFileContent.AppendLine(string.Format(" <LocalDebuggerCommandArguments>-project \"{0}\"</LocalDebuggerCommandArguments>", debuggerProjectPath));
|
||||
cppTargetsFileContent.AppendLine(string.Format(" <LocalDebuggerCommandArguments>-project=\"{0}\"</LocalDebuggerCommandArguments>", debuggerProjectPath));
|
||||
else
|
||||
cppTargetsFileContent.AppendLine(" <LocalDebuggerCommandArguments></LocalDebuggerCommandArguments>");
|
||||
cppTargetsFileContent.AppendLine(string.Format(" <LocalDebuggerCommand>{0}</LocalDebuggerCommand>", editorPath));
|
||||
|
||||
@@ -635,7 +635,7 @@ namespace Flax.Build.Projects.VisualStudio
|
||||
var configuration = "$(FlaxConfiguration)";
|
||||
var editorPath = Utilities.NormalizePath(Path.Combine(Globals.EngineRoot, Platform.GetEditorBinaryDirectory(), configuration, $"FlaxEditor{Utilities.GetPlatformExecutableExt()}")).Replace('\\', '/');
|
||||
var workspacePath = Utilities.NormalizePath(solutionDirectory).Replace('\\', '/');
|
||||
var args = Globals.Project.Name == "Flax" ? "" : $"-project \\\"{workspacePath}\\\"";
|
||||
var args = Globals.Project.Name == "Flax" ? "" : $"-project=\\\"{workspacePath}\\\"";
|
||||
foreach (var project in projects)
|
||||
{
|
||||
if (project.Type == TargetType.DotNetCore)
|
||||
|
||||
+2
-4
@@ -344,8 +344,7 @@ namespace Flax.Build.Projects.VisualStudioCode
|
||||
{
|
||||
if (configuration.Platform == TargetPlatform.Linux || configuration.Platform == TargetPlatform.Mac)
|
||||
json.AddUnnamedField("-std");
|
||||
json.AddUnnamedField("-project");
|
||||
json.AddUnnamedField(buildToolWorkspace);
|
||||
json.AddUnnamedField($"-project=\"{buildToolWorkspace}\"");
|
||||
json.AddUnnamedField("-skipCompile");
|
||||
if (hasMonoProjects)
|
||||
{
|
||||
@@ -399,8 +398,7 @@ namespace Flax.Build.Projects.VisualStudioCode
|
||||
{
|
||||
if (configuration.Platform == TargetPlatform.Linux || configuration.Platform == TargetPlatform.Mac)
|
||||
json.AddUnnamedField("-std");
|
||||
json.AddUnnamedField("-project");
|
||||
json.AddUnnamedField(buildToolWorkspace);
|
||||
json.AddUnnamedField($"-project=\"{buildToolWorkspace}\"");
|
||||
json.AddUnnamedField("-skipCompile");
|
||||
}
|
||||
json.EndArray();
|
||||
|
||||
Reference in New Issue
Block a user