Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/migrie/f/sui-panes
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Apr 3, 2024
2 parents e05b2bb + 2bcbe6b commit a0e014f
Show file tree
Hide file tree
Showing 60 changed files with 577 additions and 779 deletions.
2 changes: 2 additions & 0 deletions .github/actions/spelling/allow/microsoft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ DWINRT
enablewttlogging
HOMESHARE
Intelli
issecret
IVisual
libucrt
libucrtd
Expand Down Expand Up @@ -74,6 +75,7 @@ sid
Skype
SRW
sxs
symbolrequestprod
Sysinternals
sysnative
systemroot
Expand Down
2 changes: 2 additions & 0 deletions build/pipelines/ob-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ extends:
publishSymbolsToPublic: true
publishVpackToWindows: false
symbolExpiryTime: 15
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
symbolPublishingProject: $(SymbolPublishingProject)
${{ if eq(true, parameters.publishToAzure) }}:
extraPublishJobs:
- template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self
Expand Down
2 changes: 2 additions & 0 deletions build/pipelines/ob-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,5 @@ extends:
terminalInternalPackageVersion: ${{ parameters.terminalInternalPackageVersion }}
publishSymbolsToPublic: ${{ parameters.publishSymbolsToPublic }}
publishVpackToWindows: ${{ parameters.publishVpackToWindows }}
symbolPublishingSubscription: $(SymbolPublishingServiceConnection)
symbolPublishingProject: $(SymbolPublishingProject)
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
parameters:
- name: includePublicSymbolServer
type: boolean
default: false
- name: pool
type: object
default: []
- name: dependsOn
type: object
default: null
- name: artifactStem
type: string
default: ''
- name: jobName
type: string
default: PublishSymbols
- name: symbolExpiryTime
type: string
default: 36530 # This is the default from PublishSymbols@2
- name: variables
type: object
default: {}
- name: subscription
type: string
- name: symbolProject
type: string

jobs:
- job: ${{ parameters.jobName }}
${{ if ne(length(parameters.pool), 0) }}:
pool: ${{ parameters.pool }}
${{ if eq(parameters.includePublicSymbolServer, true) }}:
displayName: Publish Symbols to Internal and MSDL
${{ else }}:
displayName: Publish Symbols Internally
dependsOn: ${{ parameters.dependsOn }}
variables:
${{ insert }}: ${{ parameters.variables }}
steps:
- checkout: self
clean: true
fetchDepth: 1
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
submodules: true
persistCredentials: True

- task: PkgESSetupBuild@12
displayName: Package ES - Setup Build
inputs:
disableOutputRedirect: true

- task: DownloadPipelineArtifact@2
displayName: Download all PDBs from all prior build phases
inputs:
itemPattern: '**/*.pdb'
targetPath: '$(Build.SourcesDirectory)/bin'

- powershell: |-
Get-PackageProvider -Name NuGet -ForceBootstrap
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
displayName: Install Azure Module Dependencies
# Transit the Azure token from the Service Connection into a secret variable for the rest of the pipeline to use.
- task: AzurePowerShell@5
displayName: Generate an Azure Token
inputs:
azureSubscription: ${{ parameters.subscription }}
azurePowerShellVersion: LatestVersion
pwsh: true
ScriptType: InlineScript
Inline: |-
$AzToken = (Get-AzAccessToken -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token
Write-Host "##vso[task.setvariable variable=SymbolAccessToken;issecret=true]$AzToken"
- task: PublishSymbols@2
displayName: Publish Symbols (to current Azure DevOps tenant)
continueOnError: True
inputs:
SymbolsFolder: '$(Build.SourcesDirectory)/bin'
SearchPattern: '**/*.pdb'
IndexSources: false
DetailedLog: true
SymbolsMaximumWaitTime: 30
SymbolServerType: 'TeamServices'
SymbolsProduct: 'Windows Terminal Converged Symbols'
SymbolsVersion: '$(XES_APPXMANIFESTVERSION)'
SymbolsArtifactName: 'WindowsTerminal_$(XES_APPXMANIFESTVERSION)'
SymbolExpirationInDays: ${{ parameters.symbolExpiryTime }}
env:
LIB: $(Build.SourcesDirectory)

- pwsh: |-
# Prepare the defaults for IRM
$PSDefaultParameterValues['Invoke-RestMethod:Headers'] = @{ Authorization = "Bearer $(SymbolAccessToken)" }
$PSDefaultParameterValues['Invoke-RestMethod:ContentType'] = "application/json"
$PSDefaultParameterValues['Invoke-RestMethod:Method'] = "POST"
$BaseUri = "https://symbolrequestprod.trafficmanager.net/projects/${{ parameters.symbolProject }}/requests"
# Prepare the request
$expiration = (Get-Date).Add([TimeSpan]::FromDays(${{ parameters.symbolExpiryTime }}))
$createRequestBody = @{
requestName = "WindowsTerminal_$(XES_APPXMANIFESTVERSION)";
expirationTime = $expiration.ToString();
}
Write-Host "##[debug]Starting request $($createRequestBody.requestName) with expiration date of $($createRequestBody.expirationTime)"
Invoke-RestMethod -Uri "$BaseUri" -Body ($createRequestBody | ConvertTo-Json -Compress) -Verbose
# Request symbol publication
$publishRequestBody = @{
publishToInternalServer = $true;
publishToPublicServer = $${{ parameters.includePublicSymbolServer }};
}
Write-Host "##[debug]Submitting request $($createRequestBody.requestName) ($($publishRequestBody | ConvertTo-Json -Compress))"
Invoke-RestMethod -Uri "$BaseUri/$($createRequestBody.requestName)" -Body ($publishRequestBody | ConvertTo-Json -Compress) -Verbose
displayName: Publish Symbols using internal REST API
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ parameters:
- name: publishVpackToWindows
type: boolean
default: false
- name: symbolPublishingSubscription
type: string
- name: symbolPublishingProject
type: string

- name: extraPublishJobs
type: object
Expand Down Expand Up @@ -248,12 +252,13 @@ extends:
displayName: Publish
dependsOn: [Build]
jobs:
- template: ./build/pipelines/templates-v2/job-publish-symbols.yml@self
- template: ./build/pipelines/templates-v2/job-publish-symbols-using-symbolrequestprod-api.yml@self
parameters:
pool: { type: windows }
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
symbolPatGoesInTaskInputs: true # onebranch tries to muck with the PAT variable, so we need to change how it get the PAT
symbolExpiryTime: ${{ parameters.symbolExpiryTime }}
subscription: ${{ parameters.symbolPublishingSubscription }}
symbolProject: ${{ parameters.symbolPublishingProject }}
variables:
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
Expand Down
44 changes: 44 additions & 0 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,47 @@ popd
The `bx` will build just the Terminal package, critically, populating the `CascadiaPackage.build.appxrecipe` file. Once that's been built, then the `DeployAppRecipe.exe` command can be used to deploy a loose layout in the same way that Visual Studio does.

Notably, this method of building the Terminal package can't leverage the FastUpToDate check in Visual Studio, so the builds end up being considerably slower for the whole package, as cppwinrt does a lot of work before confirming that it's up to date and doing nothing.


### Are you seeing `DEP0700: Registration of the app failed`?

Once in a blue moon, I get a `DEP0700: Registration of the app failed.
[0x80073CF6] error 0x80070020: Windows cannot register the package because of an
internal error or low memory.` when trying to deploy in VS. For us, that can
happen if the `OpenConsoleProxy.dll` gets locked up, in use by some other
terminal package.

Doing the equivalent command in powershell can give us more info:

```pwsh
Add-AppxPackage -register "Z:\dev\public\OpenConsole\src\cascadia\CascadiaPackage\bin\x64\Debug\AppX\AppxManifest.xml"
```

That'll suggest `NOTE: For additional information, look for [ActivityId]
dbf551f1-83d0-0007-43e7-9cded083da01 in the Event Log or use the command line
Get-AppPackageLog -ActivityID dbf551f1-83d0-0007-43e7-9cded083da01`. So do that:

```pwsh
Get-AppPackageLog -ActivityID dbf551f1-83d0-0007-43e7-9cded083da01
```

which will give you a lot of info. In my case, that revealed that the platform
couldn't delete the packaged com entries. The key line was: `AppX Deployment
operation failed with error 0x0 from API Logging data because access was denied
for file:
C:\ProgramData\Microsoft\Windows\AppRepository\Packages\WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe,
user SID: S-1-5-18`

Take that path, and
```pwsh
sudo start C:\ProgramData\Microsoft\Windows\AppRepository\Packages\WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe
```

(use `sudo`, since the path is otherwise locked down). From there, go into the
`PackagedCom` folder, and open [File
Locksmith](https://learn.microsoft.com/en-us/windows/powertoys/file-locksmith)
(or Process Explorer, if you're more familiar with that) on
`OpenConsoleProxy.dll`. Just go ahead and immediately re-launch it as admin,
too. That should list off a couple terminal processes that are just hanging
around. Go ahead and end them all. You should be good to deploy again after
that.
3 changes: 2 additions & 1 deletion src/buffer/out/textBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,8 @@ void TextBuffer::TriggerNewTextNotification(const std::wstring_view newText)
// - the delimiter class for the given char
DelimiterClass TextBuffer::_GetDelimiterClassAt(const til::point pos, const std::wstring_view wordDelimiters) const
{
return GetRowByOffset(pos.y).DelimiterClassAt(pos.x, wordDelimiters);
const auto realPos = ScreenToBufferPosition(pos);
return GetRowByOffset(realPos.y).DelimiterClassAt(realPos.x, wordDelimiters);
}

// Method Description:
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/de-DE/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@
<data name="Quit" xml:space="preserve">
<value>Beenden</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>Möchten Sie alle Registerkarten schließen?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>Mehrere Bereiche</value>
</data>
Expand Down Expand Up @@ -335,6 +332,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>Mit dem angegebenen Profil öffnen. Akzeptiert entweder den Namen oder die GUID eines Profils</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>Legt die WT_SESSION-Variable fest; muss eine GUID sein.</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>Erstellen eines neuen geteilten Bereichs</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/es-ES/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@
<data name="Quit" xml:space="preserve">
<value>Salir</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>¿Quieres cerrar todas las pestañas?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>Varios paneles</value>
</data>
Expand Down Expand Up @@ -332,6 +329,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>Abre con el perfil determinado. Acepta el nombre o el GUID de un perfil.</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>Establece la variable WT_SESSION; debe ser un GUID</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>Crear un nuevo panel de división</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@
<data name="Quit" xml:space="preserve">
<value>Quitter</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>Voulez-vous fermer tous les onglets ?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>Volets multiples</value>
</data>
Expand Down Expand Up @@ -332,6 +329,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>Ouvrez avec le profil donné. Accepte le nom ou le GUID d’un profil</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>Définit la variable WT_SESSION ; doit être un GUID</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>Créer un volet de fractionnement</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/it-IT/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@
<data name="Quit" xml:space="preserve">
<value>Esci</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>Vuoi chiudere tutte le schede?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>Più riquadri</value>
</data>
Expand Down Expand Up @@ -332,6 +329,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>Apri con il profilo specificato. Accetta il nome oppure il GUID di un profilo</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>Imposta la variabile di WT_SESSION; deve essere un GUID</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>Crea un nuovo riquadro suddiviso</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@
<data name="Quit" xml:space="preserve">
<value>終了</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>すべてのタブを閉じますか?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>複数ウィンドウ</value>
</data>
Expand Down Expand Up @@ -333,6 +330,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>指定されたプロファイルで開きます。プロファイルの名前または GUID を指定できます</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>WT_SESSION 変数を設定します; GUID である必要があります</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>新しい分割ウィンドウの作成</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/ko-KR/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@
<data name="Quit" xml:space="preserve">
<value>끝내기</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>모든 탭을 닫으시겠습니까?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>여러 창</value>
</data>
Expand Down Expand Up @@ -332,6 +329,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>지정된 프로필로 엽니다. 프로필 이름 또는 GUID 허용</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>WT_SESSION 변수를 설정합니다. GUID여야 합니다.</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>새 분할 창 만들기</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/pt-BR/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@
<data name="Quit" xml:space="preserve">
<value>Encerrar</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>Deseja fechar todas as guias?</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>Vários painéis</value>
</data>
Expand Down Expand Up @@ -332,6 +329,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>Abrir com o perfil determinado. Aceite o nome ou o GUID de um perfil</value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>Define a variável WT_SESSION; deve ser um GUID</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>Criar um novo painel dividido</value>
</data>
Expand Down
6 changes: 3 additions & 3 deletions src/cascadia/TerminalApp/Resources/qps-ploc/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@
<data name="Quit" xml:space="preserve">
<value>Qùíт !</value>
</data>
<data name="CloseWindowWarningTitle" xml:space="preserve">
<value>Đǿ ÿõű ŵãŋт тŏ ¢ľòŝê ăŀľ ŧãвŝ? !!! !!! !!!</value>
</data>
<data name="MultiplePanes" xml:space="preserve">
<value>Мµļтíрłĕ φдпėŝ !!! !</value>
</data>
Expand Down Expand Up @@ -340,6 +337,9 @@
<data name="CmdProfileArgDesc" xml:space="preserve">
<value>Θφêп шĩτћ ťнě ģìνēή ρѓøƒìĺę. Âćĉеφťś ёĩτĥėŗ τђė йάмє øя ĠŮΪÐ õƒ а φŕóƒίℓè !!! !!! !!! !!! !!! !!! !!! </value>
</data>
<data name="CmdSessionIdArgDesc" xml:space="preserve">
<value>Šέŧś ŧћэ ẀŦ_ŜÉŜŜІΟΝ νăяíåьłé; mµśτ вэ â ĢŨÎĐ !!! !!! !!! !!! !</value>
</data>
<data name="CmdSplitPaneDesc" xml:space="preserve">
<value>Ĉґéáŧе д ήэẅ ŝφĺĭτ рãňё !!! !!! </value>
</data>
Expand Down
Loading

0 comments on commit a0e014f

Please sign in to comment.