Skip to content
Permalink
Browse files

[CompilerApp] Removed unused GetGraphicsPlatform code

  • Loading branch information
xen2 committed Dec 6, 2018
1 parent 16eb04e commit d6b6a33fa3174ee1ca29bde3d4167cb28df471e8
@@ -71,12 +71,6 @@ private BuildResultCode BuildMaster()
return BuildResultCode.BuildError;
}

// Only querying graphics platform, let's load package, print it and exit
if (builderOptions.GetGraphicsPlatform)
{
return BuildGetGraphicsPlatform();
}

AssetCompilerContext context = null;
PackageSession projectSession = null;
try
@@ -90,8 +90,6 @@ public int Run(string[] args)
{ "disable-auto-compile", "Disable auto-compile of projects", v => options.DisableAutoCompileProjects = v != null},
{ "project-configuration=", "Project configuration", v => options.ProjectConfiguration = v },
{ "platform=", "Platform name", v => options.Platform = (PlatformType)Enum.Parse(typeof(PlatformType), v) },
{ "graphics-platform=", "Graphics Platform name", v => options.GraphicsPlatform = (GraphicsPlatform)Enum.Parse(typeof(GraphicsPlatform), v) },
{ "get-graphics-platform", "Get Graphics Platform name (needs a xkpkg and a profile)", v => options.GetGraphicsPlatform = v != null },
{ "solution-file=", "Solution File Name", v => options.SolutionFile = v },
{ "package-id=", "Package Id from the solution file", v => options.PackageId = Guid.Parse(v) },
{ "package-file=", "Input Package File Name", v => options.PackageFile = v },
@@ -231,11 +229,9 @@ public int Run(string[] args)
fileLogListener = new TextWriterLogListener(new FileStream(logFileName, FileMode.Create)) { TextFormatter = FormatLog };
GlobalLogger.GlobalMessageLogged += fileLogListener;
}
if (!options.GetGraphicsPlatform)
{
options.Logger.Info("BuildEngine arguments: " + string.Join(" ", args));
options.Logger.Info("Starting builder.");
}

options.Logger.Info("BuildEngine arguments: " + string.Join(" ", args));
options.Logger.Info("Starting builder.");
}
else
{
@@ -23,8 +23,6 @@ public class PackageBuilderOptions
public string SolutionFile { get; set; }
public Guid PackageId { get; set; }
public PlatformType Platform { get; set; }
public Xenko.Graphics.GraphicsPlatform? GraphicsPlatform { get; set; }
public bool GetGraphicsPlatform { get; set; }
public string PackageFile { get; set; }
public List<string> LogPipeNames = new List<string>();
public List<string> MonitorPipeNames = new List<string>();
@@ -70,20 +68,16 @@ public bool IsValidForSlave()
/// The given working directory \ + workingDir + \ does not exist.;workingdir</exception>
public void ValidateOptions()
{
// --get-graphics-profile doesn't require a build path
if (!GetGraphicsPlatform)
{
if (string.IsNullOrWhiteSpace(BuildDirectory))
throw new ArgumentException("This tool requires a build path.", "build-path");
if (string.IsNullOrWhiteSpace(BuildDirectory))
throw new ArgumentException("This tool requires a build path.", "build-path");

try
{
BuildDirectory = Path.GetFullPath(BuildDirectory);
}
catch (Exception)
{
throw new ArgumentException("The provided path is not a valid path name.", "build-path");
}
try
{
BuildDirectory = Path.GetFullPath(BuildDirectory);
}
catch (Exception)
{
throw new ArgumentException("The provided path is not a valid path name.", "build-path");
}

if (SlavePipe == null)
@@ -50,14 +50,6 @@
<!--<XenkoCompileAssetCommandProxy Condition="'$(DisableAssetCompilerExecServerProxy)' == 'true' Or '$(XenkoDisableAssetCompilerExecServerProxy)' == 'true'">&quot;$(XenkoCompileAssetCommand)&quot;</XenkoCompileAssetCommandProxy>
<XenkoCompileAssetCommandProxy Condition="'$(XenkoCompileAssetCommandProxy)' == ''">&quot;$(XenkoPackageXenkoSdkBin)\Xenko.Core.Assets.CompilerClient.exe&quot;</XenkoCompileAssetCommandProxy>-->
<XenkoCompileAssetCommandProxy>&quot;$(XenkoCompileAssetCommand)&quot;</XenkoCompileAssetCommandProxy>

<!-- Quite hard-coded for our current way to find default game settings -->
<XenkoGameSettings Condition="'$([System.IO.File]::Exists($(MSBuildProjectDirectory)\Assets\GameSettings.xkgamesettings))'== 'true' ">$(MSBuildProjectDirectory)\Assets\GameSettings.xkgamesettings</XenkoGameSettings>
<XenkoGameSettings Condition="'$(XenkoGameSettings)' == '' and '$([System.IO.File]::Exists($(MSBuildProjectDirectory)\..\Assets\Shared\GameSettings.xkgamesettings))' == 'true'">$(MSBuildProjectDirectory)\..\Assets\Shared\GameSettings.xkgamesettings</XenkoGameSettings>
<!-- Quite hard-coded for our current unit tests -->
<XenkoGameSettings Condition="'$(XenkoGameSettings)' == '' and '$([System.IO.File]::Exists($(MSBuildProjectDirectory)\GameAssets\GameSettings.xkgamesettings))' == 'true' ">$(MSBuildProjectDirectory)\GameAssets\GameSettings.xkgamesettings</XenkoGameSettings>
<XenkoGameSettings Condition="'$(XenkoGameSettings)' == '' and '$([System.IO.File]::Exists($(MSBuildProjectDirectory)\AudioAssets\GameSettings.xkgamesettings))' == 'true' ">$(MSBuildProjectDirectory)\AudioAssets\GameSettings.xkgamesettings</XenkoGameSettings>
<XenkoGameSettings Condition="'$(XenkoGameSettings)' == '' and '$([System.IO.File]::Exists($(MSBuildProjectDirectory)\Shaders.Bytecodes\GameSettings.xkgamesettings))' == 'true' ">$(MSBuildProjectDirectory)\Shaders.Bytecodes\GameSettings.xkgamesettings</XenkoGameSettings>
</PropertyGroup>

<!--Compile assets for all XenkoPackage items and only for an executable-->
@@ -121,4 +113,3 @@
</PropertyGroup>
</Target>
</Project>

0 comments on commit d6b6a33

Please sign in to comment.
You can’t perform that action at this time.