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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dotnet-uninstall-debian-packages.sh
*.exe
*.msi
*.appx
*.msix

# Ignore binaries and symbols
*.pdb
Expand Down
49 changes: 49 additions & 0 deletions assets/AppxManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>

<Package IgnorableNamespaces="uap mp rescap desktop6"
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
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$" />

<Properties>
<DisplayName>PowerShell Core 6</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>assets\StoreLogo.png</Logo>
<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
<desktop6:FileSystemWriteVirtualization>disabled</desktop6:FileSystemWriteVirtualization>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.17763.0" />
</Dependencies>

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

<Applications>
<Application Id="App" Executable="pwsh.exe" EntryPoint="Windows.FullTrustApplication">
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication" Executable="pwsh.exe">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="pwsh.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
<uap:VisualElements DisplayName="PowerShell Core 6" 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>

<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources" />
</Capabilities>
</Package>
Binary file added assets/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Square44x44Logo.targetsize-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 6 additions & 17 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2835,30 +2835,19 @@ function New-MSIXPackage
Set-Content -Path "$ProductSourcePath\AppxManifest.xml" -Value $appxManifest -Force
# Necessary image assets need to be in source assets folder
$assets = @(
'Square150x150Logo'
'Square44x44Logo'
'Square44x44Logo.targetsize-48'
'Square44x44Logo.targetsize-48_altform-unplated'
'StoreLogo'
'Square150x150Logo.png'
'Square44x44Logo.png'
'Square44x44Logo.targetsize-48.png'
'Square44x44Logo.targetsize-48_altform-unplated.png'
'StoreLogo.png'
)

if (!(Test-Path "$ProductSourcePath\assets")) {
$null = New-Item -ItemType Directory -Path "$ProductSourcePath\assets"
}

$isPreview = Test-IsPreview -Version $ProductSemanticVersion
if ($isPreview) {
Write-Verbose "Using Preview assets" -Verbose
}

$assets | ForEach-Object {
if ($isPreview) {
Copy-Item -Path "$RepoRoot\assets\$_-Preview.png" -Destination "$ProductSourcePath\assets\$_.png"
}
else {
Copy-Item -Path "$RepoRoot\assets\$_.png" -Destination "$ProductSourcePath\assets\"
}

Copy-Item -Path "$RepoRoot\assets\$_" -Destination "$ProductSourcePath\assets\"
}

if ($PSCmdlet.ShouldProcess("Create .msix package?")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ COPY wix.psm1 containerFiles/wix.psm1
RUN Import-Module ./containerFiles/wix.psm1; `
Install-WixZip -zipPath \wix.Zip

# Install makeappx and makepri
ADD https://pscoretestdata.blob.core.windows.net/build-files/makeappx/makeappx.zip?sp=r&st=2019-04-05T18:02:52Z&se=2020-04-06T02:02:52Z&spr=https&sv=2018-03-28&sig=t07uC1K3uFLtINQsmorHobgPh%2B%2BBgjFnmHEJGNZT6Hk%3D&sr=b /makeappx.zip
RUN Expand-Archive /makeappx.zip

COPY PowerShellPackage.ps1 /

ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,19 @@ try{
$pspackageParams = @{'Type'='msi'; 'WindowsRuntime'=$Runtime}
}

if (!$ComponentRegistration.IsPresent -and !$Symbols.IsPresent -and $Runtime -notmatch "arm" -and $Runtime -ne 'fxdependent')
if (!$ComponentRegistration.IsPresent -and !$Symbols.IsPresent -and $Runtime -notmatch 'arm' -and $Runtime -ne 'fxdependent')
{
Write-Verbose "Starting powershell packaging(msi)..." -verbose
Start-PSPackage @pspackageParams @releaseTagParam
}

if (!$ComponentRegistration.IsPresent -and !$Symbols.IsPresent -and $Runtime -notin 'win7-x86','fxdependent')
{
$pspackageParams['Type']='msix'
Write-Verbose "Starting powershell packaging(msix)..." -verbose
Start-PSPackage @pspackageParams @releaseTagParam
}

if (!$ComponentRegistration.IsPresent -and $Runtime -ne 'fxdependent')
{
$pspackageParams['Type']='zip'
Expand All @@ -131,7 +138,7 @@ try{

Write-Verbose "Exporting packages ..." -verbose

Get-ChildItem $location\*.msi,$location\*.zip,$location\*.wixpdb | ForEach-Object {
Get-ChildItem $location\*.msi,$location\*.zip,$location\*.wixpdb,$location\*.msix | ForEach-Object {
$file = $_.FullName
Write-Verbose "Copying $file to $destination" -verbose
Copy-Item -Path $file -Destination "$destination\" -Force
Expand Down
17 changes: 17 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parameters:
architecture: x86
version: 6.2.0
msi: yes
msix: yes

steps:
- template: upload-final-results.yml
Expand Down Expand Up @@ -34,3 +35,19 @@ steps:
storage: '$(StorageAccount)'
ContainerName: '$(AzureVersion)'
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))

- template: upload-final-results.yml
parameters:
artifactPath: $(Build.StagingDirectory)\signedPackages
artifactFilter: PowerShell-${{ parameters.version }}-win-${{ parameters.architecture }}.msix
condition: and(succeeded(), eq('${{ parameters.msix }}', 'yes'))

- task: AzureFileCopy@1
displayName: 'upload signed msix to Azure - ${{ parameters.architecture }}'
inputs:
SourcePath: '$(Build.StagingDirectory)\signedPackages\PowerShell-${{ parameters.version }}-win-${{ parameters.architecture }}.msix'
azureSubscription: '$(AzureFileCopySubscription)'
Destination: AzureBlob
storage: '$(StorageAccount)'
ContainerName: '$(AzureVersion)'
condition: and(succeeded(), eq('${{ parameters.msix }}', 'yes'), eq(variables['Build.Reason'], 'Manual'))
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ jobs:
continueOnError: true

- powershell: |
tools/releaseBuild/generatePackgeSigning.ps1 -AuthenticodeFiles "$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x64.msi","$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x86.msi" -path "$(System.ArtifactsDirectory)\package.xml"
$authenticodefiles = @(
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x64.msi"
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x86.msi"
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-x64.msix"
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-arm32.msix"
"$(System.ArtifactsDirectory)\signed\PowerShell-$(Version)-win-arm64.msix"
)
tools/releaseBuild/generatePackgeSigning.ps1 -AuthenticodeFiles $authenticodeFiles -path "$(System.ArtifactsDirectory)\package.xml"
displayName: 'Generate Package Signing Xml'

- powershell: |
Expand All @@ -56,6 +63,7 @@ jobs:
parameters:
architecture: x86
version: $(version)
msix: no

- template: upload.yml
parameters:
Expand All @@ -79,6 +87,7 @@ jobs:
architecture: fxdependent
version: $(version)
msi: no
msix: no

- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3
displayName: 'Run Defender Scan'
Expand Down
6 changes: 3 additions & 3 deletions tools/releaseBuild/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
],
"DockerImageName": "ps-winsrvcore",
"BinaryBucket": "signed",
"ArtifactsExpected": 3,
"ArtifactsExpected": 4,
"EnableFeature": [ "ArtifactAsFolder" ]
},
{
Expand Down Expand Up @@ -190,7 +190,7 @@
],
"DockerImageName": "ps-winsrvcore",
"BinaryBucket": "signed",
"ArtifactsExpected": 1,
"ArtifactsExpected": 2,
"EnableFeature": [ "ArtifactAsFolder" ]
},
{
Expand All @@ -209,7 +209,7 @@
],
"DockerImageName": "ps-winsrvcore",
"BinaryBucket": "signed",
"ArtifactsExpected": 1,
"ArtifactsExpected": 2,
"EnableFeature": [ "ArtifactAsFolder" ]
},
{
Expand Down