Merge pull request #45 from sharwell/fix-32
Add the ability to explicitly specify the path to the Java executable
This commit is contained in:
commit
6789bd6cbc
|
@ -138,6 +138,7 @@
|
|||
ToolPath="$(Antlr4ToolLocation)"
|
||||
JavaVendor="$(Antlr4JavaVendor)"
|
||||
JavaInstallation="$(Antlr4JavaInstallation)"
|
||||
JavaExecutable="$(Antlr4JavaExecutable)"
|
||||
BuildTaskPath="$(Antlr4BuildTaskLocation)"
|
||||
OutputPath="$(IntermediateOutputPath)"
|
||||
TargetLanguage="%(Antlr4.TargetLanguage)"
|
||||
|
|
|
@ -133,6 +133,7 @@
|
|||
ToolPath="$(Antlr4ToolLocation)"
|
||||
JavaVendor="$(Antlr4JavaVendor)"
|
||||
JavaInstallation="$(Antlr4JavaInstallation)"
|
||||
JavaExecutable="$(Antlr4JavaExecutable)"
|
||||
BuildTaskPath="$(Antlr4BuildTaskLocation)"
|
||||
OutputPath="$(IntermediateOutputPath)"
|
||||
TargetLanguage="%(Antlr4.TargetLanguage)"
|
||||
|
|
|
@ -163,6 +163,12 @@ namespace Antlr4.Build.Tasks
|
|||
set;
|
||||
}
|
||||
|
||||
public string JavaExecutable
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Output]
|
||||
public ITaskItem[] GeneratedCodeFiles
|
||||
{
|
||||
|
@ -332,6 +338,7 @@ namespace Antlr4.Build.Tasks
|
|||
wrapper.AbstractGrammar = AbstractGrammar;
|
||||
wrapper.JavaVendor = JavaVendor;
|
||||
wrapper.JavaInstallation = JavaInstallation;
|
||||
wrapper.JavaExecutable = JavaExecutable;
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,12 @@ namespace Antlr4.Build.Tasks
|
|||
set;
|
||||
}
|
||||
|
||||
public string JavaExecutable
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public IList<string> SourceCodeFiles
|
||||
{
|
||||
get
|
||||
|
@ -239,8 +245,16 @@ namespace Antlr4.Build.Tasks
|
|||
{
|
||||
try
|
||||
{
|
||||
string javaHome = JavaHome;
|
||||
string java = Path.Combine(Path.Combine(javaHome, "bin"), "java.exe");
|
||||
string java;
|
||||
if (!string.IsNullOrEmpty(JavaExecutable))
|
||||
{
|
||||
java = JavaExecutable;
|
||||
}
|
||||
else
|
||||
{
|
||||
string javaHome = JavaHome;
|
||||
java = Path.Combine(Path.Combine(javaHome, "bin"), "java.exe");
|
||||
}
|
||||
|
||||
List<string> arguments = new List<string>();
|
||||
arguments.Add("-cp");
|
||||
|
|
Loading…
Reference in New Issue