Skip to content

Commit

Permalink
create Binary Ninja package
Browse files Browse the repository at this point in the history
  • Loading branch information
sreinhardt committed Jan 6, 2025
1 parent 3f5fdf0 commit 5835d8d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/binaryninja-free.vm/binaryninja-free.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>binaryninja-free.vm</id>
<version>4.2</version>
<authors>Vector 35, Inc.</authors>
<description>Binary Ninja is an interactive decompiler, disassembler, debugger, and binary analysis platform built by reverse engineers, for reverse engineers.</description>
<dependencies>
<dependency id="common.vm" />
</dependencies>
</metadata>
</package>
29 changes: 29 additions & 0 deletions packages/binaryninja-free.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {
$toolName = 'BinaryNinja Free'
$category = 'Disassemblers'

$packageArgs = @{
packageName = ${Env:ChocolateyPackageName}
fileType = 'exe'
silentArgs = '/S /ALLUSERS=1'
url = 'https://cdn.binary.ninja/installers/binaryninja_free_win64.exe'
checksum = '426aa8219415a64df90562274ae7e420471934c60f3a19c459e982467469cf55'
checksumType = 'sha256'
}

Install-ChocolateyPackage @packageArgs

$toolDir = Join-Path ${Env:ProgramFiles} "Vector35" -Resolve
$toolDir = Join-Path $toolDir "BinaryNinja" -Resolve
$executablePath = Join-Path $toolDir "binaryninja.exe" -Resolve

Install-BinFile -Name $toolname -Path $exe
$executableIcon = Join-Path $toolDir "icon.ico" -Resolve
VM-Install-Shortcut -toolName "binja" -category $category -executablePath $executablePath -IconLocation $executableIcon

} catch {
VM-Write-Log-Exception $_
}
10 changes: 10 additions & 0 deletions packages/binaryninja-free.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'BinaryNinja Free'
$category = 'Disassemblers'
VM-Remove-Tool-Shortcut $toolName $category

Uninstall-BinFile -Name $toolName

VM-Uninstall-With-Uninstaller "Binary Ninja*" $category "EXE" "/S /ALLUSERS=1"

0 comments on commit 5835d8d

Please sign in to comment.