mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 09:43:57 +08:00
Build powershell core using the generic RID 'linux-x64' (#4841)
This commit is contained in:
parent
a2dd0ca4b5
commit
192803bfcf
66
build.psm1
66
build.psm1
@ -160,14 +160,6 @@ if ( $env:PSModulePath -notcontains $TestModulePath ) {
|
||||
$env:PSModulePath = $TestModulePath+$TestModulePathSeparator+$($env:PSModulePath)
|
||||
}
|
||||
|
||||
#
|
||||
# At the moment, we just support x64 builds. When we support x86 builds, this
|
||||
# check may need to verify the SDK for the specified architecture.
|
||||
#
|
||||
function Get-Win10SDKBinDir {
|
||||
return "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x64"
|
||||
}
|
||||
|
||||
function Test-Win10SDK {
|
||||
# The Windows 10 SDK is installed to "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x64",
|
||||
# but the directory may exist even if the SDK has not been installed.
|
||||
@ -290,18 +282,10 @@ function Start-PSBuild {
|
||||
|
||||
# These runtimes must match those in project.json
|
||||
# We do not use ValidateScript since we want tab completion
|
||||
[ValidateSet("ubuntu.14.04-x64",
|
||||
"ubuntu.16.04-x64",
|
||||
"debian.8-x64",
|
||||
"centos.7-x64",
|
||||
"fedora.24-x64",
|
||||
"win7-x64",
|
||||
[ValidateSet("win7-x64",
|
||||
"win7-x86",
|
||||
"win81-x64",
|
||||
"win10-x64",
|
||||
"osx.10.12-x64",
|
||||
"opensuse.13.2-x64",
|
||||
"opensuse.42.1-x64",
|
||||
"linux-x64",
|
||||
"linux-arm")]
|
||||
[string]$Runtime,
|
||||
|
||||
@ -589,18 +573,10 @@ function New-PSOptions {
|
||||
# These are duplicated from Start-PSBuild
|
||||
# We do not use ValidateScript since we want tab completion
|
||||
[ValidateSet("",
|
||||
"ubuntu.14.04-x64",
|
||||
"ubuntu.16.04-x64",
|
||||
"debian.8-x64",
|
||||
"centos.7-x64",
|
||||
"fedora.24-x64",
|
||||
"win7-x86",
|
||||
"win7-x64",
|
||||
"win81-x64",
|
||||
"win10-x64",
|
||||
"osx.10.12-x64",
|
||||
"opensuse.13.2-x64",
|
||||
"opensuse.42.1-x64",
|
||||
"linux-x64",
|
||||
"linux-arm")]
|
||||
[string]$Runtime,
|
||||
|
||||
@ -659,17 +635,23 @@ function New-PSOptions {
|
||||
}
|
||||
|
||||
if (-not $Runtime) {
|
||||
$Runtime = dotnet --info | ForEach-Object {
|
||||
if ($_ -match "RID") {
|
||||
$_ -split "\s+" | Select-Object -Last 1
|
||||
if ($Environment.IsLinux) {
|
||||
$Runtime = "linux-x64"
|
||||
} else {
|
||||
$RID = dotnet --info | ForEach-Object {
|
||||
if ($_ -match "RID") {
|
||||
$_ -split "\s+" | Select-Object -Last 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# We plan to release packages targetting win7-x64 and win7-x86 RIDs,
|
||||
# which supports all supported windows platforms.
|
||||
# So we, will change the RID to win7-<arch>
|
||||
if ($Environment.IsWindows) {
|
||||
$Runtime = $Runtime -replace "win\d+", "win7"
|
||||
if ($Environment.IsWindows) {
|
||||
# We plan to release packages targetting win7-x64 and win7-x86 RIDs,
|
||||
# which supports all supported windows platforms.
|
||||
# So we, will change the RID to win7-<arch>
|
||||
$Runtime = $RID -replace "win\d+", "win7"
|
||||
} else {
|
||||
$Runtime = $RID
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $Runtime) {
|
||||
@ -1869,18 +1851,10 @@ function Start-CrossGen {
|
||||
$PublishPath,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("ubuntu.14.04-x64",
|
||||
"ubuntu.16.04-x64",
|
||||
"debian.8-x64",
|
||||
"centos.7-x64",
|
||||
"fedora.24-x64",
|
||||
"win7-x86",
|
||||
[ValidateSet("win7-x86",
|
||||
"win7-x64",
|
||||
"win81-x64",
|
||||
"win10-x64",
|
||||
"osx.10.12-x64",
|
||||
"opensuse.13.2-x64",
|
||||
"opensuse.42.1-x64",
|
||||
"linux-x64",
|
||||
"linux-arm")]
|
||||
[string]
|
||||
$Runtime
|
||||
|
@ -5,7 +5,7 @@
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AssemblyName>resgen</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>ubuntu.16.10-x64;ubuntu.16.04-x64;ubuntu.14.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64;osx.10.12-x64;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AssemblyName>TypeCatalogGen</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64;osx.10.12-x64;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Description>PowerShell top-level project with .NET CLI host</Description>
|
||||
<AssemblyName>powershell</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>linux-x64;osx.10.12-x64;</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Description>PowerShell Core on Windows top-level project</Description>
|
||||
<AssemblyName>powershell</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64;win81-x64;win10-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Description>PSReadLine basic tests</Description>
|
||||
<AssemblyName>TestPSReadLine</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64;osx.10.12-x64;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<PropertyGroup>
|
||||
<Description>PowerShell On Linux xUnit Tests</Description>
|
||||
<AssemblyName>powershell-tests</AssemblyName>
|
||||
<RuntimeIdentifiers>ubuntu.14.04-x64;ubuntu.16.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64;osx.10.12-x64;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<AssemblyName>testexe</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifiers>ubuntu.16.04-x64;ubuntu.14.04-x64;debian.8-x64;centos.7-x64;fedora.24-x64;win7-x86;win7-x64;win81-x64;win10-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win7-x86;win7-x64;osx.10.12-x64;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user