Compare commits
7 Commits
dev/lhecke
...
dev/duhowe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
473b390569 | ||
|
|
e6058b6542 | ||
|
|
9695e46dd4 | ||
|
|
24f946d2d9 | ||
|
|
fd2bf884aa | ||
|
|
52c3bddfbc | ||
|
|
0e281d5e6f |
49
build/OpenConsoleAppxManifest.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:uap17="http://schemas.microsoft.com/appx/manifest/uap/windows10/17" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:desktop5="http://schemas.microsoft.com/appx/manifest/desktop/windows10/5" xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:virtualization="http://schemas.microsoft.com/appx/manifest/virtualization/windows10" IgnorableNamespaces="uap mp rescap uap3 uap17 desktop6 virtualization build" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build">
|
||||
<Identity Name="Microsoft.WindowsConsoleHost" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="%VERSION%" ProcessorArchitecture="%ARCH%" />
|
||||
<Properties>
|
||||
<DisplayName>Windows Console Host</DisplayName>
|
||||
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
|
||||
<Logo>images\StoreLogo.png</Logo>
|
||||
<!-- Older versions of Windows 10 respect this -->
|
||||
<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
|
||||
<!-- Newer versions of Windows 10 plus all versions of Windows 11 respect this -->
|
||||
<virtualization:RegistryWriteVirtualization>
|
||||
<virtualization:ExcludedKeys>
|
||||
<virtualization:ExcludedKey>HKEY_CURRENT_USER\Console\%%Startup</virtualization:ExcludedKey>
|
||||
</virtualization:ExcludedKeys>
|
||||
</virtualization:RegistryWriteVirtualization>
|
||||
<uap17:UpdateWhileInUse>defer</uap17:UpdateWhileInUse>
|
||||
</Properties>
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19041.0" MaxVersionTested="10.0.26100.0" />
|
||||
</Dependencies>
|
||||
<Resources>
|
||||
<Resource Language="EN-US" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" Executable="OpenConsole.exe" EntryPoint="Windows.FullTrustApplication">
|
||||
<uap:VisualElements DisplayName="Windows Console (Preview)" Description="The Windows Console, but fun!" BackgroundColor="transparent" Square150x150Logo="Images\Square150x150Logo.png" Square44x44Logo="Images\Square44x44Logo.png">
|
||||
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" ShortName="Windows Console (Preview)">
|
||||
<uap:ShowNameOnTiles>
|
||||
<uap:ShowOn Tile="square150x150Logo" />
|
||||
<uap:ShowOn Tile="wide310x150Logo" />
|
||||
<uap:ShowOn Tile="square310x310Logo" />
|
||||
</uap:ShowNameOnTiles>
|
||||
</uap:DefaultTile>
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<uap3:Extension Category="windows.appExecutionAlias" Executable="OpenConsole.exe" EntryPoint="Windows.FullTrustApplication">
|
||||
<uap3:AppExecutionAlias>
|
||||
<desktop:ExecutionAlias Alias="OpenConsole.exe" />
|
||||
<desktop:ExecutionAlias Alias="conhost.exe" />
|
||||
</uap3:AppExecutionAlias>
|
||||
</uap3:Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
<rescap:Capability Name="unvirtualizedResources" />
|
||||
</Capabilities>
|
||||
</Package>
|
||||
@@ -8,6 +8,7 @@
|
||||
// ConPTY and DefTerm
|
||||
"PackageContents/OpenConsole.exe",
|
||||
"PackageContents/OpenConsoleProxy.dll",
|
||||
"console.dll",
|
||||
|
||||
// Legacy DLLs with old names
|
||||
"PackageContents/TerminalApp.dll",
|
||||
|
||||
@@ -217,7 +217,6 @@ jobs:
|
||||
# - Directories ending in Lib (static lib projects that we fully linked into DLLs which may also contain unnecessary resources)
|
||||
# - All LocalTests_ project outputs, as they were subsumed into TestHostApp
|
||||
# - All PDB files inside the WindowsTerminal/ output, which do not belong there.
|
||||
# - console.dll, which apparently breaks XFGCheck? lol.
|
||||
- pwsh: |-
|
||||
$binDir = '$(Terminal.BinDir)'
|
||||
$ImportLibs = Get-ChildItem $binDir -Recurse -File -Filter '*.exp' | ForEach-Object { $_.FullName -Replace "exp$","lib" }
|
||||
@@ -234,8 +233,6 @@ jobs:
|
||||
$Items += Get-ChildItem '$(Terminal.BinDir)' -Filter '*.pdb' -Recurse
|
||||
}
|
||||
|
||||
$Items += Get-ChildItem $binDir -Filter 'console.dll'
|
||||
|
||||
$Items | Remove-Item -Recurse -Force -Verbose -ErrorAction:Ignore
|
||||
displayName: Clean up static libs and extra symbols
|
||||
errorActionPreference: silentlyContinue # It's OK if this silently fails
|
||||
@@ -292,7 +289,7 @@ jobs:
|
||||
$PackageFilename = Join-Path $outDir.FullName (Split-Path -Leaf "$(WindowsTerminalPackagePath)")
|
||||
& "$(MakeAppxPath)" pack /h SHA256 /o /p $PackageFilename /d "$(Terminal.BinDir)/PackageContents"
|
||||
Write-Host "##vso[task.setvariable variable=WindowsTerminalPackagePath]${PackageFilename}"
|
||||
displayName: Re-pack the new Terminal package after signing
|
||||
displayName: Re-pack the new Terminal packages after signing
|
||||
|
||||
# Some of our governed pipelines explicitly fail builds that have *any* non-codesigned filed (!)
|
||||
- ${{ if eq(parameters.removeAllNonSignedFiles, true) }}:
|
||||
@@ -313,6 +310,33 @@ jobs:
|
||||
condition: and(succeeded(), ne(variables.WindowsTerminalPackagePath, ''))
|
||||
|
||||
- ${{ if or(parameters.buildTerminal, parameters.buildEverything) }}:
|
||||
# Pack OpenConsole out of the signed _or unsigned_ bits.
|
||||
- pwsh: |-
|
||||
$outDir = Get-Item "$(Terminal.BinDir)/_appx" # Produced by prior step
|
||||
$PackageFilename = "Microsoft.WindowsConsoleHost_$(XES_APPXMANIFESTVERSION)_$(BuildPlatform).msix"
|
||||
$PackagePath = Join-Path $outDir.FullName $PackageFilename
|
||||
$ContentPath = "$(Terminal.BinDir)/OpenConsolePackageContents"
|
||||
$contentDir = New-Item -Type Directory $ContentPath -ErrorAction:Ignore
|
||||
|
||||
$Manifest = [xml](Get-Content build/OpenConsoleAppxManifest.xml)
|
||||
$Manifest.Package.Identity.Version = "$(XES_APPXMANIFESTVERSION)"
|
||||
$Manifest.Package.Identity.ProcessorArchitecture = "$(BuildPlatform)"
|
||||
$Manifest.Save((Join-Path $contentDir.FullName "AppxManifest.xml"))
|
||||
|
||||
If ($Null -Ne (Get-Item "$(Terminal.BinDir)/PackageContents/OpenConsole.exe" -ErrorAction:Ignore)) {
|
||||
New-Item -Type HardLink "$contentDir/OpenConsole.exe" -Target "$(Terminal.BinDir)/PackageContents/OpenConsole.exe"
|
||||
} Else {
|
||||
# Use the unsigned version since the signed one doesn't exist
|
||||
New-Item -Type HardLink "$contentDir/OpenConsole.exe" -Target "$(Terminal.BinDir)/OpenConsole.exe"
|
||||
}
|
||||
New-Item -Type HardLink "$contentDir/console.dll" -Target "$(Terminal.BinDir)/console.dll"
|
||||
Copy-Item .\res\OpenConsole\Images $contentDir -Recurse
|
||||
& build/scripts/New-PriFileFromDirectory.ps1 -Path .\res\OpenConsole\Images -OutputPath (Join-Path $contentDir "resources.pri")
|
||||
|
||||
& "$(MakeAppxPath)" pack /h SHA256 /o /p $PackagePath /d $contentDir
|
||||
Write-Host "##vso[task.setvariable variable=OpenConsolePackagePath]${PackagePath}"
|
||||
displayName: Pack OpenConsole MSIX
|
||||
|
||||
- pwsh: |-
|
||||
$XamlAppxPath = (Get-Item "src\cascadia\CascadiaPackage\AppPackages\*\Dependencies\$(BuildPlatform)\Microsoft.UI.Xaml*.appx").FullName
|
||||
$outDir = New-Item -Type Directory "$(Terminal.BinDir)/_unpackaged" -ErrorAction:Ignore
|
||||
|
||||
@@ -92,8 +92,12 @@ jobs:
|
||||
New-Item -Type Directory "$(System.ArtifactsDirectory)/bundle"
|
||||
$BundlePath = "$(System.ArtifactsDirectory)\bundle\$(BundleStemName)_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle"
|
||||
.\build\scripts\Create-AppxBundle.ps1 -InputPath 'bin/' -ProjectName CascadiaPackage -BundleVersion $BundleVersion -OutputPath $BundlePath
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=MsixBundlePath]${BundlePath}"
|
||||
displayName: Create msixbundle
|
||||
|
||||
$BundlePath = "$(System.ArtifactsDirectory)\bundle\Microsoft.WindowsConsoleHost_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle"
|
||||
.\build\scripts\Create-AppxBundle.ps1 -InputPath 'bin/' -ProjectName Microsoft.WindowsConsoleHost -BundleVersion $BundleVersion -OutputPath $BundlePath
|
||||
displayName: Create msixbundles
|
||||
|
||||
- ${{ if eq(parameters.codeSign, true) }}:
|
||||
- template: steps-esrp-signing.yml
|
||||
@@ -102,7 +106,7 @@ jobs:
|
||||
signingIdentity: ${{ parameters.signingIdentity }}
|
||||
inputs:
|
||||
FolderPath: $(System.ArtifactsDirectory)\bundle
|
||||
Pattern: $(BundleStemName)*.msixbundle
|
||||
Pattern: "*.msixbundle"
|
||||
UseMinimatch: true
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: >-
|
||||
|
||||
56
build/scripts/New-PriFileFromDirectory.ps1
Normal file
@@ -0,0 +1,56 @@
|
||||
Param(
|
||||
[Parameter(Mandatory,
|
||||
HelpMessage="Root Directory")]
|
||||
[string[]]
|
||||
$Path,
|
||||
|
||||
[Parameter(Mandatory,
|
||||
HelpMessage="Output Path")]
|
||||
[string]
|
||||
$OutputPath,
|
||||
|
||||
[Parameter(HelpMessage="Name of index in output file; defaults to 'Application'")]
|
||||
[string]
|
||||
$IndexName = "Application",
|
||||
|
||||
[Parameter(HelpMessage="Path to makepri.exe")]
|
||||
[ValidateScript({Test-Path $_ -Type Leaf})]
|
||||
[string]
|
||||
$MakePriPath = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\MakePri.exe"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$tempDir = Join-Path ([System.IO.Path]::GetTempPath()) "tmp$([Convert]::ToString((Get-Random 65535),16).PadLeft(4,'0')).tmp"
|
||||
New-Item -ItemType Directory -Path $tempDir | Out-Null
|
||||
$priConfig = Join-Path $tempDir "priconfig.xml"
|
||||
|
||||
$projectRoot = Join-Path $tempDir Root
|
||||
New-Item -ItemType Directory -Path $projectRoot | Out-Null
|
||||
|
||||
Copy-Item $Path -Destination $projectRoot -Recurse -Verbose
|
||||
|
||||
@"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources targetOsVersion="10.0.0" majorVersion="1">
|
||||
<index root="\" startIndexAt=".">
|
||||
<default>
|
||||
<qualifier name="Language" value="en-US" />
|
||||
<qualifier name="Contrast" value="standard" />
|
||||
<qualifier name="Scale" value="200" />
|
||||
<qualifier name="HomeRegion" value="001" />
|
||||
<qualifier name="TargetSize" value="256" />
|
||||
<qualifier name="LayoutDirection" value="LTR" />
|
||||
<qualifier name="DXFeatureLevel" value="DX9" />
|
||||
<qualifier name="Configuration" value="" />
|
||||
<qualifier name="AlternateForm" value="" />
|
||||
<qualifier name="Platform" value="UAP" />
|
||||
</default>
|
||||
<indexer-config type="FOLDER" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="." />
|
||||
</index>
|
||||
</resources>
|
||||
"@ | Out-File -Encoding:utf8NoBOM $priConfig
|
||||
|
||||
& $MakePriPath new /pr $projectRoot /cf $priConfig /o /in $IndexName /of $OutputPath
|
||||
|
||||
Remove-Item -Recurse -Force $tempDir
|
||||
BIN
res/OpenConsole/Images/LockScreenLogo.scale-200.png
Normal file
|
After Width: | Height: | Size: 716 B |
BIN
res/OpenConsole/Images/Square150x150Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
res/OpenConsole/Images/Square44x44Logo.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
res/OpenConsole/Images/Square44x44Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 551 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 697 B |
|
After Width: | Height: | Size: 778 B |
BIN
res/OpenConsole/Images/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 719 B |
BIN
res/OpenConsole/Images/Wide310x150Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |