Skip to content

Commit

Permalink
Add ttd-cli.vm
Browse files Browse the repository at this point in the history
  • Loading branch information
d35ha committed Jun 14, 2024
1 parent 24c47d7 commit ca09758
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/ttd.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$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"
$bundlePath = Join-Path ${Env:TEMP} "$($toolName)_1-11-319-0.msixbundle"
Get-ChocolateyWebFile -PackageName $toolName -FileFullPath $bundlePath -Url $bundleUrl -Checksum $bundleSha256 -ChecksumType "sha256"
VM-Assert-Path $bundlePath

# Install the downloaded bundle
Add-AppxPackage -Path $bundlePath

# Attempt to remove downloaded item
Remove-Item $bundlePath -Force -ea 0

VM-Install-Shortcut -toolName $toolName -category $category -executablePath "$toolName.exe" -consoleApp $true -runAsAdmin
} catch {
VM-Write-Log-Exception $_
}
9 changes: 9 additions & 0 deletions packages/ttd.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions packages/ttd.vm/ttd.vm.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>ttd.vm</id>
<version>1.11.319.20240614</version>
<authors>Microsoft</authors>
<description>Time travel debugging command line utility.</description>
<dependencies>
<dependency id="common.vm" />
</dependencies>
</metadata>
</package>

0 comments on commit ca09758

Please sign in to comment.