2015-11-16 11:21:57 -08:00
|
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
|
2016-08-05 16:54:41 -07:00
|
|
|
|
using Microsoft.DotNet.PlatformAbstractions;
|
2015-10-06 10:46:43 -07:00
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Utils
|
|
|
|
|
{
|
2016-01-05 23:48:50 -08:00
|
|
|
|
public static class Constants
|
2015-10-06 10:46:43 -07:00
|
|
|
|
{
|
2016-04-28 16:30:32 -07:00
|
|
|
|
private static Platform CurrentPlatform => RuntimeEnvironment.OperatingSystemPlatform;
|
2016-02-05 18:55:15 -08:00
|
|
|
|
public const string DefaultConfiguration = "Debug";
|
2016-02-10 16:13:30 -08:00
|
|
|
|
|
2015-12-10 19:01:40 -08:00
|
|
|
|
public static readonly string ProjectFileName = "project.json";
|
2016-02-10 16:13:30 -08:00
|
|
|
|
public static readonly string ExeSuffix = CurrentPlatform == Platform.Windows ? ".exe" : string.Empty;
|
2016-04-21 13:41:22 -07:00
|
|
|
|
public static readonly string ConfigSuffix = ".config";
|
2016-01-09 23:33:22 -08:00
|
|
|
|
|
|
|
|
|
// Priority order of runnable suffixes to look for and run
|
2016-02-10 16:13:30 -08:00
|
|
|
|
public static readonly string[] RunnableSuffixes = CurrentPlatform == Platform.Windows
|
2016-01-09 23:33:22 -08:00
|
|
|
|
? new string[] { ".exe", ".cmd", ".bat" }
|
|
|
|
|
: new string[] { string.Empty };
|
|
|
|
|
|
2015-10-15 12:56:07 -07:00
|
|
|
|
public static readonly string BinDirectoryName = "bin";
|
2015-10-18 21:07:48 -07:00
|
|
|
|
public static readonly string ObjDirectoryName = "obj";
|
2015-11-10 17:30:01 -08:00
|
|
|
|
|
2016-02-10 16:13:30 -08:00
|
|
|
|
public static readonly string DynamicLibSuffix = CurrentPlatform == Platform.Windows ? ".dll" :
|
|
|
|
|
CurrentPlatform == Platform.Darwin ? ".dylib" : ".so";
|
2015-10-29 12:03:01 -07:00
|
|
|
|
|
2016-02-04 21:10:13 -08:00
|
|
|
|
public static readonly string LibCoreClrFileName = (CurrentPlatform == Platform.Windows ? "coreclr" : "libcoreclr");
|
|
|
|
|
public static readonly string LibCoreClrName = LibCoreClrFileName + DynamicLibSuffix;
|
2016-01-09 15:49:29 +02:00
|
|
|
|
|
2016-02-10 16:13:30 -08:00
|
|
|
|
public static readonly string StaticLibSuffix = CurrentPlatform == Platform.Windows ? ".lib" : ".a";
|
2015-12-29 12:29:13 -08:00
|
|
|
|
|
|
|
|
|
public static readonly string ResponseFileSuffix = ".rsp";
|
2016-01-09 23:33:22 -08:00
|
|
|
|
|
2016-04-01 18:49:36 -07:00
|
|
|
|
public static readonly string PublishedHostExecutableName = "dotnet";
|
2016-01-09 23:33:22 -08:00
|
|
|
|
public static readonly string HostExecutableName = "corehost" + ExeSuffix;
|
|
|
|
|
public static readonly string[] HostBinaryNames = new string[] {
|
|
|
|
|
HostExecutableName,
|
2016-02-22 01:41:25 -08:00
|
|
|
|
(CurrentPlatform == Platform.Windows ? "hostpolicy" : "libhostpolicy") + DynamicLibSuffix,
|
|
|
|
|
(CurrentPlatform == Platform.Windows ? "hostfxr" : "libhostfxr") + DynamicLibSuffix
|
2016-01-09 23:33:22 -08:00
|
|
|
|
};
|
2016-02-10 16:13:30 -08:00
|
|
|
|
|
2016-04-29 15:54:47 -07:00
|
|
|
|
public static readonly string[] LibCoreClrBinaryNames = new string[]
|
|
|
|
|
{
|
|
|
|
|
"coreclr.dll",
|
|
|
|
|
"libcoreclr.so",
|
|
|
|
|
"libcoreclr.dylib"
|
|
|
|
|
};
|
|
|
|
|
|
2016-10-10 17:13:46 -07:00
|
|
|
|
public static readonly string MSBUILD_EXE_PATH = "MSBUILD_EXE_PATH";
|
2016-12-13 14:31:35 -10:00
|
|
|
|
|
|
|
|
|
public static readonly string ProjectOrSolutionArgumentName = "<PROJECT_OR_SOLUTION>";
|
2015-10-06 10:46:43 -07:00
|
|
|
|
}
|
|
|
|
|
}
|