From e90fe3cefa85b743290f51c986c607f51373b625 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 26 Apr 2014 12:53:45 -0700 Subject: [PATCH] Fixed issues with no finding main project k package if not on mono --- build/_k.shade | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/build/_k.shade b/build/_k.shade index afd61f8d3c..2ffaa8e0ee 100644 --- a/build/_k.shade +++ b/build/_k.shade @@ -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,25 +56,28 @@ default kMonoProgram='${projectKDir}/tools/net45/klr.mono.managed.dll' default monoPath='${Environment.GetEnvironmentVariable("MONO_PATH")}' @{ - if(string.IsNullOrEmpty(monoPath)) + if(mono) { - monoPath = "mono"; - } + if(string.IsNullOrEmpty(monoPath)) + { + monoPath = "mono"; + } - var folder = Path.Combine(projectKDir, "tools", "net45"); - var kMonoEntryPoint = Path.GetFullPath(kMonoProgram); + var folder = Path.Combine(projectKDir, "tools", "net45"); + var kMonoEntryPoint = Path.GetFullPath(kMonoProgram); - if(command.StartsWith("build")) - { - command = kMonoEntryPoint + " --lib " + folder + " Microsoft.Net.Project " + command; - } - else if(command.StartsWith("restore")) - { - command = Path.Combine(projectKDir, "tools", "NuGet.exe") + " " + command; - } - else - { - command = kMonoEntryPoint + " --lib " + folder + " Microsoft.Net.ApplicationHost " + command; + if(command.StartsWith("build")) + { + command = kMonoEntryPoint + " --lib " + folder + " Microsoft.Net.Project " + command; + } + else if(command.StartsWith("restore")) + { + command = Path.Combine(projectKDir, "tools", "NuGet.exe") + " " + command; + } + else + { + command = kMonoEntryPoint + " --lib " + folder + " Microsoft.Net.ApplicationHost " + command; + } } }