Documentation
¶
Overview ¶
Package conptypair is the ConPTY a Windows release carries for Windows 10, whose own drops a paste's bracketed-paste marks and loses 1024-byte blocks of a long write (yetone/magpie#5205): Microsoft's Microsoft.Windows.Console.ConPTY package from nuget.org (MIT), its conpty.dll and the OpenConsole.exe it runs, both signed by Microsoft.
The release fetches the package (go run ./build/conpty), checks it against the SHA-512 nuget.org publishes for it and each file against the SHA-256 pinned here, and embeds the pair (-tags conptypair). At run time Ready writes them to a cache folder and checks them there again before they are loaded. A build without the tag carries none (Bundled is false), and the system's ConPTY is used.
Index ¶
Constants ¶
const SHA512 = "LuqMk9r5oTzeRne35IOlUdSQ7DkjorOIbcnODGZ81MvmUpTr/1VBQz3fAdCNCwkfuR0Mluq+H7rS3Hes/A1fOw=="
SHA512 is the package's hash as nuget.org publishes it (its catalog entry's packageHash, base64), checked against the download.
const URL = "https://api.nuget.org/v3-flatcontainer/microsoft.windows.console.conpty/" + Version + "/microsoft.windows.console.conpty." + Version + ".nupkg"
URL is where the package is fetched, nuget.org's own.
const Version = "1.25.260930003"
Version is the package's version: the one 3leg0ocat ran on Windows 10 19044 with every message whole (#5205).
Variables ¶
var Files = map[string][]File{
"amd64": {
{"conpty.dll", "runtimes/win-x64/native/conpty.dll", "feeef341d891643c62d30b6b07800bc70f0bc148f44cb8c3bee84aa557ae805a"},
{"OpenConsole.exe", "build/native/runtimes/x64/OpenConsole.exe", "3d66b23d0a71bb8eed2b77edc8b9df9bf54ce6c8fb74c863a30e760997f80586"},
},
"arm64": {
{"conpty.dll", "runtimes/win-arm64/native/conpty.dll", "151a02355227710c20c9f8f1eaf68ac4668aa09cdc921adc7ec661804d8eb1bf"},
{"OpenConsole.exe", "build/native/runtimes/arm64/OpenConsole.exe", "4313825a3ba634d113cc6ed3bc8ce735e3c19d360cecd985794787479469f91f"},
},
}
Files are each architecture's pair.
Functions ¶
func Ready ¶
Ready writes the bundled pair under cache (cache/conpty/<Version>/<arch>) unless it is there whole already, checks each file there against its pin, and returns the folder, for its conpty.dll to be loaded. A file that doesn't match is written again; one that still doesn't is an error, and nothing there is to be loaded.