Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions assets/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
Comment thread
SteveL-MSFT marked this conversation as resolved.
Resolved
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>
Expand All @@ -24,7 +24,7 @@
</Dependencies>

<Resources>
<Resource Language="en-US"/>
<Resource Language="en-us"/>
</Resources>

<Applications>
Expand All @@ -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>
Expand Down
18 changes: 17 additions & 1 deletion tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ function Start-PSPackage {
ProductNameSuffix = $NameSuffix
ProductSourcePath = $Source
ProductVersion = $Version
Architecture = $WindowsRuntime.Split('-')[1]
Force = $Force
}

Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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"
Expand All @@ -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 = @(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down