Skip to content

Commit

Permalink
Merge pull request #700 from d35ha/ImHex
Browse files Browse the repository at this point in the history
Add the ImHex.vm package
  • Loading branch information
Ana06 authored Oct 19, 2023
2 parents 3e31720 + 53768c8 commit 61b3c00
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/imhex.vm/imhex.vm.nuspec
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>imhex.vm</id>
<version>1.31.0</version>
<authors>WerWolv</authors>
<description>A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="imhex" version="[1.31.0]" />
</dependencies>
</metadata>
</package>
17 changes: 17 additions & 0 deletions packages/imhex.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {
$toolName = 'ImHex'
$category = 'Hex Editors'

$shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category
$shortcut = Join-Path $shortcutDir "$toolName.lnk"
$executablePath = Join-Path ${Env:ChocolateyInstall} "bin\imhex.exe" -Resolve
Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath
VM-Assert-Path $shortcut

VM-Add-To-Right-Click-Menu $toolName $toolName "`"$executablePath`" `"%1`"" "$executablePath"
} catch {
VM-Write-Log-Exception $_
}
8 changes: 8 additions & 0 deletions packages/imhex.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'ImHex'
$category = 'Hex Editors'

VM-Remove-Tool-Shortcut $toolName $category
VM-Remove-From-Right-Click-Menu $toolName

0 comments on commit 61b3c00

Please sign in to comment.