From d58bcba814c2427a484252533b9ee50e9b104f04 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 7 Jun 2017 19:25:37 -0700 Subject: [PATCH] Re-enable symbols generation on x86 --- build/repo.targets | 27 +++++++++++++++++++++++---- tools/GetSharedFrameworkVersion.ps1 | 2 +- tools/InstallSharedFrameworkx86.ps1 | 28 ++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 tools/InstallSharedFrameworkx86.ps1 diff --git a/build/repo.targets b/build/repo.targets index 8bc3dc002d..ffc26b1bc1 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -36,6 +36,8 @@ $(RepositoryRoot).deps\build\ $(ToolsDir)Build.RuntimeStore.References\ $(RuntimeStoreReferenceDirectory)bin\Release\ + $(RepositoryRoot).build\temp\ + $(PrepareDependsOn); UpdateNuGetConfig @@ -158,15 +160,20 @@ + + + + + + + + + - - - - $(DotnetHomeDirectory)shared\Microsoft.NETCore.App\$(SharedFrameworkVersion) @@ -176,6 +183,18 @@ + + + + + $(BuildTempDirectory)shared\Microsoft.NETCore.App\$(SharedFrameworkVersion) + + + + + + + diff --git a/tools/GetSharedFrameworkVersion.ps1 b/tools/GetSharedFrameworkVersion.ps1 index 9fb7365c08..37772625fe 100644 --- a/tools/GetSharedFrameworkVersion.ps1 +++ b/tools/GetSharedFrameworkVersion.ps1 @@ -3,4 +3,4 @@ $versions = $infoOutput | Select-String -Pattern "version" $FXVersionRaw = $versions | Select-Object -Last 1 $FXVersionString = $FXVersionRaw.ToString() $FXVersion = $FXVersionString.SubString($FXVersionString.IndexOf(':') + 1).Trim() -Write-Host $FXVersion \ No newline at end of file +Write-Host $FXVersion diff --git a/tools/InstallSharedFrameworkx86.ps1 b/tools/InstallSharedFrameworkx86.ps1 new file mode 100644 index 0000000000..9931660110 --- /dev/null +++ b/tools/InstallSharedFrameworkx86.ps1 @@ -0,0 +1,28 @@ +param ( + [string]$sharedRuntimeVersion, + [string]$installationDirectory +) + +$sharedRuntimeChannel = "master" +if ($env:KOREBUILD_DOTNET_SHARED_RUNTIME_CHANNEL) +{ + $sharedRuntimeChannel = $env:KOREBUILD_DOTNET_SHARED_RUNTIME_CHANNEL +} + +function InstallSharedRuntime([string] $version, [string] $channel, [string] $installDir) +{ + $sharedRuntimePath = [IO.Path]::Combine($installDir, 'shared', 'Microsoft.NETCore.App', $version) + # Avoid redownloading the CLI if it's already installed. + if (!(Test-Path $sharedRuntimePath)) + { + & "$PSScriptRoot\..\.build\dotnet\dotnet-install.ps1" ` + -Channel $channel ` + -SharedRuntime ` + -Version $version ` + -Architecture 'x86' ` + -InstallDir $installDir ` + -NoPath + } +} + +InstallSharedRuntime -version $sharedRuntimeVersion -channel $sharedRuntimeChannel -installDir $installationDirectory