Skip to content

Commit 813d388

Browse files
Revert "Replace win7 runtime with win8 and remove APISets (PowerShell#18304)" (PowerShell#18322)
1 parent 01948ae commit 813d388

File tree

20 files changed

+53
-52
lines changed

20 files changed

+53
-52
lines changed

.vsts-ci/windows/templates/windows-packaging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ parameters:
44
- name: jobName
55
default: 'win_packaging'
66
- name: runtimePrefix
7-
default: 'win81'
7+
default: 'win7'
88
- name: architecture
99
default: 'x64'
1010
- name: channel

build.psm1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function Test-IsReleaseCandidate
270270
return $false
271271
}
272272

273-
$optimizedFddRegex = 'fxdependent-(linux|alpine|win|win81|osx)-(x64|x86|arm64|arm)'
273+
$optimizedFddRegex = 'fxdependent-(linux|alpine|win|win7|osx)-(x64|x86|arm64|arm)'
274274

275275
function Start-PSBuild {
276276
[CmdletBinding(DefaultParameterSetName="Default")]
@@ -315,8 +315,8 @@ function Start-PSBuild {
315315
"osx-x64",
316316
"win-arm",
317317
"win-arm64",
318-
"win81-x64",
319-
"win81-x86")]
318+
"win7-x64",
319+
"win7-x86")]
320320
[string]$Runtime,
321321

322322
[ValidateSet('Debug', 'Release', 'CodeCoverage', 'StaticAnalysis', '')] # We might need "Checked" as well
@@ -349,8 +349,8 @@ function Start-PSBuild {
349349
}
350350

351351
if ($ForMinimalSize) {
352-
if ($Runtime -and "linux-x64", "win81-x64", "osx-x64" -notcontains $Runtime) {
353-
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win81-x64', 'osx-x64'"
352+
if ($Runtime -and "linux-x64", "win7-x64", "osx-x64" -notcontains $Runtime) {
353+
throw "Build for the minimal size is enabled only for following runtimes: 'linux-x64', 'win7-x64', 'osx-x64'"
354354
}
355355
}
356356

@@ -528,7 +528,7 @@ Fix steps:
528528
if ($Options.Runtime -notlike 'fxdependent*' -or $Options.Runtime -match $optimizedFddRegex) {
529529
Write-Verbose "Building without shim" -Verbose
530530
$sdkToUse = 'Microsoft.NET.Sdk'
531-
if ($Options.Runtime -like 'win81-*' -and !$ForMinimalSize) {
531+
if ($Options.Runtime -like 'win7-*' -and !$ForMinimalSize) {
532532
## WPF/WinForm and the PowerShell GraphicalHost assemblies are included
533533
## when 'Microsoft.NET.Sdk.WindowsDesktop' is used.
534534
$sdkToUse = 'Microsoft.NET.Sdk.WindowsDesktop'
@@ -721,7 +721,7 @@ function Restore-PSPackage
721721
}
722722
else {
723723
$sdkToUse = 'Microsoft.NET.Sdk'
724-
if ($Options.Runtime -like 'win81-*' -and !$Options.ForMinimalSize) {
724+
if ($Options.Runtime -like 'win7-*' -and !$Options.ForMinimalSize) {
725725
$sdkToUse = 'Microsoft.NET.Sdk.WindowsDesktop'
726726
}
727727
}
@@ -836,8 +836,8 @@ function New-PSOptions {
836836
"osx-x64",
837837
"win-arm",
838838
"win-arm64",
839-
"win81-x64",
840-
"win81-x86")]
839+
"win7-x64",
840+
"win7-x86")]
841841
[string]$Runtime,
842842

843843
# Accept a path to the output directory
@@ -871,9 +871,9 @@ function New-PSOptions {
871871

872872
switch ($Platform) {
873873
'Windows' {
874-
# For x86 and x64 architectures, we use win81-x64 and win81-x86 RIDs.
874+
# For x86 and x64 architectures, we use win7-x64 and win7-x86 RIDs.
875875
# For arm and arm64 architectures, we use win-arm and win-arm64 RIDs.
876-
$Platform = if ($Architecture[0] -eq 'x') { 'win81' } else { 'win' }
876+
$Platform = if ($Architecture[0] -eq 'x') { 'win7' } else { 'win' }
877877
$Runtime = "${Platform}-${Architecture}"
878878
}
879879

src/ResGen/ResGen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<OutputType>Exe</OutputType>
88
<TieredCompilation>true</TieredCompilation>
99
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
10-
<RuntimeIdentifiers>win81-x86;win81-x64;osx-x64;linux-x64</RuntimeIdentifiers>
10+
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
1111
</PropertyGroup>
1212

1313
</Project>

src/TypeCatalogGen/TypeCatalogGen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<OutputType>Exe</OutputType>
99
<TieredCompilation>true</TieredCompilation>
1010
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
11-
<RuntimeIdentifiers>win81-x86;win81-x64;osx-x64;linux-x64</RuntimeIdentifiers>
11+
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
1212
</PropertyGroup>
1313

1414
</Project>

src/powershell-win-core/powershell-win-core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<TieredCompilation>true</TieredCompilation>
99
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
1010
<TieredCompilationQuickJitForLoops>true</TieredCompilationQuickJitForLoops>
11-
<RuntimeIdentifiers>win81-x86;win81-x64</RuntimeIdentifiers>
11+
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
1212
<RootNamespace>Microsoft.PowerShell</RootNamespace>
1313
<ApplicationManifest>..\..\assets\pwsh.manifest</ApplicationManifest>
1414
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>

test/hosting/hosting.tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<PropertyGroup>
66
<Description>PowerShell hosting SDK xUnit Tests</Description>
77
<AssemblyName>powershell-hosting-tests</AssemblyName>
8+
<!--RuntimeIdentifiers>win7-x86;win7-x64;osx.10.13-x64;linux-x64</RuntimeIdentifiers-->
89
</PropertyGroup>
910

1011
<PropertyGroup>

test/packaging/windows/exe.tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ Describe -Name "Windows EXE" -Fixture {
6363
Context "$Channel-$Runtime" {
6464
BeforeAll {
6565
Write-Verbose "cr-$channel-$runtime" -Verbose
66-
switch -regex ("$channel-$runtime") {
67-
"preview-win\d*-x64" {
66+
switch ("$channel-$runtime") {
67+
"preview-win7-x64" {
6868
$msiUpgradeCode = '39243d76-adaf-42b1-94fb-16ecf83237c8'
6969
}
70-
"stable-win\d*-x64" {
70+
"stable-win7-x64" {
7171
$msiUpgradeCode = '31ab5147-9a97-4452-8443-d9709f0516e1'
7272
}
73-
"preview-win\d*-x86" {
73+
"preview-win7-x86" {
7474
$msiUpgradeCode = '86abcfbd-1ccc-4a88-b8b2-0facfde29094'
7575
}
76-
"stable-win\d*-x86" {
76+
"stable-win7-x86" {
7777
$msiUpgradeCode = '1d00683b-0f84-4db8-a64f-2f98ad42fe06'
7878
}
7979
default {

test/packaging/windows/msi.tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,23 +145,23 @@ Describe -Name "Windows MSI" -Fixture {
145145
$pwshPath = Join-Path $env:ProgramFiles -ChildPath "PowerShell"
146146
$pwshx86Path = Join-Path ${env:ProgramFiles(x86)} -ChildPath "PowerShell"
147147

148-
switch -regex ("$channel-$runtime") {
149-
"preview-win\d*-x64" {
148+
switch ("$channel-$runtime") {
149+
"preview-win7-x64" {
150150
$versionPath = Join-Path -Path $pwshPath -ChildPath '7-preview'
151151
$revisionRange = 0, 99
152152
$msiUpgradeCode = '39243d76-adaf-42b1-94fb-16ecf83237c8'
153153
}
154-
"stable-win\d*-x64" {
154+
"stable-win7-x64" {
155155
$versionPath = Join-Path -Path $pwshPath -ChildPath '7'
156156
$revisionRange = 500, 500
157157
$msiUpgradeCode = '31ab5147-9a97-4452-8443-d9709f0516e1'
158158
}
159-
"preview-win\d*-x86" {
159+
"preview-win7-x86" {
160160
$versionPath = Join-Path -Path $pwshx86Path -ChildPath '7-preview'
161161
$revisionRange = 0, 99
162162
$msiUpgradeCode = '86abcfbd-1ccc-4a88-b8b2-0facfde29094'
163163
}
164-
"stable-win\d*-x86" {
164+
"stable-win7-x86" {
165165
$versionPath = Join-Path -Path $pwshx86Path -ChildPath '7'
166166
$revisionRange = 500, 500
167167
$msiUpgradeCode = '1d00683b-0f84-4db8-a64f-2f98ad42fe06'

test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Describe "Default enablement of Experimental Features" -Tags CI {
167167
It "On stable builds, Experimental Features are not enabled" -Skip:($isPreview) {
168168
foreach ($expFeature in Get-ExperimentalFeature)
169169
{
170-
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win81-x64\publish)
170+
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win7-x64\publish)
171171
# is launched from another pwsh (with $PSHOME like C:\program files\powershell\7)
172172
# resulting in combined PSModulePath which is used by Get-ExperimentalFeature to enum module-scoped exp.features from both pwsh locations.
173173
# So we need to exclude parent's modules' exp.features from verification using filtering on $PSHOME.
@@ -184,7 +184,7 @@ Describe "Default enablement of Experimental Features" -Tags CI {
184184

185185
foreach ($expFeature in Get-ExperimentalFeature)
186186
{
187-
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win81-x64\publish)
187+
# In CI, pwsh that is running tests (with $PSHOME like D:\a\1\s\src\powershell-win-core\bin\release\net7.0\win7-x64\publish)
188188
# is launched from another pwsh (with $PSHOME like C:\program files\powershell\7)
189189
# resulting in combined PSModulePath which is used by Get-ExperimentalFeature to enum module-scoped exp.features from both pwsh locations.
190190
# So we need to exclude parent's modules' exp.features from verification using filtering on $PSHOME.

test/tools/OpenCover/OpenCover.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ function Install-OpenCover
615615
.Description
616616
Invoke-OpenCover runs tests under OpenCover by executing tests on PowerShell located at $PowerShellExeDirectory.
617617
.EXAMPLE
618-
Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/7.0/win81-x64
618+
Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/7.0/win7-x64
619619
#>
620620
function Invoke-OpenCover
621621
{
@@ -624,7 +624,7 @@ function Invoke-OpenCover
624624
[parameter()]$OutputLog = "$HOME/Documents/OpenCover.xml",
625625
[parameter()]$TestPath = "${script:psRepoPath}/test/powershell",
626626
[parameter()]$OpenCoverPath = "$HOME/OpenCover",
627-
[parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/net7.0/win81-x64/publish",
627+
[parameter()]$PowerShellExeDirectory = "${script:psRepoPath}/src/powershell-win-core/bin/CodeCoverage/net7.0/win7-x64/publish",
628628
[parameter()]$PesterLogElevated = "$HOME/Documents/TestResultsElevated.xml",
629629
[parameter()]$PesterLogUnelevated = "$HOME/Documents/TestResultsUnelevated.xml",
630630
[parameter()]$PesterLogFormat = "NUnitXml",

0 commit comments

Comments
 (0)