From 3a71ead75790339371277702e5edf1eaf01df665 Mon Sep 17 00:00:00 2001 From: PankajBhojwani Date: Mon, 26 Jul 2021 09:27:07 -0700 Subject: [PATCH 1/3] Remove some unnecessary font features from our default feature list (#10774) Turns out, DWrite will automatically turn some features on even if they weren't included in the feature vector passed into it. Remove these features from our default list for easier readability. --- src/renderer/dx/DxFontRenderData.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/renderer/dx/DxFontRenderData.cpp b/src/renderer/dx/DxFontRenderData.cpp index c6b1dbf9b..fb3e75138 100644 --- a/src/renderer/dx/DxFontRenderData.cpp +++ b/src/renderer/dx/DxFontRenderData.cpp @@ -467,17 +467,10 @@ void DxFontRenderData::_SetFeatures(const std::unordered_map featureMap{ - { DWRITE_MAKE_FONT_FEATURE_TAG('r', 'l', 'i', 'g'), 1 }, // Required Ligatures - { DWRITE_MAKE_FONT_FEATURE_TAG('r', 'c', 'l', 't'), 1 }, // Required Contextual Alternates - { DWRITE_MAKE_FONT_FEATURE_TAG('l', 'o', 'c', 'l'), 1 }, // Localized Forms - { DWRITE_MAKE_FONT_FEATURE_TAG('c', 'c', 'm', 'p'), 1 }, // Glyph Composition / Decomposition { DWRITE_MAKE_FONT_FEATURE_TAG('c', 'a', 'l', 't'), 1 }, // Contextual Alternates { DWRITE_MAKE_FONT_FEATURE_TAG('l', 'i', 'g', 'a'), 1 }, // Standard Ligatures { DWRITE_MAKE_FONT_FEATURE_TAG('c', 'l', 'i', 'g'), 1 }, // Contextual Ligatures - { DWRITE_MAKE_FONT_FEATURE_TAG('k', 'e', 'r', 'n'), 1 }, // Kerning - { DWRITE_MAKE_FONT_FEATURE_TAG('m', 'a', 'r', 'k'), 1 }, // Mark Positioning - { DWRITE_MAKE_FONT_FEATURE_TAG('m', 'k', 'm', 'k'), 1 }, // Mark to Mark Positioning - { DWRITE_MAKE_FONT_FEATURE_TAG('d', 'i', 's', 't'), 1 } // Distances + { DWRITE_MAKE_FONT_FEATURE_TAG('k', 'e', 'r', 'n'), 1 } // Kerning }; // Update our feature map with the provided features From 862217b04bae69f98703709abf3de8d7ecb8ff18 Mon Sep 17 00:00:00 2001 From: Michael Niksa Date: Mon, 26 Jul 2021 12:31:48 -0700 Subject: [PATCH 2/3] [DefApp] Teach connection and tab to negotiate initial size (#10772) - For tabs started from the Terminal, the initial sizing information is passed into the connection and used to establish the PTY. Those parameters are given over to the `OpenConsole.exe` acting as PTY to establish the initial buffer/window size. - However, for tabs started from outside, the PTY is created with some default buffer information FIRST as the Terminal hasn't even been involved yet. As such, when the Terminal gets that connection, it must tell the PTY to resize just as it connects to match the window size it's about to use. - Ongoing resize operations in the Terminal did and still work fine because they transmitted the updated size with the `ResizePseudoConsole` API. ## Validation Steps Performed - [x] Confirmed existing tabs opening have correct initial size in PTY (like with CMD `mode con` command) - [x] Confirmed inbound cmd tabs have correct initial size in PTY via `mode con` command per bug repro Closes #9811 --- src/cascadia/TerminalApp/TabManagement.cpp | 8 ++++++++ .../TerminalConnection/ConptyConnection.cpp | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/cascadia/TerminalApp/TabManagement.cpp b/src/cascadia/TerminalApp/TabManagement.cpp index 1c753aa43..dd3a7aa7c 100644 --- a/src/cascadia/TerminalApp/TabManagement.cpp +++ b/src/cascadia/TerminalApp/TabManagement.cpp @@ -105,6 +105,14 @@ namespace winrt::TerminalApp::implementation // Create a connection based on the values in our settings object if we weren't given one. auto connection = existingConnection ? existingConnection : _CreateConnectionFromSettings(profileGuid, settings.DefaultSettings()); + // If we had an `existingConnection`, then this is an inbound handoff from somewhere else. + // We need to tell it about our size information so it can match the dimensions of what + // we are about to present. + if (existingConnection) + { + connection.Resize(settings.DefaultSettings().InitialRows(), settings.DefaultSettings().InitialCols()); + } + TerminalConnection::ITerminalConnection debugConnection{ nullptr }; if (_settings.GlobalSettings().DebugFeaturesEnabled()) { diff --git a/src/cascadia/TerminalConnection/ConptyConnection.cpp b/src/cascadia/TerminalConnection/ConptyConnection.cpp index 2be231e80..1589f708d 100644 --- a/src/cascadia/TerminalConnection/ConptyConnection.cpp +++ b/src/cascadia/TerminalConnection/ConptyConnection.cpp @@ -289,12 +289,21 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation { _transitionToState(ConnectionState::Connecting); + const COORD dimensions{ gsl::narrow_cast(_initialCols), gsl::narrow_cast(_initialRows) }; + + // If we do not have pipes already, then this is a fresh connection... not an inbound one that is a received + // handoff from an already-started PTY process. if (!_inPipe) { - const COORD dimensions{ gsl::narrow_cast(_initialCols), gsl::narrow_cast(_initialRows) }; THROW_IF_FAILED(_CreatePseudoConsoleAndPipes(dimensions, PSEUDOCONSOLE_RESIZE_QUIRK | PSEUDOCONSOLE_WIN32_INPUT_MODE, &_inPipe, &_outPipe, &_hPC)); THROW_IF_FAILED(_LaunchAttachedClient()); } + // But if it was an inbound handoff... attempt to synchronize the size of it with what our connection + // window is expecting it to be on the first layout. + else + { + THROW_IF_FAILED(ConptyResizePseudoConsole(_hPC.get(), dimensions)); + } _startTime = std::chrono::high_resolution_clock::now(); @@ -423,11 +432,14 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation void ConptyConnection::Resize(uint32_t rows, uint32_t columns) { - if (!_hPC) + // If we haven't started connecting at all, it's still fair to update + // the initial rows and columns before we set things up. + if (!_isStateAtOrBeyond(ConnectionState::Connecting)) { _initialRows = rows; _initialCols = columns; } + // Otherwise, we can really only dispatch a resize if we're already connected. else if (_isConnected()) { THROW_IF_FAILED(ConptyResizePseudoConsole(_hPC.get(), { Utils::ClampToShortMax(columns, 1), Utils::ClampToShortMax(rows, 1) })); From d43a14c63fc0192d84bde4f6b510d232777c454e Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Mon, 26 Jul 2021 20:14:59 -0500 Subject: [PATCH 3/3] Replace the placeholder release build with our real one (#10778) This pull request ports our old release pipeline from Azure DevOps' editor to real YAML. It includes the following changes on top of a straight-up "export" from Azure: - Converts all queue-time variables into form-based parameters - Adds a "matrix" build strategy for Configs * Platforms - Renames all jobs to have reasonable names - The YAML generator has a bug where it inlines scripts *and* file paths if a task had both; remove old inlines - Removes dead rules - Fixes the WPF build to include the apiset impostor - Migrates the access token into the environment for the one build stage that needs it - Cleans up some of the online script logic - Removes all of the "!is pull request?" checks --- build/pipelines/release.yml | 518 ++++++++++++++++-- .../pipelines/templates/build-console-int.yml | 31 -- .../templates/release-sign-and-bundle.yml | 74 --- 3 files changed, 481 insertions(+), 142 deletions(-) delete mode 100644 build/pipelines/templates/build-console-int.yml delete mode 100644 build/pipelines/templates/release-sign-and-bundle.yml diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml index 847846f83..ff6d49cf7 100644 --- a/build/pipelines/release.yml +++ b/build/pipelines/release.yml @@ -1,48 +1,492 @@ +# This build should never run as CI or against a pull request. trigger: none pr: none +pool: + name: Package ES Standard Build + +parameters: + - name: branding + displayName: "Branding (Build Type)" + type: string + default: Release + values: + - Release + - Preview + - name: buildTerminal + displayName: "Build Windows Terminal MSIX" + type: boolean + default: true + - name: buildTerminalVPack + displayName: "Build Windows Terminal VPack" + type: boolean + default: false + - name: buildWPF + displayName: "Build Terminal WPF Control" + type: boolean + default: false + - name: pgoBuildMode + displayName: "PGO Build Mode" + type: string + default: Optimize + values: + - Optimize + - Instrument + - None + + - name: buildConfigurations + type: object + default: + - Release + - name: buildPlatforms + type: object + default: + - x64 + - x86 + - arm64 + variables: - baseYearForVersioning: 2019 # Used by build-console-int - versionMajor: 0 - versionMinor: 1 + TerminalInternalPackageVersion: "0.0.7" -# When we move off PackageES for Versioning, we'll need to switch -# name to this format. For now, though, we need to use DayOfYear.Rev -# to unique our builds, as mandated by PackageES's Setup task. -# name: '$(versionMajor).$(versionMinor).$(DayOfYear)$(Rev:r).0' -# -# Build name/version number above must end with .0 to make the -# store publication machinery happy. -name: 'Terminal_$(date:yyMM).$(date:dd)$(rev:rrr)' - -# Build Arguments: -# WindowsTerminalOfficialBuild=[true,false] -# true - this is running on our build agent -# false - running locally -# WindowsTerminalBranding=[Dev,Preview,Release] -# - Development build resources (default) -# Preview - Preview build resources -# Release - regular build resources +name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr) +resources: + repositories: + - repository: self + type: git + ref: main jobs: - - template: ./templates/build-console-audit-job.yml - parameters: - platform: x64 +- job: Build + strategy: + matrix: + ${{ each config in parameters.buildConfigurations }}: + ${{ each platform in parameters.buildPlatforms }}: + ${{ config }}_${{ platform }}: + BuildConfiguration: ${{ config }} + BuildPlatform: ${{ platform }} + displayName: Build + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + clean: true + submodules: true + persistCredentials: True + - task: PkgESSetupBuild@10 + displayName: Package ES - Setup Build + inputs: + useDfs: false + productName: OpenConsole + disableOutputRedirect: true + - task: PowerShell@2 + displayName: Rationalize Build Platform + inputs: + targetType: inline + script: >- + $Arch = "$(BuildPlatform)" - - template: ./templates/build-console-int.yml - parameters: - platform: x64 - additionalBuildArguments: /p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=Preview + If ($Arch -Eq "x86") { $Arch = "Win32" } - - template: ./templates/build-console-int.yml - parameters: - platform: x86 - additionalBuildArguments: /p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=Preview + Write-Host "##vso[task.setvariable variable=RationalizedBuildPlatform]${Arch}" + - task: NuGetToolInstaller@1 + displayName: Use NuGet 5.10 + inputs: + versionSpec: 5.10 + - task: NuGetCommand@2 + displayName: NuGet custom + inputs: + command: custom + selectOrConfig: config + nugetConfigPath: NuGet.Config + arguments: restore OpenConsole.sln -SolutionDirectory $(Build.SourcesDirectory) + - task: UniversalPackages@0 + displayName: Download terminal-internal Universal Package + inputs: + feedListDownload: 2b3f8893-a6e8-411f-b197-a9e05576da48 + packageListDownload: e82d490c-af86-4733-9dc4-07b772033204 + versionListDownload: $(TerminalInternalPackageVersion) + - task: TouchdownBuildTask@1 + displayName: Download Localization Files + inputs: + teamId: 7105 + authId: $(TouchdownAppId) + authKey: $(TouchdownAppKey) + resourceFilePath: >- + src\cascadia\TerminalApp\Resources\en-US\Resources.resw - - template: ./templates/build-console-int.yml - parameters: - platform: arm64 - additionalBuildArguments: /p:WindowsTerminalOfficialBuild=true;WindowsTerminalBranding=Preview + src\cascadia\TerminalControl\Resources\en-US\Resources.resw - - template: ./templates/check-formatting.yml + src\cascadia\TerminalConnection\Resources\en-US\Resources.resw - - template: ./templates/release-sign-and-bundle.yml + src\cascadia\TerminalSettingsModel\Resources\en-US\Resources.resw + + src\cascadia\TerminalSettingsEditor\Resources\en-US\Resources.resw + + src\cascadia\WindowsTerminalUniversal\Resources\en-US\Resources.resw + + src\cascadia\CascadiaPackage\Resources\en-US\Resources.resw + appendRelativeDir: true + localizationTarget: false + pseudoSetting: Included + - task: PowerShell@2 + displayName: Move Loc files one level up + inputs: + targetType: inline + script: >- + $Files = Get-ChildItem . -R -Filter 'Resources.resw' | ? FullName -Like '*en-US\*\Resources.resw' + + $Files | % { Move-Item -Verbose $_.Directory $_.Directory.Parent.Parent -EA:Ignore } + pwsh: true + - task: PowerShell@2 + displayName: Generate NOTICE.html from NOTICE.md + inputs: + filePath: .\build\scripts\Generate-ThirdPartyNotices.ps1 + arguments: -MarkdownNoticePath .\NOTICE.md -OutputPath .\src\cascadia\CascadiaPackage\NOTICE.html + pwsh: true + - ${{ if eq(parameters.pgoBuildMode, 'Optimize') }}: + - task: PowerShell@2 + displayName: Restore PGO Database + inputs: + filePath: tools/PGODatabase/restore-pgodb.ps1 + workingDirectory: $(Build.SourcesDirectory)\tools\PGODatabase + - ${{ if eq(parameters.buildTerminal, true) }}: + - task: VSBuild@1 + displayName: Build solution **\OpenConsole.sln + inputs: + solution: '**\OpenConsole.sln' + vsVersion: 16.0 + msbuildArgs: /p:WindowsTerminalOfficialBuild=true /p:WindowsTerminalBranding=${{ parameters.branding }} /t:Terminal\CascadiaPackage;Terminal\WindowsTerminalUniversal /p:WindowsTerminalReleaseBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + clean: true + maximumCpuCount: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: binlog' + condition: failed() + continueOnError: True + inputs: + PathtoPublish: $(Build.SourcesDirectory)\msbuild.binlog + ArtifactName: binlog-$(BuildPlatform) + - ${{ if eq(parameters.pgoBuildMode, 'Optimize') }}: + - task: PowerShell@2 + displayName: Validate binaries are optimized + condition: and(succeeded(), eq(variables['BuildPlatform'], 'x64')) + inputs: + targetType: inline + script: >- + $Binaries = 'OpenConsole.exe', 'WindowsTerminal.exe', 'TerminalApp.dll', 'TerminalConnection.dll', 'Microsoft.Terminal.Control.dll', 'Microsoft.Terminal.Remoting.dll', 'Microsoft.Terminal.Settings.Editor.dll', 'Microsoft.Terminal.Settings.Model.dll' + + foreach ($BinFile in $Binaries) { + + & "$(Build.SourcesDirectory)\tools\PGODatabase\verify-pgo.ps1" "$(Build.SourcesDirectory)/src/cascadia/CascadiaPackage/bin/$(BuildPlatform)/$(BuildConfiguration)/$BinFile" + + } + - task: PowerShell@2 + displayName: Check MSIX for common regressions + inputs: + targetType: inline + script: >- + $Package = Get-ChildItem -Recurse -Filter "CascadiaPackage_*.msix" + + .\build\scripts\Test-WindowsTerminalPackage.ps1 -Verbose -Path $Package.FullName + pwsh: true + - ${{ if eq(parameters.buildWPF, true) }}: + - task: VSBuild@1 + displayName: Build solution **\OpenConsole.sln for PublicTerminalCore + condition: and(succeeded(), ne(variables['BuildPlatform'], 'arm64')) + inputs: + solution: '**\OpenConsole.sln' + vsVersion: 16.0 + msbuildArgs: /p:WindowsTerminalOfficialBuild=true /p:WindowsTerminalBranding=${{ parameters.branding }} /p:WindowsTerminalReleaseBuild=true /t:Terminal\wpf\PublicTerminalCore + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + - task: PowerShell@2 + displayName: Source Index PDBs + inputs: + filePath: build\scripts\Index-Pdbs.ps1 + arguments: -SearchDir '$(Build.SourcesDirectory)' -SourceRoot '$(Build.SourcesDirectory)' -recursive -Verbose -CommitId $(Build.SourceVersion) + errorActionPreference: silentlyContinue + - task: ComponentGovernanceComponentDetection@0 + displayName: Component Detection + - task: PowerShell@2 + displayName: Run Unit Tests + condition: and(succeeded(), or(eq(variables['BuildPlatform'], 'x64'), eq(variables['BuildPlatform'], 'x86'))) + enabled: False + inputs: + filePath: build\scripts\Run-Tests.ps1 + arguments: -MatchPattern '*unit.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' + - task: PowerShell@2 + displayName: Run Feature Tests + condition: and(succeeded(), eq(variables['BuildPlatform'], 'x64')) + enabled: False + inputs: + filePath: build\scripts\Run-Tests.ps1 + arguments: -MatchPattern '*feature.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' + - ${{ if eq(parameters.buildTerminal, true) }}: + - task: CopyFiles@2 + displayName: Copy *.appx/*.msix to Artifacts + inputs: + Contents: >- + **/*.appx + + **/*.msix + + **/*.appxsym + + !**/Microsoft.VCLibs*.appx + TargetFolder: $(Build.ArtifactStagingDirectory)/appx + OverWrite: true + flattenFolders: true + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact (appx) + inputs: + PathtoPublish: $(Build.ArtifactStagingDirectory)/appx + ArtifactName: appx-$(BuildPlatform)-$(BuildConfiguration) + - ${{ if eq(parameters.buildWPF, true) }}: + - task: CopyFiles@2 + displayName: Copy PublicTerminalCore.dll to Artifacts + condition: and(succeeded(), ne(variables['BuildPlatform'], 'arm64')) + inputs: + Contents: >- + **/PublicTerminalCore.dll + + **/api-ms-win-core-synch-l1-2-0.dll + TargetFolder: $(Build.ArtifactStagingDirectory)/wpf + OverWrite: true + flattenFolders: true + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact (PublicTerminalCore) + condition: and(succeeded(), ne(variables['BuildPlatform'], 'arm64')) + inputs: + PathtoPublish: $(Build.ArtifactStagingDirectory)/wpf + ArtifactName: wpf-dll-$(BuildPlatform)-$(BuildConfiguration) + - task: PublishSymbols@2 + displayName: Publish symbols path + continueOnError: True + inputs: + SearchPattern: '**/*.pdb' + IndexSources: false + SymbolServerType: TeamServices + +- ${{ if eq(parameters.buildTerminal, true) }}: + - job: BundleAndSign + displayName: Create and sign AppX/MSIX bundles + dependsOn: Build + steps: + - checkout: self + clean: true + submodules: true + persistCredentials: True + - task: PkgESSetupBuild@10 + displayName: Package ES - Setup Build + inputs: + useDfs: false + productName: OpenConsole + disableOutputRedirect: true + - task: DownloadBuildArtifacts@0 + displayName: Download Artifacts (*.appx, *.msix) + inputs: + downloadType: specific + itemPattern: >- + **/*.msix + + **/*.appx + extractTars: false + - task: PowerShell@2 + displayName: Create WindowsTerminal*.msixbundle + inputs: + filePath: build\scripts\Create-AppxBundle.ps1 + arguments: -InputPath "$(System.ArtifactsDirectory)" -ProjectName CascadiaPackage -BundleVersion 0.0.0.0 -OutputPath "$(System.ArtifactsDirectory)\Microsoft.WindowsTerminal_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle" + - task: PowerShell@2 + displayName: Create WindowsTerminalUniversal*.msixbundle + inputs: + filePath: build\scripts\Create-AppxBundle.ps1 + arguments: -InputPath "$(System.ArtifactsDirectory)" -ProjectName WindowsTerminalUniversal -BundleVersion $(XES_APPXMANIFESTVERSION) -OutputPath "$(System.ArtifactsDirectory)\Microsoft.WindowsTerminalUniversal_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle" + - task: EsrpCodeSigning@1 + displayName: Submit *.msixbundle to ESRP for code signing + inputs: + ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a + FolderPath: $(System.ArtifactsDirectory) + Pattern: Microsoft.WindowsTerminal*.msixbundle + UseMinimatch: true + signConfigType: inlineSignParams + inlineOperation: >- + [ + { + "KeyCode": "Dynamic", + "CertTemplateName": "WINMSAPP1ST", + "CertSubjectName": "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", + "OperationCode": "SigntoolSign", + "Parameters": { + "OpusName": "Microsoft", + "OpusInfo": "http://www.microsoft.com", + "FileDigest": "/fd \"SHA256\"", + "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" + }, + "ToolName": "sign", + "ToolVersion": "1.0" + }, + { + "KeyCode": "Dynamic", + "CertTemplateName": "WINMSAPP1ST", + "CertSubjectName": "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", + "OperationCode": "SigntoolVerify", + "Parameters": {}, + "ToolName": "sign", + "ToolVersion": "1.0" + } + ] + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: appxbundle-signed' + inputs: + PathtoPublish: $(System.ArtifactsDirectory) + ArtifactName: appxbundle-signed + +- ${{ if eq(parameters.buildWPF, true) }}: + - job: PackageAndSignWPF + strategy: + matrix: + ${{ each config in parameters.buildConfigurations }}: + ${{ config }}: + BuildConfiguration: ${{ config }} + displayName: Create NuGet Package (WPF Terminal Control) + dependsOn: Build + steps: + - checkout: self + clean: true + submodules: true + persistCredentials: True + - task: PkgESSetupBuild@10 + displayName: Package ES - Setup Build + inputs: + useDfs: false + productName: OpenConsole + disableOutputRedirect: true + - task: DownloadBuildArtifacts@0 + displayName: Download x86 PublicTerminalCore + inputs: + artifactName: wpf-dll-x86-$(BuildConfiguration) + itemPattern: '**/*.dll' + downloadPath: bin\Win32\$(BuildConfiguration)\ + extractTars: false + - task: DownloadBuildArtifacts@0 + displayName: Download x64 PublicTerminalCore + inputs: + artifactName: wpf-dll-x64-$(BuildConfiguration) + itemPattern: '**/*.dll' + downloadPath: bin\x64\$(BuildConfiguration)\ + extractTars: false + - task: PowerShell@2 + displayName: Move downloaded artifacts up a level + inputs: + targetType: inline + # Find all artifact files and move them up a directory. Ugh. + script: >- + Get-ChildItem bin -Recurse -Directory -Filter wpf-dll-* | % { + $_ | Get-ChildItem -Recurse -File | % { + Move-Item -Verbose $_.FullName $_.Directory.Parent.FullName + } + } + - task: NuGetToolInstaller@1 + displayName: Use NuGet 5.10.0 + inputs: + versionSpec: 5.10.0 + - task: NuGetCommand@2 + displayName: NuGet restore copy + inputs: + selectOrConfig: config + nugetConfigPath: NuGet.Config + - task: VSBuild@1 + displayName: Build solution **\OpenConsole.sln for WPF Control + inputs: + solution: '**\OpenConsole.sln' + vsVersion: 16.0 + msbuildArgs: /p:WindowsTerminalReleaseBuild=$(UseReleaseBranding);Version=$(XES_PACKAGEVERSIONNUMBER) /t:Pack + platform: Any CPU + configuration: $(BuildConfiguration) + maximumCpuCount: true + - task: PublishSymbols@2 + displayName: Publish symbols path + continueOnError: True + inputs: + SearchPattern: '**/*.pdb' + IndexSources: false + SymbolServerType: TeamServices + SymbolsArtifactName: Symbols_WPF_$(BuildConfiguration) + - task: CopyFiles@2 + displayName: Copy *.nupkg to Artifacts + inputs: + Contents: '**/*Wpf*.nupkg' + TargetFolder: $(Build.ArtifactStagingDirectory)/nupkg + OverWrite: true + flattenFolders: true + - task: EsrpCodeSigning@1 + displayName: Submit *.nupkg to ESRP for code signing + inputs: + ConnectedServiceName: 9d6d2960-0793-4d59-943e-78dcb434840a + FolderPath: $(Build.ArtifactStagingDirectory)/nupkg + Pattern: '*.nupkg' + UseMinimatch: true + signConfigType: inlineSignParams + inlineOperation: >- + [ + { + "KeyCode": "CP-401405", + "OperationCode": "NuGetSign", + "Parameters": {}, + "ToolName": "sign", + "ToolVersion": "1.0" + }, + { + "KeyCode": "CP-401405", + "OperationCode": "NuGetVerify", + "Parameters": {}, + "ToolName": "sign", + "ToolVersion": "1.0" + } + ] + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact (nupkg) + inputs: + PathtoPublish: $(Build.ArtifactStagingDirectory)\nupkg + ArtifactName: wpf-nupkg-$(BuildConfiguration) + +- ${{ if eq(parameters.buildTerminalVPack, true) }}: + - job: VPack + displayName: Create Windows vPack + dependsOn: BundleAndSign + steps: + - checkout: self + clean: true + submodules: true + - task: PkgESSetupBuild@12 + displayName: Package ES - Setup Build + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + artifactName: appxbundle-signed + extractTars: false + - task: PowerShell@2 + displayName: Rename and stage packages for vpack + inputs: + targetType: inline + script: >- + # Rename to known/fixed name for Windows build system + + Get-ChildItem Microsoft.WindowsTerminal_*.msixbundle | Rename-Item -NewName { 'Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle' } + + + # Create vpack directory and place item inside + + mkdir WindowsTerminal.app + + mv Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle .\WindowsTerminal.app\ + workingDirectory: $(System.ArtifactsDirectory)\appxbundle-signed + - task: PkgESVPack@10 + displayName: 'Package ES - VPack' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + sourceDirectory: $(System.ArtifactsDirectory)\appxbundle-signed\WindowsTerminal.app + description: Windows Terminal pre-install application + pushPkgName: WindowsTerminal.app + owner: condev +... diff --git a/build/pipelines/templates/build-console-int.yml b/build/pipelines/templates/build-console-int.yml deleted file mode 100644 index cc051df3f..000000000 --- a/build/pipelines/templates/build-console-int.yml +++ /dev/null @@ -1,31 +0,0 @@ -parameters: - configuration: 'Release' - platform: '' - additionalBuildArguments: '' - -jobs: -- job: Build${{ parameters.platform }}${{ parameters.configuration }} - displayName: Build ${{ parameters.platform }} ${{ parameters.configuration }} - variables: - BuildConfiguration: ${{ parameters.configuration }} - BuildPlatform: ${{ parameters.platform }} - PGOBuildMode: 'Optimize' - - pool: - name: Package ES Lab E - demands: - - msbuild - - visualstudio - - vstest - - steps: - - task: PkgESSetupBuild@10 - displayName: 'Package ES - Setup Build' - inputs: - useDfs: false - productName: WindowsTerminal - disableOutputRedirect: true - - - template: build-console-steps.yml - parameters: - additionalBuildArguments: "/p:XesUseOneStoreVersioning=true;XesBaseYearForStoreVersion=$(baseYearForVersioning) ${{ parameters.additionalBuildArguments }}" diff --git a/build/pipelines/templates/release-sign-and-bundle.yml b/build/pipelines/templates/release-sign-and-bundle.yml deleted file mode 100644 index ced32a05f..000000000 --- a/build/pipelines/templates/release-sign-and-bundle.yml +++ /dev/null @@ -1,74 +0,0 @@ -parameters: - configuration: 'Release' - -jobs: -- job: SignDeploy${{ parameters.configuration }} - displayName: Sign and Deploy for ${{ parameters.configuration }} - - dependsOn: - - Buildx64AuditMode - - Buildx64Release - - Buildx86Release - - Buildarm64Release - - CodeFormatCheck - condition: | - and - ( - in(dependencies.Buildx64AuditMode.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), - in(dependencies.Buildx64Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), - in(dependencies.Buildx86Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), - in(dependencies.Buildarm64Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), - in(dependencies.CodeFormatCheck.result, 'Succeeded', 'SucceededWithIssues', 'Skipped') - ) - - variables: - BuildConfiguration: ${{ parameters.configuration }} - AppxProjectName: CascadiaPackage - AppxBundleName: Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle - - pool: - name: Package ES Lab E - - steps: - - checkout: self - clean: true - - - task: PkgESSetupBuild@10 - displayName: 'Package ES - Setup Build' - inputs: - useDfs: false - productName: WindowsTerminal - disableOutputRedirect: true - - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - displayName: 'Component Detection' - - - task: DownloadBuildArtifacts@0 - displayName: Download AppX artifacts - inputs: - artifactName: 'appx-$(BuildConfiguration)' - itemPattern: | - **/*.appx - **/*.msix - downloadPath: '$(Build.ArtifactStagingDirectory)\appx' - - - task: PowerShell@2 - displayName: 'Create $(AppxBundleName)' - inputs: - targetType: filePath - filePath: '.\build\scripts\Create-AppxBundle.ps1' - arguments: | - -InputPath "$(Build.ArtifactStagingDirectory)\appx" -ProjectName $(AppxProjectName) -BundleVersion 0.0.0.0 -OutputPath "$(Build.ArtifactStagingDirectory)\$(AppxBundleName)" - - - task: PkgESCodeSign@10 - displayName: 'Package ES - SignConfig.WindowsTerminal.xml' - inputs: - signConfigXml: 'build\config\SignConfig.WindowsTerminal.xml' - inPathRoot: '$(Build.ArtifactStagingDirectory)' - outPathRoot: '$(Build.ArtifactStagingDirectory)\signed' - - - task: PublishBuildArtifacts@1 - displayName: 'Publish Signed AppX' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\signed' - ArtifactName: 'appxbundle-signed-$(BuildConfiguration)'