JD2022-TU1/main/build/sharpmake/Tools/ToolsSolution.cs

44 lines
1.5 KiB
C#

using System;
using System.IO;
using System.Linq;
using System.Reflection;
using Sharpmake;
namespace JustDance.Tools
{
[Generate]
public class JDToolsSolution : BaseSolution
{
public JDToolsSolution()
{
Name = "Tools";
}
public override void ConfigureAll(Configuration conf, Target target)
{
base.ConfigureAll(conf, target);
conf.RegisterProjectsOfType<ApplicationProject>(target, IncludeInSolution);
conf.RegisterProjectsOfType<CommandLineProject>(target, IncludeInSolution);
conf.RegisterProjectsOfType<ModuleProject>(target, IncludeInSolution);
conf.RegisterProjectsOfType<LegacyToolsApplication>(target, type => type.IsALegacySupportedTool() && IncludeInSolution(type));
Utilities.CreateShortcut(conf.SolutionFileName + ".sln", ResolveString(RootPath), ResolveString(conf.SolutionPath + "/" + conf.SolutionFileName + ".sln", conf, target));
}
private bool IncludeInSolution(Type type)
{
return !ExcludedToolsList.Contains(type) && !type.IsSubclassOf(typeof(ScoringToolsDotNetApplication));
}
/// <summary>
/// Some applications are only utilities that are not changed often and not delivered.
/// </summary>
private static readonly Type[] ExcludedToolsList =
{
typeof (Shelver),
typeof (GestureComparer),
typeof (VegasToTempoBlasterPlugin),
};
}
}