public override FilePath GetOutputFileName(ConfigurationSelector configuration)
{
var cfg = GetConfiguration(configuration) as DubProjectConfiguration;
string targetPath = null, targetName = null, targetType = null;
CommonBuildSettings.TryGetTargetFileProperties(this, configuration, ref targetType, ref targetName, ref targetPath);
if(cfg != null)
cfg.BuildSettings.TryGetTargetFileProperties(this, configuration, ref targetType, ref targetName, ref targetPath);
if (string.IsNullOrWhiteSpace(targetPath))
targetPath = BaseDirectory.ToString();
else if (!Path.IsPathRooted(targetPath))
targetPath = BaseDirectory.Combine(targetPath).ToString();
if (string.IsNullOrWhiteSpace(targetName))
{
var packName = packageName.Split(':');
targetName = packName[packName.Length - 1];
}
if (string.IsNullOrWhiteSpace(targetType) ||
(targetType = targetType.ToLowerInvariant()) == "executable" ||
targetType == "autodetect")
{
if (OS.IsWindows)
targetName += ".exe";
}
else
{
//TODO
}
return Path.Combine(targetPath, targetName);
}