Add Project/Configuration/Option/OutDir since VS and Mono seem to have
different destination directory rules. Pass all set Option parameters through to the csproj.
This commit is contained in:
@@ -297,6 +297,24 @@ namespace Prebuild.Core.Nodes
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("OutDir")]
|
||||
private string m_OutDir = "bin/";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string OutDir
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OutDir;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OutDir = value;
|
||||
}
|
||||
}
|
||||
|
||||
[OptionNode("OutputPath")]
|
||||
private string m_OutputPath = "bin/";
|
||||
|
||||
@@ -673,6 +691,14 @@ namespace Prebuild.Core.Nodes
|
||||
return m_FieldsDefined.Contains("m_" + name);
|
||||
}
|
||||
|
||||
// Return the names of all the fields that have had a value set
|
||||
public IEnumerable<string> AllDefined()
|
||||
{
|
||||
foreach (string name in m_FieldsDefined) {
|
||||
yield return name.Substring(2);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies to.
|
||||
/// </summary>
|
||||
|
||||
@@ -592,14 +592,10 @@ namespace Prebuild.Core.Targets
|
||||
if (conf.Name == "unknown")
|
||||
{
|
||||
ps.WriteLine(" <PropertyGroup>");
|
||||
string[] optionNames = new string[] { "OutputPath", "OutputType", "RootNamespace" };
|
||||
foreach (var opt in optionNames)
|
||||
foreach (string opt in conf.Options.AllDefined())
|
||||
{
|
||||
if (conf.Options.IsDefined(opt))
|
||||
{
|
||||
ps.WriteLine(" <{0}>{1}</{0}>", opt,
|
||||
Helper.EndPath(Helper.NormalizePath(conf.Options[opt].ToString())));
|
||||
}
|
||||
ps.WriteLine(" <{0}>{1}</{0}>", opt,
|
||||
Helper.EndPath(Helper.NormalizePath(conf.Options[opt].ToString())));
|
||||
}
|
||||
ps.WriteLine(" </PropertyGroup>");
|
||||
ps.WriteLine();
|
||||
|
||||
BIN
bin/Prebuild.exe
BIN
bin/Prebuild.exe
Binary file not shown.
Reference in New Issue
Block a user