-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/didier-stevens-beta.vm/didier-stevens-beta.vm.nuspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>didier-stevens-beta.vm</id> | ||
<version>0.0.0.20231221</version> | ||
<authors>Didier Stevens</authors> | ||
<description>Beta versions of Didier Stevens's software</description> | ||
<dependencies> | ||
<dependency id="common.vm" /> | ||
<dependency id="python3.vm" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
31 changes: 31 additions & 0 deletions
31
packages/didier-stevens-beta.vm/tools/chocolateyinstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
$category = 'Office' | ||
$zipUrl = 'https://github.com/DidierStevens/Beta/archive/cbb1d5c32d02b4e07128a197c8b8fb6ea597916a.zip' | ||
$zipSha256 = 'e9d83063f45f8e2791d33de194a46850bd7f1921e755bd4651c769cbcdbd5052' | ||
|
||
$packageArgs = @{ | ||
packageName = ${Env:ChocolateyPackageName} | ||
unzipLocation = ${Env:RAW_TOOLS_DIR} | ||
url = $zipUrl | ||
checksum = $zipSha256 | ||
checksumType = 'sha256' | ||
} | ||
Install-ChocolateyZipPackage @packageArgs | ||
$toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\Beta-*" | ||
VM-Assert-Path $toolDir | ||
|
||
# Add shortcut for commonly used office tools | ||
ForEach ($toolName in @('onedump')) { | ||
$executablePath = Join-Path $toolDir "$toolName.py" | ||
VM-Install-Shortcut $toolName $category $executablePath -consoleApp $true -arguments "--help" | ||
} | ||
|
||
# Add tools to Path | ||
$path = [Environment]::GetEnvironmentVariable("Path", "Machine") + [IO.Path]::PathSeparator + $toolDir | ||
[Environment]::SetEnvironmentVariable("Path", $path, "Machine") | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/didier-stevens-beta.vm/tools/chocolateyuninstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
# Remove shortcuts | ||
$category = 'Office' | ||
ForEach ($toolName in @('onedump')) { | ||
VM-Remove-Tool-Shortcut $toolName $category | ||
} | ||
|
||
# Remove tool directory | ||
$toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\Beta-*" | ||
Remove-Item $toolDir -Recurse -Force -ea 0 |