Package corehost
This commit is contained in:
parent
ab6db12866
commit
a8eaa9c787
39 changed files with 1204 additions and 37 deletions
|
@ -60,15 +60,25 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target(nameof(PrepareTargets.Init), nameof(CompileCoreHost), nameof(CompileStage1), nameof(CompileStage2))]
|
[Target(nameof(PrepareTargets.Init), nameof(PackageCoreHost), nameof(CompileStage1), nameof(CompileStage2))]
|
||||||
public static BuildTargetResult Compile(BuildTargetContext c)
|
public static BuildTargetResult Compile(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string HostVer = "1.0.1";
|
||||||
|
private static string HostPolicyVer = "1.0.1";
|
||||||
|
private static string HostFxrVer = "1.0.1";
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
public static BuildTargetResult CompileCoreHost(BuildTargetContext c)
|
public static BuildTargetResult CompileCoreHost(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||||
|
var versionTag = buildVersion.ReleaseSuffix;
|
||||||
|
var buildMajor = buildVersion.CommitCountString;
|
||||||
|
|
||||||
|
var hostPolicyFullVer = $"{HostPolicyVer}-{versionTag}-{buildMajor}";
|
||||||
|
|
||||||
// Generate build files
|
// Generate build files
|
||||||
var cmakeOut = Path.Combine(Dirs.Corehost, "cmake");
|
var cmakeOut = Path.Combine(Dirs.Corehost, "cmake");
|
||||||
|
|
||||||
|
@ -79,6 +89,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
// Run the build
|
// Run the build
|
||||||
string rid = GetRuntimeId();
|
string rid = GetRuntimeId();
|
||||||
|
string corehostSrcDir = Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost");
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
|
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
|
||||||
|
@ -86,11 +97,17 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
var visualStudio = IsWinx86 ? "Visual Studio 14 2015" : "Visual Studio 14 2015 Win64";
|
var visualStudio = IsWinx86 ? "Visual Studio 14 2015" : "Visual Studio 14 2015 Win64";
|
||||||
var archMacro = IsWinx86 ? "-DCLI_CMAKE_PLATFORM_ARCH_I386=1" : "-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1";
|
var archMacro = IsWinx86 ? "-DCLI_CMAKE_PLATFORM_ARCH_I386=1" : "-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1";
|
||||||
var ridMacro = $"-DCLI_CMAKE_RUNTIME_ID:STRING={rid}";
|
var ridMacro = $"-DCLI_CMAKE_RUNTIME_ID:STRING={rid}";
|
||||||
|
var arch = IsWinx86 ? "x86" : "x64";
|
||||||
|
var baseSupportedRid = $"win7-{arch}";
|
||||||
|
var cmakeHostPolicyVer = $"-DCLI_CMAKE_HOST_POLICY_VER:STRING={hostPolicyFullVer}";
|
||||||
|
var cmakeBaseRid = $"-DCLI_CMAKE_PKG_RID:STRING={baseSupportedRid}";
|
||||||
|
|
||||||
ExecIn(cmakeOut, "cmake",
|
ExecIn(cmakeOut, "cmake",
|
||||||
Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost"),
|
corehostSrcDir,
|
||||||
archMacro,
|
archMacro,
|
||||||
ridMacro,
|
ridMacro,
|
||||||
|
cmakeHostPolicyVer,
|
||||||
|
cmakeBaseRid,
|
||||||
"-G",
|
"-G",
|
||||||
visualStudio);
|
visualStudio);
|
||||||
|
|
||||||
|
@ -109,8 +126,10 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
$"/p:Configuration={configuration}");
|
$"/p:Configuration={configuration}");
|
||||||
|
|
||||||
// Copy the output out
|
// Copy the output out
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "corehost.exe"), Path.Combine(Dirs.Corehost, "corehost.exe"), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "dotnet.exe"), Path.Combine(Dirs.Corehost, "corehost.exe"), overwrite: true);
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "corehost.pdb"), Path.Combine(Dirs.Corehost, "corehost.pdb"), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "dotnet.pdb"), Path.Combine(Dirs.Corehost, "corehost.pdb"), overwrite: true);
|
||||||
|
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "dotnet.exe"), Path.Combine(Dirs.Corehost, "dotnet.exe"), overwrite: true);
|
||||||
|
File.Copy(Path.Combine(cmakeOut, "cli", configuration, "dotnet.pdb"), Path.Combine(Dirs.Corehost, "dotnet.pdb"), overwrite: true);
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.dll"), Path.Combine(Dirs.Corehost, "hostpolicy.dll"), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.dll"), Path.Combine(Dirs.Corehost, "hostpolicy.dll"), overwrite: true);
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.pdb"), Path.Combine(Dirs.Corehost, "hostpolicy.pdb"), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.pdb"), Path.Combine(Dirs.Corehost, "hostpolicy.pdb"), overwrite: true);
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.dll"), Path.Combine(Dirs.Corehost, "hostfxr.dll"), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.dll"), Path.Combine(Dirs.Corehost, "hostfxr.dll"), overwrite: true);
|
||||||
|
@ -120,16 +139,78 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
ExecIn(cmakeOut, Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost", "build.sh"),
|
ExecIn(cmakeOut, Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost", "build.sh"),
|
||||||
"--arch",
|
"--arch",
|
||||||
"amd64",
|
"x64",
|
||||||
|
"--policyver",
|
||||||
|
hostPolicyFullVer,
|
||||||
"--rid",
|
"--rid",
|
||||||
rid);
|
rid);
|
||||||
|
|
||||||
// Copy the output out
|
// Copy the output out
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", "corehost"), Path.Combine(Dirs.Corehost, CoreHostBaseName), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", "dotnet"), Path.Combine(Dirs.Corehost, "dotnet"), overwrite: true);
|
||||||
|
File.Copy(Path.Combine(cmakeOut, "cli", "dotnet"), Path.Combine(Dirs.Corehost, CoreHostBaseName), overwrite: true);
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", HostPolicyBaseName), Path.Combine(Dirs.Corehost, HostPolicyBaseName), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", "dll", HostPolicyBaseName), Path.Combine(Dirs.Corehost, HostPolicyBaseName), overwrite: true);
|
||||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", DotnetHostFxrBaseName), Path.Combine(Dirs.Corehost, DotnetHostFxrBaseName), overwrite: true);
|
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", DotnetHostFxrBaseName), Path.Combine(Dirs.Corehost, DotnetHostFxrBaseName), overwrite: true);
|
||||||
}
|
}
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Target(nameof(CompileCoreHost))]
|
||||||
|
public static BuildTargetResult PackageCoreHost(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||||
|
var versionTag = buildVersion.ReleaseSuffix;
|
||||||
|
var buildMajor = buildVersion.CommitCountString;
|
||||||
|
var arch = IsWinx86 ? "x86" : "x64";
|
||||||
|
|
||||||
|
var version = buildVersion.NuGetVersion;
|
||||||
|
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{version}{Environment.NewLine}";
|
||||||
|
File.WriteAllText(Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost", "packaging", "version.txt"), content);
|
||||||
|
string corehostSrcDir = Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost");
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Command.Create(Path.Combine(corehostSrcDir, "packaging", "pack.cmd"))
|
||||||
|
// Workaround to arg escaping adding backslashes for arguments to .cmd scripts.
|
||||||
|
.Environment("__WorkaroundCliCoreHostBuildArch", arch)
|
||||||
|
.Environment("__WorkaroundCliCoreHostBinDir", Dirs.Corehost)
|
||||||
|
.Environment("__WorkaroundCliCoreHostPolicyVer", HostPolicyVer)
|
||||||
|
.Environment("__WorkaroundCliCoreHostFxrVer", HostFxrVer)
|
||||||
|
.Environment("__WorkaroundCliCoreHostVer", HostVer)
|
||||||
|
.Environment("__WorkaroundCliCoreHostBuildMajor", buildMajor)
|
||||||
|
.Environment("__WorkaroundCliCoreHostVersionTag", versionTag)
|
||||||
|
.ForwardStdOut()
|
||||||
|
.ForwardStdErr()
|
||||||
|
.Execute()
|
||||||
|
.EnsureSuccessful();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Exec(Path.Combine(corehostSrcDir, "packaging", "pack.sh"),
|
||||||
|
"--arch",
|
||||||
|
"x64",
|
||||||
|
"--hostbindir",
|
||||||
|
Dirs.Corehost,
|
||||||
|
"--policyver",
|
||||||
|
HostPolicyVer,
|
||||||
|
"--fxrver",
|
||||||
|
HostFxrVer,
|
||||||
|
"--hostver",
|
||||||
|
HostVer,
|
||||||
|
"--build",
|
||||||
|
buildMajor,
|
||||||
|
"--vertag",
|
||||||
|
versionTag);
|
||||||
|
}
|
||||||
|
int runtimeCount = 0;
|
||||||
|
foreach (var file in Directory.GetFiles(Path.Combine(corehostSrcDir, "packaging", "bin", "packages"), "*.nupkg"))
|
||||||
|
{
|
||||||
|
var fileName = Path.GetFileName(file);
|
||||||
|
File.Copy(file, Path.Combine(Dirs.Corehost, fileName));
|
||||||
|
runtimeCount += (fileName.StartsWith("runtime.") ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (runtimeCount < 3)
|
||||||
|
{
|
||||||
|
throw new BuildFailureException("Not all corehost nupkgs were successfully created");
|
||||||
|
}
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
nameof(PublishTargets.PublishDebFilesToDebianRepo),
|
nameof(PublishTargets.PublishDebFilesToDebianRepo),
|
||||||
nameof(PublishTargets.PublishLatestCliVersionTextFile),
|
nameof(PublishTargets.PublishLatestCliVersionTextFile),
|
||||||
nameof(PublishTargets.PublishLatestSharedFrameworkVersionTextFile),
|
nameof(PublishTargets.PublishLatestSharedFrameworkVersionTextFile),
|
||||||
|
nameof(PublishTargets.PublishCoreHostPackages),
|
||||||
nameof(PublishTargets.PublishCliVersionBadge))]
|
nameof(PublishTargets.PublishCliVersionBadge))]
|
||||||
public static BuildTargetResult PublishArtifacts(BuildTargetContext c) => c.Success();
|
public static BuildTargetResult PublishArtifacts(BuildTargetContext c) => c.Success();
|
||||||
|
|
||||||
|
@ -92,6 +93,18 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Target]
|
||||||
|
public static BuildTargetResult PublishCoreHostPackages(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
foreach (var file in Directory.GetFiles(Path.Combine(Dirs.Corehost, "*.nupkg")))
|
||||||
|
{
|
||||||
|
var hostBlob = $"{Channel}/Binaries/{CliNuGetVersion}/{Path.GetFileName(file)}";
|
||||||
|
AzurePublisherTool.PublishFile(hostBlob, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
|
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
|
||||||
|
|
|
@ -4,13 +4,35 @@
|
||||||
# I really don't know, but it doesn't work when I do that. Something about SIGCHLD not getting from clang to cmake or something.
|
# I really don't know, but it doesn't work when I do that. Something about SIGCHLD not getting from clang to cmake or something.
|
||||||
# -anurse
|
# -anurse
|
||||||
|
|
||||||
|
init_distro_name_and_rid()
|
||||||
|
{
|
||||||
|
# Detect Distro
|
||||||
|
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
|
||||||
|
export __distro_name=ubuntu
|
||||||
|
export __rid_plat=ubuntu.14.04
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
|
||||||
|
export __distro_name=rhel
|
||||||
|
export __rid_plat=centos.7
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
||||||
|
export __distro_name=rhel
|
||||||
|
export __rid_plat=rhel.7
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
|
||||||
|
export __distro_name=debian
|
||||||
|
export __rid_plat=
|
||||||
|
else
|
||||||
|
export __distro_name=""
|
||||||
|
export __rid_plat=
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "Usage: $0 --arch <Architecture> --rid <Runtime Identifier> [--xcompiler <Cross C++ Compiler>]"
|
echo "Usage: $0 --arch <Architecture> --rid <Runtime Identifier> --policyver <HostPolicy library version> [--xcompiler <Cross C++ Compiler>]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --arch <Architecture> Target Architecture (amd64, x86, arm)"
|
echo " --arch <Architecture> Target Architecture (amd64, x86, arm)"
|
||||||
echo " --rid <Runtime Identifier> Target Runtime Identifier"
|
echo " --rid <Runtime Identifier> Target Runtime Identifier"
|
||||||
|
echo " --policyver <HostPolicy version> Version of the hostpolicy library"
|
||||||
echo " --xcompiler <Cross C++ Compiler> Cross Compiler when the target is arm"
|
echo " --xcompiler <Cross C++ Compiler> Cross Compiler when the target is arm"
|
||||||
echo " e.g.) /usr/bin/arm-linux-gnueabi-g++-4.7"
|
echo " e.g.) /usr/bin/arm-linux-gnueabi-g++-4.7"
|
||||||
|
|
||||||
|
@ -29,6 +51,7 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
|
||||||
__build_arch=
|
__build_arch=
|
||||||
__runtime_id=
|
__runtime_id=
|
||||||
|
__policy_ver=
|
||||||
__CrossBuild=0
|
__CrossBuild=0
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
|
@ -46,6 +69,10 @@ while [ "$1" != "" ]; do
|
||||||
shift
|
shift
|
||||||
__runtime_id=$1
|
__runtime_id=$1
|
||||||
;;
|
;;
|
||||||
|
--policyver)
|
||||||
|
shift
|
||||||
|
__policy_ver=$1
|
||||||
|
;;
|
||||||
--xcompiler)
|
--xcompiler)
|
||||||
shift
|
shift
|
||||||
__CrossCompiler="$1"
|
__CrossCompiler="$1"
|
||||||
|
@ -60,26 +87,43 @@ done
|
||||||
__cmake_defines=
|
__cmake_defines=
|
||||||
|
|
||||||
case $__build_arch in
|
case $__build_arch in
|
||||||
amd64)
|
amd64|x64)
|
||||||
__define=-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1
|
__arch_define=-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1
|
||||||
;;
|
;;
|
||||||
x86)
|
x86)
|
||||||
__define=-DCLI_CMAKE_PLATFORM_ARCH_I386=1
|
__arch_define=-DCLI_CMAKE_PLATFORM_ARCH_I386=1
|
||||||
;;
|
;;
|
||||||
arm)
|
arm)
|
||||||
__define=-DCLI_CMAKE_PLATFORM_ARCH_ARM=1
|
__arch_define=-DCLI_CMAKE_PLATFORM_ARCH_ARM=1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown architecture $__build_arch"; exit 1
|
echo "Unknown architecture $__build_arch"; exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
__cmake_defines="${__cmake_defines} ${__define}"
|
__cmake_defines="${__cmake_defines} ${__arch_define}"
|
||||||
|
|
||||||
|
|
||||||
|
__rid_plat=
|
||||||
|
if [ "$(uname -s)" == "Darwin" ]; then
|
||||||
|
__rid_plat=osx.10.10
|
||||||
|
else
|
||||||
|
init_distro_name_and_rid
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $__rid_plat ]; then
|
||||||
|
echo "Unknown base rid (eg.: osx.10.10, ubuntu.14.04) being targeted"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
__build_arch_lowcase=$(echo "$__build_arch" | tr '[:upper:]' '[:lower:]')
|
||||||
|
__base_rid=$__rid_plat-$__build_arch_lowcase
|
||||||
|
|
||||||
echo "Building Corehost from $DIR to $(pwd)"
|
echo "Building Corehost from $DIR to $(pwd)"
|
||||||
|
set -x # turn on trace
|
||||||
if [ $__CrossBuild == 1 ]; then
|
if [ $__CrossBuild == 1 ]; then
|
||||||
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCMAKE_CXX_COMPILER="$__CrossCompiler"
|
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCLI_CMAKE_HOST_POLICY_VER:STRING=$__policy_ver -DCMAKE_CXX_COMPILER="$__CrossCompiler" -DCLI_CMAKE_PKG_RID:STRING=$__base_rid
|
||||||
else
|
else
|
||||||
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id
|
cmake "$DIR" -G "Unix Makefiles" $__cmake_defines -DCLI_CMAKE_RUNTIME_ID:STRING=$__runtime_id -DCLI_CMAKE_HOST_POLICY_VER:STRING=$__policy_ver -DCLI_CMAKE_PKG_RID:STRING=$__base_rid
|
||||||
fi
|
fi
|
||||||
|
set +x # turn off trace
|
||||||
make
|
make
|
||||||
|
|
|
@ -42,8 +42,8 @@ else()
|
||||||
list(APPEND SOURCES ../common/pal.unix.cpp)
|
list(APPEND SOURCES ../common/pal.unix.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(corehost ${SOURCES})
|
add_executable(dotnet ${SOURCES})
|
||||||
install(TARGETS corehost DESTINATION bin)
|
install(TARGETS dotnet DESTINATION bin)
|
||||||
add_definitions(-D_NO_ASYNCRTIMP)
|
add_definitions(-D_NO_ASYNCRTIMP)
|
||||||
add_definitions(-D_NO_PPLXIMP)
|
add_definitions(-D_NO_PPLXIMP)
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
add_definitions(-D__LINUX__)
|
add_definitions(-D__LINUX__)
|
||||||
target_link_libraries (corehost "dl" "pthread")
|
target_link_libraries (dotnet "dl" "pthread")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(dll)
|
add_subdirectory(dll)
|
||||||
|
|
|
@ -18,15 +18,6 @@ arguments_t::arguments_t() :
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_help()
|
|
||||||
{
|
|
||||||
xerr <<
|
|
||||||
_X("Usage: " HOST_EXE_NAME " [ASSEMBLY] [ARGUMENTS]\n")
|
|
||||||
_X("Execute the specified managed assembly with the passed in arguments\n\n")
|
|
||||||
_X("The Host's behavior can be altered using the following environment variables:\n")
|
|
||||||
_X(" COREHOST_TRACE Set to affect trace levels (0 = Errors only (default), 1 = Warnings, 2 = Info, 3 = Verbose)\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool parse_arguments(const pal::string_t& deps_path, const pal::string_t& probe_dir, host_mode_t mode,
|
bool parse_arguments(const pal::string_t& deps_path, const pal::string_t& probe_dir, host_mode_t mode,
|
||||||
const int argc, const pal::char_t* argv[], arguments_t* arg_out)
|
const int argc, const pal::char_t* argv[], arguments_t* arg_out)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +37,6 @@ bool parse_arguments(const pal::string_t& deps_path, const pal::string_t& probe_
|
||||||
// corerun mode. First argument is managed app
|
// corerun mode. First argument is managed app
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
display_help();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
args.managed_application = pal::string_t(argv[1]);
|
args.managed_application = pal::string_t(argv[1]);
|
||||||
|
|
|
@ -75,25 +75,37 @@ int execute_app(
|
||||||
|
|
||||||
bool hostpolicy_exists_in_svc(pal::string_t* resolved_dir)
|
bool hostpolicy_exists_in_svc(pal::string_t* resolved_dir)
|
||||||
{
|
{
|
||||||
#ifdef COREHOST_PACKAGE_SERVICING
|
|
||||||
pal::string_t svc_dir;
|
pal::string_t svc_dir;
|
||||||
if (!pal::getenv(_X("DOTNET_SERVICING"), &svc_dir))
|
if (!pal::getenv(_X("DOTNET_SERVICING"), &svc_dir))
|
||||||
{
|
{
|
||||||
|
trace::verbose(_X("Servicing root doesn't exist"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pal::string_t rel_dir = _STRINGIFY(HOST_POLICY_PKG_REL_DIR);
|
||||||
|
if (DIR_SEPARATOR != '/')
|
||||||
|
{
|
||||||
|
replace_char(&rel_dir, '/', DIR_SEPARATOR);
|
||||||
|
}
|
||||||
|
|
||||||
pal::string_t path = svc_dir;
|
pal::string_t path = svc_dir;
|
||||||
append_path(&path, COREHOST_PACKAGE_NAME);
|
append_path(&path, _STRINGIFY(HOST_POLICY_PKG_NAME));
|
||||||
append_path(&path, COREHOST_PACKAGE_VERSION);
|
append_path(&path, _STRINGIFY(HOST_POLICY_PKG_VER));
|
||||||
append_path(&path, COREHOST_PACKAGE_COREHOST_RELATIVE_DIR);
|
append_path(&path, rel_dir.c_str());
|
||||||
if (library_exists_in_dir(path, LIBHOSTPOLICY_NAME))
|
append_path(&path, LIBHOSTPOLICY_NAME);
|
||||||
|
if (!pal::realpath(&path))
|
||||||
|
{
|
||||||
|
trace::verbose(_X("Servicing root ::realpath(%s) doesn't exist"), path.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (library_exists_in_dir(path, LIBHOSTPOLICY_NAME, nullptr))
|
||||||
{
|
{
|
||||||
resolved_dir->assign(path);
|
resolved_dir->assign(path);
|
||||||
|
trace::verbose(_X("[%s] exists in servicing [%s]"), LIBHOSTPOLICY_NAME, path.c_str());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
trace::verbose(_X("[%s] doesn't exist in servicing [%s]"), LIBHOSTPOLICY_NAME, path.c_str());
|
||||||
#else
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SHARED_API int hostfxr_main(const int argc, const pal::char_t* argv[])
|
SHARED_API int hostfxr_main(const int argc, const pal::char_t* argv[])
|
||||||
|
|
|
@ -207,7 +207,11 @@ SHARED_API int corehost_main(const int argc, const pal::char_t* argv[])
|
||||||
|
|
||||||
if (trace::is_enabled())
|
if (trace::is_enabled())
|
||||||
{
|
{
|
||||||
trace::info(_X("--- Invoked policy main = {"));
|
trace::info(_X("--- Invoked policy [%s/%s/%s] main = {"),
|
||||||
|
_STRINGIFY(HOST_POLICY_PKG_NAME),
|
||||||
|
_STRINGIFY(HOST_POLICY_PKG_VER),
|
||||||
|
_STRINGIFY(HOST_POLICY_PKG_REL_DIR));
|
||||||
|
|
||||||
for (int i = 0; i < argc; ++i)
|
for (int i = 0; i < argc; ++i)
|
||||||
{
|
{
|
||||||
trace::info(_X("%s"), argv[i]);
|
trace::info(_X("%s"), argv[i]);
|
||||||
|
|
|
@ -58,3 +58,16 @@ if(${CLI_CMAKE_RUNTIME_ID} STREQUAL "")
|
||||||
else()
|
else()
|
||||||
add_definitions(-DTARGET_RUNTIME_ID="${CLI_CMAKE_RUNTIME_ID}")
|
add_definitions(-DTARGET_RUNTIME_ID="${CLI_CMAKE_RUNTIME_ID}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${CLI_CMAKE_HOST_POLICY_VER} STREQUAL "")
|
||||||
|
message(FATAL_ERROR "Host policy version is not specified")
|
||||||
|
else()
|
||||||
|
add_definitions(-DHOST_POLICY_PKG_VER="${CLI_CMAKE_HOST_POLICY_VER}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${CLI_CMAKE_PKG_RID} STREQUAL "")
|
||||||
|
message(FATAL_ERROR "A minimum supported package rid is not specified (ex: win7-x86 or ubuntu.14.04-x64, osx.10.10-x64, rhel.7-x64)")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_definitions(-DHOST_POLICY_PKG_NAME="Microsoft.NETCore.DotNetHostPolicy")
|
||||||
|
add_definitions(-DHOST_POLICY_PKG_REL_DIR="runtimes/${CLI_CMAKE_PKG_RID}/native")
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#define HOST_EXE_NAME L"corehost.exe"
|
|
||||||
#define xerr std::wcerr
|
#define xerr std::wcerr
|
||||||
#define xout std::wcout
|
#define xout std::wcout
|
||||||
#define DIR_SEPARATOR L'\\'
|
#define DIR_SEPARATOR L'\\'
|
||||||
|
|
2
src/corehost/packaging/.gitignore
vendored
Normal file
2
src/corehost/packaging/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/Tools/
|
||||||
|
version.txt
|
1
src/corehost/packaging/BuildToolsVersion.txt
Normal file
1
src/corehost/packaging/BuildToolsVersion.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1.0.25-prerelease-00206
|
1
src/corehost/packaging/DotnetCLIVersion.txt
Normal file
1
src/corehost/packaging/DotnetCLIVersion.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1.0.0.001718
|
10
src/corehost/packaging/deps/project.json
Normal file
10
src/corehost/packaging/deps/project.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.NETCore.Platforms": "1.0.1-rc2-23712",
|
||||||
|
},
|
||||||
|
"frameworks": {
|
||||||
|
"dnxcore50": {
|
||||||
|
"imports": "portable-net45+win8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
46
src/corehost/packaging/dir.props
Normal file
46
src/corehost/packaging/dir.props
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" InitialTargets="ValidateArgs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
|
||||||
|
|
||||||
|
<!-- Output directories -->
|
||||||
|
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)bin/</BinDir>
|
||||||
|
<TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(BinDir)tests/</TestWorkingDir>
|
||||||
|
<PackagesOutDir Condition="'$(PackagesOutDir)'==''">$(BinDir)packages/</PackagesOutDir>
|
||||||
|
|
||||||
|
<!-- Input Directories -->
|
||||||
|
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
|
||||||
|
<ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(ProjectDir)Tools/</ToolRuntimePath>
|
||||||
|
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir>
|
||||||
|
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
|
||||||
|
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolRuntimePath)dotnetcli/bin/</DotnetCliPath>
|
||||||
|
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net45/</BuildToolsTaskDir>
|
||||||
|
<UseRoslynCompilers Condition="'$(UseRoslynCompilers)'=='' and '$(OSEnvironment)'!='Windows_NT'">false</UseRoslynCompilers>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<PackageOutputPath>$(PackagesOutDir)</PackageOutputPath>
|
||||||
|
<RuntimeIdGraphDefinitionFile>$(ProjectDir)packages\Microsoft.NETCore.Platforms\1.0.1-rc2-23712\runtime.json</RuntimeIdGraphDefinitionFile>
|
||||||
|
<PackageDescriptionFile>$(ProjectDir)projects/descriptions.json</PackageDescriptionFile>
|
||||||
|
<PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
|
||||||
|
<PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<HostPolicyFullVersion>$(HostPolicyVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)</HostPolicyFullVersion>
|
||||||
|
<HostResolverFullVersion>$(HostResolverVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)</HostResolverFullVersion>
|
||||||
|
<HostFullVersion>$(HostVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)</HostFullVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="ValidateArgs">
|
||||||
|
<Error Condition="$(HostPolicyVersion)==''" Text="HostPolicyVersion is undefined" />
|
||||||
|
<Error Condition="$(HostResolverVersion)==''" Text="HostResolverVersion is undefined" />
|
||||||
|
<Error Condition="$(HostVersion)==''" Text="HostVersion is undefined" />
|
||||||
|
<Error Condition="$(PreReleaseLabel)==''" Text="PreReleaseLabel is undefined" />
|
||||||
|
<Error Condition="$(BuildNumberMajor)==''" Text="BuildNumberMajor is undefined" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
16
src/corehost/packaging/dir.targets
Normal file
16
src/corehost/packaging/dir.targets
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<Target Name="CheckForBuildTools">
|
||||||
|
<Error Condition="!Exists('$(ToolsDir)')"
|
||||||
|
Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your enlistment to ensure the tools are installed before attempting to build an individual project." />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
|
||||||
|
<Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
|
||||||
|
<Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
|
||||||
|
<Target Name="Test" />
|
||||||
|
|
||||||
|
<Import Project="$(ToolsDir)/Build.Common.targets" Condition="'$(UseLiveBuildTools)' != 'true'" />
|
||||||
|
|
||||||
|
</Project>
|
21
src/corehost/packaging/dir.traversal.targets
Normal file
21
src/corehost/packaging/dir.traversal.targets
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||||
|
|
||||||
|
<Target Name="Build">
|
||||||
|
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
|
||||||
|
however since the project names are unique it will essentially force each to run in its own batch -->
|
||||||
|
<MSBuild Targets="Build" Projects="@(Project)" Condition="'$(SerializeProjects)'=='true'" Properties="Dummy=%(Identity)"/>
|
||||||
|
<MSBuild Targets="Build" Projects="@(Project)" Condition="'$(SerializeProjects)'!='true'" BuildInParallel="true" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="Clean">
|
||||||
|
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
|
||||||
|
however since the project names are unique it will essentially force each to run in its own batch -->
|
||||||
|
<MSBuild Targets="Clean" Projects="@(Project)" Condition="'$(SerializeProjects)'=='true'" Properties="Dummy=%(Identity)"/>
|
||||||
|
<MSBuild Targets="Clean" Projects="@(Project)" Condition="'$(SerializeProjects)'!='true'" BuildInParallel="true" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
|
||||||
|
|
||||||
|
</Project>
|
72
src/corehost/packaging/init-tools.cmd
Normal file
72
src/corehost/packaging/init-tools.cmd
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
REM Workaround https://github.com/dotnet/coreclr/issues/2153
|
||||||
|
set ComPlus_ReadyToRun=0
|
||||||
|
|
||||||
|
set INIT_TOOLS_LOG=%~dp0init-tools.log
|
||||||
|
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\
|
||||||
|
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
|
||||||
|
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
|
||||||
|
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%bin\dotnet.exe
|
||||||
|
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
|
||||||
|
set /P BUILDTOOLS_VERSION=< %~dp0BuildToolsVersion.txt
|
||||||
|
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
|
||||||
|
set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
|
||||||
|
set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
|
||||||
|
set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" }, "frameworks": { "dnxcore50": { } } }
|
||||||
|
set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed
|
||||||
|
|
||||||
|
:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
|
||||||
|
if [%1]==[force] (
|
||||||
|
if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
|
||||||
|
if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
|
||||||
|
)
|
||||||
|
|
||||||
|
:: If sempahore exists do nothing
|
||||||
|
if exist "%BUILD_TOOLS_SEMAPHORE%" (
|
||||||
|
echo Tools are already initialized.
|
||||||
|
goto :EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
|
||||||
|
|
||||||
|
if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
|
||||||
|
echo %PROJECT_JSON_CONTENTS% > %PROJECT_JSON_FILE%
|
||||||
|
echo Running %0 > %INIT_TOOLS_LOG%
|
||||||
|
|
||||||
|
if exist "%DOTNET_CMD%" goto :afterdotnetrestore
|
||||||
|
|
||||||
|
echo Installing dotnet cli...
|
||||||
|
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
|
||||||
|
set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt
|
||||||
|
set DOTNET_ZIP_NAME=dotnet-win-x64.%DOTNET_VERSION%.zip
|
||||||
|
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
|
||||||
|
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
|
||||||
|
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> %INIT_TOOLS_LOG%
|
||||||
|
powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> %INIT_TOOLS_LOG%
|
||||||
|
if NOT exist "%DOTNET_LOCAL_PATH%" (
|
||||||
|
echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
|
||||||
|
goto :EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
:afterdotnetrestore
|
||||||
|
|
||||||
|
if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
|
||||||
|
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
|
||||||
|
echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
|
||||||
|
call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
|
||||||
|
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
|
||||||
|
echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
|
||||||
|
goto :EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
:afterbuildtoolsrestore
|
||||||
|
|
||||||
|
echo Initializing BuildTools ...
|
||||||
|
echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
|
||||||
|
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
|
||||||
|
|
||||||
|
:: Create sempahore file
|
||||||
|
echo Done initializing tools.
|
||||||
|
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
|
87
src/corehost/packaging/init-tools.sh
Executable file
87
src/corehost/packaging/init-tools.sh
Executable file
|
@ -0,0 +1,87 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||||
|
__init_tools_log=$__scriptpath/init-tools.log
|
||||||
|
__PACKAGES_DIR=$__scriptpath/packages
|
||||||
|
__TOOLRUNTIME_DIR=$__scriptpath/Tools
|
||||||
|
__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
|
||||||
|
__DOTNET_CMD=$__DOTNET_PATH/bin/dotnet
|
||||||
|
if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi
|
||||||
|
__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/BuildToolsVersion.txt)
|
||||||
|
__DOTNET_TOOLS_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt)
|
||||||
|
__BUILD_TOOLS_PATH=$__PACKAGES_DIR/Microsoft.DotNet.BuildTools/$__BUILD_TOOLS_PACKAGE_VERSION/lib
|
||||||
|
__PROJECT_JSON_PATH=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION
|
||||||
|
__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
|
||||||
|
__PROJECT_JSON_CONTENTS="{ \"dependencies\": { \"Microsoft.DotNet.BuildTools\": \"$__BUILD_TOOLS_PACKAGE_VERSION\" }, \"frameworks\": { \"dnxcore50\": { } } }"
|
||||||
|
|
||||||
|
OSName=$(uname -s)
|
||||||
|
case $OSName in
|
||||||
|
Darwin)
|
||||||
|
OS=OSX
|
||||||
|
__DOTNET_PKG=dotnet-osx-x64
|
||||||
|
;;
|
||||||
|
|
||||||
|
Linux)
|
||||||
|
OS=Linux
|
||||||
|
source /etc/os-release
|
||||||
|
if [ "$ID" == "centos" -o "$ID" == "rhel" ]; then
|
||||||
|
__DOTNET_PKG=dotnet-centos-x64
|
||||||
|
elif [ "$ID" == "ubuntu" -o "$ID" == "debian" ]; then
|
||||||
|
__DOTNET_PKG=dotnet-ubuntu-x64
|
||||||
|
else
|
||||||
|
echo "Unsupported Linux distribution '$ID' detected. Downloading ubuntu-x64 tools."
|
||||||
|
__DOTNET_PKG=dotnet-ubuntu-x64
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
|
||||||
|
OS=Linux
|
||||||
|
__DOTNET_PKG=dotnet-ubuntu-x64
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ ! -e $__PROJECT_JSON_FILE ]; then
|
||||||
|
if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
|
||||||
|
echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
|
||||||
|
if [ ! -e $__DOTNET_PATH ]; then
|
||||||
|
echo "Installing dotnet cli..."
|
||||||
|
__DOTNET_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
|
||||||
|
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
|
||||||
|
echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log
|
||||||
|
which curl > /dev/null 2> /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
mkdir -p "$__DOTNET_PATH"
|
||||||
|
wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
|
||||||
|
else
|
||||||
|
curl -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
|
||||||
|
fi
|
||||||
|
cd $__DOTNET_PATH
|
||||||
|
tar -xf $__DOTNET_PATH/dotnet.tar
|
||||||
|
if [ -n "$BUILDTOOLS_OVERRIDE_RUNTIME" ]; then
|
||||||
|
find $__DOTNET_PATH -name *.ni.* | xargs rm 2>/dev/null
|
||||||
|
cp -R $BUILDTOOLS_OVERRIDE_RUNTIME/* $__DOTNET_PATH/bin
|
||||||
|
cp -R $BUILDTOOLS_OVERRIDE_RUNTIME/* $__DOTNET_PATH/bin/dnx
|
||||||
|
cp -R $BUILDTOOLS_OVERRIDE_RUNTIME/* $__DOTNET_PATH/runtime/coreclr
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $__scriptpath
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$__PROJECT_JSON_PATH" ]; then mkdir "$__PROJECT_JSON_PATH"; fi
|
||||||
|
echo $__PROJECT_JSON_CONTENTS > "$__PROJECT_JSON_FILE"
|
||||||
|
|
||||||
|
if [ ! -e $__BUILD_TOOLS_PATH ]; then
|
||||||
|
echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
|
||||||
|
echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" >> $__init_tools_log
|
||||||
|
$__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE >> $__init_tools_log
|
||||||
|
if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Initializing BuildTools..."
|
||||||
|
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log
|
||||||
|
$__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
|
||||||
|
echo "Done initializing tools."
|
||||||
|
else
|
||||||
|
echo "Tools are already initialized"
|
||||||
|
fi
|
88
src/corehost/packaging/pack.cmd
Normal file
88
src/corehost/packaging/pack.cmd
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
@echo off
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
|
set __ProjectDir=%~dp0
|
||||||
|
set __ThisScriptShort=%0
|
||||||
|
set __ThisScriptFull="%~f0"
|
||||||
|
|
||||||
|
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
:: Adding environment variables to workaround the "Argument Escape" problem with passing arguments to
|
||||||
|
:: .cmd calls from dotnet-cli-build scripts.
|
||||||
|
::
|
||||||
|
set __BuildArch=%__WorkaroundCliCoreHostBuildArch%
|
||||||
|
set __DotNetHostBinDir=%__WorkaroundCliCoreHostBinDir%
|
||||||
|
set __HostVer=%__WorkaroundCliCoreHostVer%
|
||||||
|
set __FxrVer=%__WorkaroundCliCoreHostFxrVer%
|
||||||
|
set __PolicyVer=%__WorkaroundCliCoreHostPolicyVer%
|
||||||
|
set __BuildMajor=%__WorkaroundCliCoreHostBuildMajor%
|
||||||
|
set __VersionTag=%__WorkaroundCliCoreHostVersionTag%
|
||||||
|
::
|
||||||
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||||
|
|
||||||
|
:Arg_Loop
|
||||||
|
if "%1" == "" goto ArgsDone
|
||||||
|
|
||||||
|
if /i "%1" == "/?" goto Usage
|
||||||
|
if /i "%1" == "-?" goto Usage
|
||||||
|
if /i "%1" == "/h" goto Usage
|
||||||
|
if /i "%1" == "-h" goto Usage
|
||||||
|
if /i "%1" == "/help" goto Usage
|
||||||
|
if /i "%1" == "-help" goto Usage
|
||||||
|
|
||||||
|
if /i "%1" == "x64" (set __BuildArch=%1&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "x86" (set __BuildArch=%1&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "arm" (set __BuildArch=%1&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "arm64" (set __BuildArch=%1&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "/hostbindir" (set __DotNetHostBinDir=%2&shift&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "/hostver" (set __HostVer=%2&shift&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "/fxrver" (set __FxrVer=%2&shift&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "/policyver" (set __PolicyVer=%2&shift&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "/build" (set __BuildMajor=%2&shift&shift&goto Arg_Loop)
|
||||||
|
if /i "%1" == "/vertag" (set __VersionTag=%2&shift&shift&goto Arg_Loop)
|
||||||
|
|
||||||
|
echo Invalid command line argument: %1
|
||||||
|
goto Usage
|
||||||
|
|
||||||
|
:ArgsDone
|
||||||
|
|
||||||
|
if [%__BuildArch%]==[] (goto Usage)
|
||||||
|
if [%__DotNetHostBinDir%]==[] (goto Usage)
|
||||||
|
|
||||||
|
:: Initialize the MSBuild Tools
|
||||||
|
call "%__ProjectDir%\init-tools.cmd"
|
||||||
|
|
||||||
|
:: Restore dependencies mainly to obtain runtime.json
|
||||||
|
pushd "%__ProjectDir%\deps"
|
||||||
|
"%__ProjectDir%\Tools\dotnetcli\bin\dotnet.exe" restore --source "https://dotnet.myget.org/F/dotnet-core" --packages "%__ProjectDir%\packages"
|
||||||
|
popd
|
||||||
|
|
||||||
|
:: Clean up existing nupkgs
|
||||||
|
if exist "%__ProjectDir%\bin" (rmdir /s /q "%__ProjectDir%\bin")
|
||||||
|
|
||||||
|
:: Package the assets using Tools
|
||||||
|
|
||||||
|
copy /y "%__DotNetHostBinDir%\corehost.exe" "%__DotNetHostBinDir%\dotnet.exe"
|
||||||
|
|
||||||
|
"%__ProjectDir%\Tools\corerun" "%__ProjectDir%\Tools\MSBuild.exe" "%__ProjectDir%\projects\Microsoft.NETCore.DotNetHostPolicy.builds" /p:Platform=%__BuildArch% /p:DotNetHostBinDir=%__DotNetHostBinDir% /p:TargetsWindows=true /p:HostVersion=%__HostVer% /p:HostResolverVersion=%__FxrVer% /p:HostPolicyVersion=%__PolicyVer% /p:BuildNumberMajor=%__BuildMajor% /p:PreReleaseLabel=%__VersionTag% /verbosity:minimal
|
||||||
|
if not ERRORLEVEL 0 goto :Error
|
||||||
|
|
||||||
|
"%__ProjectDir%\Tools\corerun" "%__ProjectDir%\Tools\MSBuild.exe" "%__ProjectDir%\projects\Microsoft.NETCore.DotNetHostResolver.builds" /p:Platform=%__BuildArch% /p:DotNetHostBinDir=%__DotNetHostBinDir% /p:TargetsWindows=true /p:HostVersion=%__HostVer% /p:HostResolverVersion=%__FxrVer% /p:HostPolicyVersion=%__PolicyVer% /p:BuildNumberMajor=%__BuildMajor% /p:PreReleaseLabel=%__VersionTag% /verbosity:minimal
|
||||||
|
if not ERRORLEVEL 0 goto :Error
|
||||||
|
|
||||||
|
"%__ProjectDir%\Tools\corerun" "%__ProjectDir%\Tools\MSBuild.exe" "%__ProjectDir%\projects\Microsoft.NETCore.DotNetHost.builds" /p:Platform=%__BuildArch% /p:DotNetHostBinDir=%__DotNetHostBinDir% /p:TargetsWindows=true /p:HostVersion=%__HostVer% /p:HostResolverVersion=%__FxrVer% /p:HostPolicyVersion=%__PolicyVer% /p:BuildNumberMajor=%__BuildMajor% /p:PreReleaseLabel=%__VersionTag% /verbosity:minimal
|
||||||
|
if not ERRORLEVEL 0 goto :Error
|
||||||
|
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
|
:Usage
|
||||||
|
echo.
|
||||||
|
echo Package the dotnet host artifacts
|
||||||
|
echo.
|
||||||
|
echo Usage:
|
||||||
|
echo %__ThisScriptShort% [x64/x86/arm] /hostbindir path-to-binaries /hostver /fxrver /policyver /build /vertag
|
||||||
|
echo.
|
||||||
|
echo./? -? /h -h /help -help: view this message.
|
||||||
|
|
||||||
|
:Error
|
||||||
|
echo An error occurred during packing.
|
||||||
|
exit /b 1
|
127
src/corehost/packaging/pack.sh
Executable file
127
src/corehost/packaging/pack.sh
Executable file
|
@ -0,0 +1,127 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
echo "Usage: ${BASH_SOURCE[0]} --arch x64/x86/arm --hostbindir path-to-binaries" --hostver --fxrver --policyver --build --vertag
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
init_distro_name()
|
||||||
|
{
|
||||||
|
# Detect Distro
|
||||||
|
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
|
||||||
|
export __distro_name=ubuntu
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
|
||||||
|
export __distro_name=rhel
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
||||||
|
export __distro_name=rhel
|
||||||
|
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
|
||||||
|
export __distro_name=debian
|
||||||
|
else
|
||||||
|
export __distro_name=""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# determine current directory
|
||||||
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||||
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
SOURCE="$(readlink "$SOURCE")"
|
||||||
|
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||||
|
done
|
||||||
|
|
||||||
|
# initialize variables
|
||||||
|
__project_dir="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
__build_arch=
|
||||||
|
__dotnet_host_bin_dir=
|
||||||
|
__distro_name=
|
||||||
|
__host_ver=
|
||||||
|
__fxr_ver=
|
||||||
|
__policy_ver=
|
||||||
|
__build_major=
|
||||||
|
__version_tag=
|
||||||
|
|
||||||
|
# parse arguments
|
||||||
|
while [ "$1" != "" ]; do
|
||||||
|
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||||
|
case $lowerI in
|
||||||
|
-h|--help)
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
--arch)
|
||||||
|
shift
|
||||||
|
__build_arch=$1
|
||||||
|
;;
|
||||||
|
--hostbindir)
|
||||||
|
shift
|
||||||
|
__dotnet_host_bin_dir=$1
|
||||||
|
;;
|
||||||
|
--hostver)
|
||||||
|
shift
|
||||||
|
__host_ver=$1
|
||||||
|
;;
|
||||||
|
--fxrver)
|
||||||
|
shift
|
||||||
|
__fxr_ver=$1
|
||||||
|
;;
|
||||||
|
--policyver)
|
||||||
|
shift
|
||||||
|
__policy_ver=$1
|
||||||
|
;;
|
||||||
|
--build)
|
||||||
|
shift
|
||||||
|
__build_major=$1
|
||||||
|
;;
|
||||||
|
--vertag)
|
||||||
|
shift
|
||||||
|
__version_tag=$1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown argument to pack.sh $1"; exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# validate args
|
||||||
|
if [ -z $__dotnet_host_bin_dir ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
if [ -z $__build_arch ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
# setup msbuild
|
||||||
|
"$__project_dir/init-tools.sh"
|
||||||
|
|
||||||
|
# acquire dependencies
|
||||||
|
pushd "$__project_dir/deps"
|
||||||
|
"$__project_dir/Tools/dotnetcli/bin/dotnet" restore --source "https://dotnet.myget.org/F/dotnet-core" --packages "$__project_dir/packages"
|
||||||
|
popd
|
||||||
|
|
||||||
|
# cleanup existing packages
|
||||||
|
rm -rf $__project_dir/bin
|
||||||
|
|
||||||
|
# build to produce nupkgs
|
||||||
|
__corerun="$__project_dir/Tools/corerun"
|
||||||
|
__msbuild="$__project_dir/Tools/MSBuild.exe"
|
||||||
|
|
||||||
|
__targets_param=
|
||||||
|
if [ "$(uname -s)" == "Darwin" ]; then
|
||||||
|
__targets_param="TargetsOSX=true"
|
||||||
|
else
|
||||||
|
__targets_param="TargetsLinux=true"
|
||||||
|
init_distro_name
|
||||||
|
fi
|
||||||
|
|
||||||
|
__common_parameters="/p:Platform=$__build_arch /p:DotNetHostBinDir=$__dotnet_host_bin_dir /p:$__targets_param /p:DistroName=$__distro_name /p:HostVersion=$__host_ver /p:HostResolverVersion=$__fxr_ver /p:HostPolicyVersion=$__policy_ver /p:BuildNumberMajor=$__build_major /p:PreReleaseLabel=$__version_tag /verbosity:minimal"
|
||||||
|
|
||||||
|
$__corerun $__msbuild $__project_dir/projects/Microsoft.NETCore.DotNetHostPolicy.builds $__common_parameters || exit 1
|
||||||
|
$__corerun $__msbuild $__project_dir/projects/Microsoft.NETCore.DotNetHostResolver.builds $__common_parameters || exit 1
|
||||||
|
$__corerun $__msbuild $__project_dir/projects/Microsoft.NETCore.DotNetHost.builds $__common_parameters || exit 1
|
||||||
|
|
||||||
|
cp -rf "$__project_dir/bin/packages" "$__dotnet_host_bin_dir"
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
|
||||||
|
<OutputPath>$(PackageOutputPath)</OutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
|
||||||
|
<ItemGroup>
|
||||||
|
<Project Include="Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<OSGroup>Windows_NT</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<OSGroup>Windows_NT</OSGroup>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroName)' == 'rhel'" Include="rhel/Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<OSGroup>Linux</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroName)' == 'ubuntu'" Include="ubuntu/Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<OSGroup>Linux</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<OSGroup>OSX</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<SkipValidatePackage>true</SkipValidatePackage>
|
||||||
|
<PackagePlatforms>x64;x86</PackagePlatforms>
|
||||||
|
<OutputPath>$(PackagesOutputPath)</OutputPath>
|
||||||
|
<IncludeRuntimeJson>true</IncludeRuntimeJson>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="win\Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="win\Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="rhel\Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="osx\Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="ubuntu\Microsoft.NETCore.DotNetHost.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
|
||||||
|
<OutputPath>$(PackageOutputPath)</OutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
|
||||||
|
<ItemGroup>
|
||||||
|
<Project Include="Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<OSGroup>Windows_NT</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<OSGroup>Windows_NT</OSGroup>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroName)' == 'rhel'" Include="rhel/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<OSGroup>Linux</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroName)' == 'ubuntu'" Include="ubuntu/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<OSGroup>Linux</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<OSGroup>OSX</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostPolicyVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<SkipValidatePackage>true</SkipValidatePackage>
|
||||||
|
<PackagePlatforms>x64;x86</PackagePlatforms>
|
||||||
|
<OutputPath>$(PackagesOutputPath)</OutputPath>
|
||||||
|
<IncludeRuntimeJson>true</IncludeRuntimeJson>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHostResolver">
|
||||||
|
<Version>$(HostResolverFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
<ProjectReference Include="win\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="win\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="rhel\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="osx\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="ubuntu\Microsoft.NETCore.DotNetHostPolicy.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
|
||||||
|
<OutputPath>$(PackageOutputPath)</OutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
|
||||||
|
<ItemGroup>
|
||||||
|
<Project Include="Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<OSGroup>Windows_NT</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<OSGroup>Windows_NT</OSGroup>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroName)' == 'rhel'" Include="rhel/Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<OSGroup>Linux</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroName)' == 'ubuntu'" Include="ubuntu/Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<OSGroup>Linux</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<OSGroup>OSX</OSGroup>
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</Project>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostResolverVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<SkipValidatePackage>true</SkipValidatePackage>
|
||||||
|
<PackagePlatforms>x64;x86</PackagePlatforms>
|
||||||
|
<OutputPath>$(PackagesOutputPath)</OutputPath>
|
||||||
|
<IncludeRuntimeJson>true</IncludeRuntimeJson>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHost">
|
||||||
|
<Version>$(HostFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
<ProjectReference Include="win\Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="win\Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="rhel\Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="osx\Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="ubuntu\Microsoft.NETCore.DotNetHostResolver.pkgproj">
|
||||||
|
<Platform>amd64</Platform>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
22
src/corehost/packaging/projects/descriptions.json
Normal file
22
src/corehost/packaging/projects/descriptions.json
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Name": "RuntimePackage",
|
||||||
|
"Description": "Internal implementation package not meant for direct consumption. Please do not reference directly.",
|
||||||
|
"CommonTypes": [ ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Microsoft.NETCore.DotNetHostPolicy",
|
||||||
|
"Description": "Provides a CoreCLR hosting policy implementation -- configuration settings, assembly paths and assembly servicing",
|
||||||
|
"CommonTypes": [ ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Microsoft.NETCore.DotNetHostResolver",
|
||||||
|
"Description": "Provides an implementation of framework resolution strategy used by Microsoft.NETCore.DotNetHost",
|
||||||
|
"CommonTypes": [ ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Microsoft.NETCore.DotNetHost",
|
||||||
|
"Description": "Provides an executable implementation of the Microsoft DotNet Framework and SDK launcher module",
|
||||||
|
"CommonTypes": [ ]
|
||||||
|
},
|
||||||
|
]
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>osx.10.10</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/dotnet" />
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostPolicyVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>osx.10.10</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHostResolver">
|
||||||
|
<Version>$(HostResolverFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/libhostpolicy.dylib" />
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostResolverVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>osx.10.10</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHost">
|
||||||
|
<Version>$(HostFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/libhostfxr.dylib"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>rhel.7</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/dotnet" />
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostPolicyVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>rhel.7</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHostResolver">
|
||||||
|
<Version>$(HostResolverFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/libhostpolicy.so"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostResolverVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>rhel.7</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHost">
|
||||||
|
<Version>$(HostFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/libhostfxr.so"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>ubuntu.14.04</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/dotnet" />
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostPolicyVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>ubuntu.14.04</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHostResolver">
|
||||||
|
<Version>$(HostResolverFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/libhostpolicy.so"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostResolverVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>ubuntu.14.04</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHost">
|
||||||
|
<Version>$(HostFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/libhostfxr.so"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>win7</MinOSForArch>
|
||||||
|
<MinOSForArch Condition="$(PackagePlatform.StartsWith('arm'))">win8</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/dotnet.exe" />
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
<File Include="$(DotNetHostBinDir)/dotnet.pdb" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostPolicyVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>win7</MinOSForArch>
|
||||||
|
<MinOSForArch Condition="$(PackagePlatform.StartsWith('arm'))">win8</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHostResolver">
|
||||||
|
<Version>$(HostResolverFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/hostpolicy.dll"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
<File Include="$(DotNetHostBinDir)/hostpolicy.pdb" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Version>$(HostResolverVersion)</Version>
|
||||||
|
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||||
|
<MinOSForArch>win7</MinOSForArch>
|
||||||
|
<MinOSForArch Condition="$(PackagePlatform.StartsWith('arm'))">win8</MinOSForArch>
|
||||||
|
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Dependency Include="Microsoft.NETCore.DotNetHost">
|
||||||
|
<Version>$(HostFullVersion)</Version>
|
||||||
|
</Dependency>
|
||||||
|
|
||||||
|
<ArchitectureSpecificNativeFile Include="$(DotNetHostBinDir)/hostfxr.dll"/>
|
||||||
|
|
||||||
|
<File Include="@(ArchitectureSpecificNativeFile)">
|
||||||
|
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
|
||||||
|
</File>
|
||||||
|
<File Include="$(ProjectDir)/version.txt" />
|
||||||
|
<File Include="$(DotNetHostBinDir)/hostfxr.pdb" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||||
|
</Project>
|
Loading…
Reference in a new issue