40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.IO;
|
|
|
|
namespace TeaBox.Code
|
|
{
|
|
[Flags]
|
|
public enum ToolsSolutionOptions
|
|
{
|
|
[Browsable(false)]
|
|
None = 0x0,
|
|
NoCopyLocal = 0x1,
|
|
}
|
|
|
|
public class SharpMakeCommand : ProcessTask
|
|
{
|
|
public SharpMakeCommand(string sourceFile)
|
|
{
|
|
SourceFile = sourceFile;
|
|
}
|
|
|
|
protected override string CommandName => Path.Combine(RootFolder.Value, @"build\sharpmake\bin\Sharpmake.Application.exe");
|
|
|
|
public string SourceFile { get; set; }
|
|
|
|
public ToolsSolutionOptions ToolsSolutionOptions { get; set; }
|
|
|
|
public bool GenerateDebugSolution { get; set; } = false;
|
|
|
|
public bool Verbose { get; set; } = false;
|
|
|
|
protected override string GetArguments()
|
|
{
|
|
var generateDebugSolution = GenerateDebugSolution ? "/generateDebugSolution" : "";
|
|
var verbose = Verbose ? "/verbose" : "";
|
|
var args = $"\"/sources(@\"{SourceFile}\") /project(\"{UAFConstants.GameName}\") /branch(\"{UAFConstants.BranchName}\") {verbose} {generateDebugSolution} /tools(\"{ToolsSolutionOptions}\")\"";
|
|
return args;
|
|
}
|
|
}
|
|
}
|