Open NotWearingPants opened 4 years ago
Alternatively, maybe scoop can download the whole iso, then extract only the 19041.1.191206-1406.vb_release_WindowsSDK.iso\Installers\X64 Debuggers And Tools-x64_en-us.msi
and then use Expand-MsiArchive on that file. Not sure if scoop support extracting iso file, but 7-zip can do that just fine.
The advantage of this method is that there will be no need of download action in the installer script like in your pull request. Which means this will be more secure.
The downside is that the user will need to download much larger file (760 MB iso) just to get the 31MB msi file.
I don't see how this solution is more secure, since the SDK setup, which we verify with a hash, contains the hash of the secondary download. This is what's called a chain of trust, and this is as secure as downloading just the one file.
Having said that, I think the best solution would be for checkver+autoupdate to be able to download the SDK setup and get the real url and hash, but unfortunately they don't support running scripts.
@Ash258
Proposed manifest:
{
"comment": "derived from 'winget show Microsoft.windbg'",
"version": "1.2402.24001.0",
"description": "WinDbg is a debugger that can be used to analyze crash dumps, debug live user-mode and kernel-mode code, and examine CPU registers and memory.",
"homepage": "https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/",
"license": "Proprietary",
"url": "https://windbg.download.prss.microsoft.com/dbazure/prod/1-2402-24001-0/windbg.msixbundle#/dl.7z",
"hash": "e941076cb4d7912d32a22ea87ad2693c01fa465227b4d1ead588283518de428f",
"installer": {
"script": [
"$metadataPath = Join-Path $dir 'AppxMetadata'",
"$xml = [xml](Get-Content (Join-Path $metadataPath 'AppxBundleManifest.xml'))",
"Remove-Item $metadataPath -Force -Recurse",
"$x64Package = $xml.Bundle.Packages.Package | Where-Object Architecture -eq 'x64'",
"Write-Host -ForegroundColor Yellow ('Expanding {0} ({1}) v{2}' -f $x64Package.FileName, $x64Package.Architecture, $x64Package.Version)",
"Expand-Archive (Join-Path $dir $x64Package.FileName) -DestinationPath (Join-Path $dir Application)",
"Get-ChildItem -File $dir | Remove-Item"
]
},
"shortcuts": [
[
"Application/DbgX.Shell.exe",
"WinDbg"
]
],
"bin": [
[
"Application/DbgX.Shell.exe",
"windbg"
]
],
"checkver": {
"url": "https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/windbg-release-notes",
"regex": "<h2 id=\"\\d+\">(?<major>\\d{1,5})\\.(?<minor>\\d{1,5})\\.(?<build>\\d{1,5})\\.(?<revision>\\d{1,5})<\/h2>",
"replace": "${major}.${minor}.${build}.${revision}"
},
"autoupdate": {
"url": "https://windbg.download.prss.microsoft.com/dbazure/prod/$matchMajor-$matchMinor-$matchBuild-$matchRevision/windbg.msixbundle#/dl.7z"
}
}
Hello, please add WinDbg.
WinDbg is the official Windows debugger, made by Microsoft. It is used to debug native Windows programs in both user mode and kernel mode. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/ It is a free program but it doesn't come with Windows.
As you can see here, to install WinDbg you need to download the Windows SDK installer and choose to install "Debugging Tools for Windows" only.
The Windows SDK installer is a WiX installer. It contains manifests which contain the version, and links (and hashes) to other installers, among them is the link to the actual MSI installer belonging to WinDbg (
X64 Debuggers And Tools-x64_en-us.msi
).Thanks!