public override IEnumerable<string> GetSourcePaths(ConfigurationSelector sel)
{
var dirs = new List<string>();
List<DubBuildSetting> l;
string d;
foreach (var sett in GetBuildSettings(sel))
{
if (sett.TryGetValue(DubBuildSettings.SourcePathsProperty, out l))
{
foreach (var setting in l)
{
foreach (var directory in setting.Values)
{
d = ProjectBuilder.EnsureCorrectPathSeparators(directory);
if (!Path.IsPathRooted(d))
{
if (this is DubSubPackage)
(this as DubSubPackage).useOriginalBasePath = true;
d = Path.GetFullPath(Path.Combine(BaseDirectory.ToString(), d));
if (this is DubSubPackage)
(this as DubSubPackage).useOriginalBasePath = false;
}
// Ignore os/arch/version constraints for now
if (dirs.Contains(d) || !Directory.Exists(d))
continue;
dirs.Add(d);
}
}
}
}
if (dirs.Count == 0)
{
d = BaseDirectory.Combine("source").ToString();
if (Directory.Exists(d))
dirs.Add(d);
d = BaseDirectory.Combine("src").ToString();
if (Directory.Exists(d))
dirs.Add(d);
}
return dirs;
}