Update AppX Manifest and Packaging module to conform to MS Sto… (#10878)
This commit is contained in:
parent
4ff9924cbf
commit
87bb1e6f74
|
@ -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">
|
||||
|
||||
<Identity Name="Microsoft.PowerShell" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="$VERSION$" />
|
||||
<Identity Name="Microsoft.$PRODUCTNAME$" ProcessorArchitecture="$ARCH$" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="$VERSION$" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>PowerShell 7</DisplayName>
|
||||
<DisplayName>$DISPLAYNAME$</DisplayName>
|
||||
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
|
||||
<Logo>assets\StoreLogo.png</Logo>
|
||||
<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
|
||||
|
@ -24,7 +24,7 @@
|
|||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="en-US"/>
|
||||
<Resource Language="en-us"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
|
@ -36,7 +36,7 @@
|
|||
</uap3:AppExecutionAlias>
|
||||
</uap3:Extension>
|
||||
</Extensions>
|
||||
<uap:VisualElements DisplayName="PowerShell 7" Description="PowerShell is an automation and configuration management platform. It consists of a cross-platform (Windows, Linux, and macOS) command-line shell and associated scripting language." BackgroundColor="transparent" Square150x150Logo="assets\Square150x150Logo.png" Square44x44Logo="assets\Square44x44Logo.png">
|
||||
<uap:VisualElements DisplayName="$DISPLAYNAME$" Description="PowerShell is an automation and configuration management platform. It consists of a cross-platform (Windows, Linux, and macOS) command-line shell and associated scripting language." BackgroundColor="transparent" Square150x150Logo="assets\Square150x150Logo.png" Square44x44Logo="assets\Square44x44Logo.png">
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
|
|
@ -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 = @(
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue