From fc6f73a821c398eb88101e250a40d2c9f018cfab Mon Sep 17 00:00:00 2001 From: d35ha Date: Thu, 13 Jun 2024 15:16:14 +0000 Subject: [PATCH] Add ttd.vm --- packages/ttd.vm/tools/chocolateyinstall.ps1 | 26 +++++++++++++++++++ packages/ttd.vm/tools/chocolateyuninstall.ps1 | 9 +++++++ packages/ttd.vm/ttd.vm.nuspec | 12 +++++++++ 3 files changed, 47 insertions(+) create mode 100644 packages/ttd.vm/tools/chocolateyinstall.ps1 create mode 100644 packages/ttd.vm/tools/chocolateyuninstall.ps1 create mode 100644 packages/ttd.vm/ttd.vm.nuspec diff --git a/packages/ttd.vm/tools/chocolateyinstall.ps1 b/packages/ttd.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 000000000..9b78f2231 --- /dev/null +++ b/packages/ttd.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,26 @@ +$ErrorActionPreference = 'Stop' +Import-Module vm.common -Force -DisableNameChecking + +try { + $toolName = "ttd" + $category = "Debuggers" + + # From https://aka.ms/ttd/download + $bundleUrl = "https://windbg.download.prss.microsoft.com/dbazure/prod/1-11-319-0/TTD.msixbundle" + $bundleSha256 = "f7b80731c3a6994b3763c4100073b101965327d6556fa4bfb553d70ce49be366" + + $packageArgs = @{ + packageName = ${Env:ChocolateyPackageName} + url = $bundleUrl + checksum = $bundleSha256 + checksumType = "sha256" + fileFullPath = Join-Path ${Env:TEMP} "$toolName.msixbundle" + } + + Get-ChocolateyWebFile @packageArgs + Add-AppxPackage -Path $packageArgs.fileFullPath + + VM-Install-Shortcut -toolName $toolName -category $category -executablePath "$toolName.exe" -consoleApp $true -runAsAdmin +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/ttd.vm/tools/chocolateyuninstall.ps1 b/packages/ttd.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 000000000..012afc461 --- /dev/null +++ b/packages/ttd.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,9 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +$toolName = "ttd" +$category = "Debuggers" + +VM-Remove-Tool-Shortcut $toolName $category + +Get-AppxPackage *TimeTravelDebugging* | Remove-AppPackage diff --git a/packages/ttd.vm/ttd.vm.nuspec b/packages/ttd.vm/ttd.vm.nuspec new file mode 100644 index 000000000..fdba5507a --- /dev/null +++ b/packages/ttd.vm/ttd.vm.nuspec @@ -0,0 +1,12 @@ + + + + ttd.vm + 1.11.319.20240614 + Microsoft + Time travel debugging command line utility. + + + + +