mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 17:53:58 +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)
|
$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 {
|
function Test-Win10SDK {
|
||||||
# The Windows 10 SDK is installed to "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x64",
|
# 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.
|
# 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
|
# These runtimes must match those in project.json
|
||||||
# We do not use ValidateScript since we want tab completion
|
# We do not use ValidateScript since we want tab completion
|
||||||
[ValidateSet("ubuntu.14.04-x64",
|
[ValidateSet("win7-x64",
|
||||||
"ubuntu.16.04-x64",
|
|
||||||
"debian.8-x64",
|
|
||||||
"centos.7-x64",
|
|
||||||
"fedora.24-x64",
|
|
||||||
"win7-x64",
|
|
||||||
"win7-x86",
|
"win7-x86",
|
||||||
"win81-x64",
|
|
||||||
"win10-x64",
|
|
||||||
"osx.10.12-x64",
|
"osx.10.12-x64",
|
||||||
"opensuse.13.2-x64",
|
"linux-x64",
|
||||||
"opensuse.42.1-x64",
|
|
||||||
"linux-arm")]
|
"linux-arm")]
|
||||||
[string]$Runtime,
|
[string]$Runtime,
|
||||||
|
|
||||||
@ -589,18 +573,10 @@ function New-PSOptions {
|
|||||||
# These are duplicated from Start-PSBuild
|
# These are duplicated from Start-PSBuild
|
||||||
# We do not use ValidateScript since we want tab completion
|
# We do not use ValidateScript since we want tab completion
|
||||||
[ValidateSet("",
|
[ValidateSet("",
|
||||||
"ubuntu.14.04-x64",
|
|
||||||
"ubuntu.16.04-x64",
|
|
||||||
"debian.8-x64",
|
|
||||||
"centos.7-x64",
|
|
||||||
"fedora.24-x64",
|
|
||||||
"win7-x86",
|
"win7-x86",
|
||||||
"win7-x64",
|
"win7-x64",
|
||||||
"win81-x64",
|
|
||||||
"win10-x64",
|
|
||||||
"osx.10.12-x64",
|
"osx.10.12-x64",
|
||||||
"opensuse.13.2-x64",
|
"linux-x64",
|
||||||
"opensuse.42.1-x64",
|
|
||||||
"linux-arm")]
|
"linux-arm")]
|
||||||
[string]$Runtime,
|
[string]$Runtime,
|
||||||
|
|
||||||
@ -659,17 +635,23 @@ function New-PSOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (-not $Runtime) {
|
if (-not $Runtime) {
|
||||||
$Runtime = dotnet --info | ForEach-Object {
|
if ($Environment.IsLinux) {
|
||||||
if ($_ -match "RID") {
|
$Runtime = "linux-x64"
|
||||||
$_ -split "\s+" | Select-Object -Last 1
|
} 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,
|
if ($Environment.IsWindows) {
|
||||||
# which supports all supported windows platforms.
|
# We plan to release packages targetting win7-x64 and win7-x86 RIDs,
|
||||||
# So we, will change the RID to win7-<arch>
|
# which supports all supported windows platforms.
|
||||||
if ($Environment.IsWindows) {
|
# So we, will change the RID to win7-<arch>
|
||||||
$Runtime = $Runtime -replace "win\d+", "win7"
|
$Runtime = $RID -replace "win\d+", "win7"
|
||||||
|
} else {
|
||||||
|
$Runtime = $RID
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $Runtime) {
|
if (-not $Runtime) {
|
||||||
@ -1869,18 +1851,10 @@ function Start-CrossGen {
|
|||||||
$PublishPath,
|
$PublishPath,
|
||||||
|
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[ValidateSet("ubuntu.14.04-x64",
|
[ValidateSet("win7-x86",
|
||||||
"ubuntu.16.04-x64",
|
|
||||||
"debian.8-x64",
|
|
||||||
"centos.7-x64",
|
|
||||||
"fedora.24-x64",
|
|
||||||
"win7-x86",
|
|
||||||
"win7-x64",
|
"win7-x64",
|
||||||
"win81-x64",
|
|
||||||
"win10-x64",
|
|
||||||
"osx.10.12-x64",
|
"osx.10.12-x64",
|
||||||
"opensuse.13.2-x64",
|
"linux-x64",
|
||||||
"opensuse.42.1-x64",
|
|
||||||
"linux-arm")]
|
"linux-arm")]
|
||||||
[string]
|
[string]
|
||||||
$Runtime
|
$Runtime
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<AssemblyName>resgen</AssemblyName>
|
<AssemblyName>resgen</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<AssemblyName>TypeCatalogGen</AssemblyName>
|
<AssemblyName>TypeCatalogGen</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<Description>PowerShell top-level project with .NET CLI host</Description>
|
<Description>PowerShell top-level project with .NET CLI host</Description>
|
||||||
<AssemblyName>powershell</AssemblyName>
|
<AssemblyName>powershell</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<Description>PowerShell Core on Windows top-level project</Description>
|
<Description>PowerShell Core on Windows top-level project</Description>
|
||||||
<AssemblyName>powershell</AssemblyName>
|
<AssemblyName>powershell</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifiers>win7-x86;win7-x64;win81-x64;win10-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<Description>PSReadLine basic tests</Description>
|
<Description>PSReadLine basic tests</Description>
|
||||||
<AssemblyName>TestPSReadLine</AssemblyName>
|
<AssemblyName>TestPSReadLine</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>PowerShell On Linux xUnit Tests</Description>
|
<Description>PowerShell On Linux xUnit Tests</Description>
|
||||||
<AssemblyName>powershell-tests</AssemblyName>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<AssemblyName>testexe</AssemblyName>
|
<AssemblyName>testexe</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user