diff --git a/assets/AppxManifest.xml b/assets/AppxManifest.xml index d24bfd4a7e..29a7fe78e2 100644 --- a/assets/AppxManifest.xml +++ b/assets/AppxManifest.xml @@ -9,10 +9,10 @@ xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"> - + - PowerShell 7 + $DISPLAYNAME$ Microsoft Corporation assets\StoreLogo.png disabled @@ -24,7 +24,7 @@ - + @@ -36,7 +36,7 @@ - + diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 28c26598b8..623121070a 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -337,6 +337,7 @@ function Start-PSPackage { ProductNameSuffix = $NameSuffix ProductSourcePath = $Source ProductVersion = $Version + Architecture = $WindowsRuntime.Split('-')[1] Force = $Force } @@ -2780,6 +2781,11 @@ function New-MSIXPackage [ValidateNotNullOrEmpty()] [string] $ProductSourcePath, + # Processor Architecture + [Parameter(Mandatory = $true)] + [ValidateSet('x64','x86','arm','arm64')] + [string] $Architecture, + # Force overwrite of package [Switch] $Force ) @@ -2810,6 +2816,16 @@ function New-MSIXPackage $packageName += "-$ProductNameSuffix" } + $displayName = $productName + + if ($packageName.Contains('preview')) { + $ProductName += 'Preview' + $displayName += ' Preview' + } + + Write-Verbose -Verbose "ProductName: $productName" + Write-Verbose -Verbose "DisplayName: $displayName" + $ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $ProductVersion if (([Version]$ProductVersion).Revision -eq -1) { $ProductVersion += ".0" @@ -2828,7 +2844,7 @@ function New-MSIXPackage # Appx manifest needs to be in root of source path, but the embedded version needs to be updated $appxManifest = Get-Content "$RepoRoot\assets\AppxManifest.xml" -Raw - $appxManifest = $appxManifest.Replace('$VERSION$', $ProductVersion) + $appxManifest = $appxManifest.Replace('$VERSION$', $ProductVersion).Replace('$ARCH$', $Architecture).Replace('$PRODUCTNAME$', $productName).Replace('$DISPLAYNAME$', $displayName) Set-Content -Path "$ProductSourcePath\AppxManifest.xml" -Value $appxManifest -Force # Necessary image assets need to be in source assets folder $assets = @( diff --git a/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 b/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 index f6e2ae92d4..3f41c7a5dd 100644 --- a/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 +++ b/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 @@ -129,6 +129,7 @@ try{ if (!$ComponentRegistration.IsPresent -and !$Symbols.IsPresent -and $Runtime -notin 'win7-x86','fxdependent', 'fxdependent-win-desktop') { $pspackageParams['Type']='msix' + $pspackageParams['WindowsRuntime']=$Runtime Write-Verbose "Starting powershell packaging(msix)..." -verbose Start-PSPackage @pspackageParams @releaseTagParam }