Fixed issues with no finding main project k package if not on mono

This commit is contained in:
David Fowler 2014-04-26 12:53:45 -07:00
parent 90a149ab80
commit e90fe3cefa
1 changed files with 21 additions and 18 deletions

View File

@ -40,10 +40,10 @@ nuget-install package='ProjectK.Mono' outputDir='packages' extra='-pre -nocache'
return Int64.MaxValue;
};
var projectKPrefix = mono ? "ProjectK.Mono*" : "ProjectK";
var projectKPrefix = mono ? "ProjectK.Mono" : "ProjectK";
string packagesDir = Path.Combine(Directory.GetCurrentDirectory(), "packages"),
projectKDir = Directory.EnumerateDirectories(packagesDir, projectKPrefix)
projectKDir = Directory.EnumerateDirectories(packagesDir, projectKPrefix + "*")
.OrderByDescending(getVersion)
.First();
@ -56,6 +56,8 @@ default kMonoProgram='${projectKDir}/tools/net45/klr.mono.managed.dll'
default monoPath='${Environment.GetEnvironmentVariable("MONO_PATH")}'
@{
if(mono)
{
if(string.IsNullOrEmpty(monoPath))
{
monoPath = "mono";
@ -77,5 +79,6 @@ default monoPath='${Environment.GetEnvironmentVariable("MONO_PATH")}'
command = kMonoEntryPoint + " --lib " + folder + " Microsoft.Net.ApplicationHost " + command;
}
}
}
exec program='${monoPath}' commandline='${command}' if='mono'