diff --git a/packages/magika.vm/magika.vm.nuspec b/packages/magika.vm/magika.vm.nuspec new file mode 100644 index 000000000..dffbeed48 --- /dev/null +++ b/packages/magika.vm/magika.vm.nuspec @@ -0,0 +1,13 @@ + + + + magika.vm + 0.5.0 + Google + Magika is an AI powered file type detection tool that uses deep learning to provide accurate detection. + + + + + + diff --git a/packages/magika.vm/tools/chocolateyinstall.ps1 b/packages/magika.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 000000000..81e4b5f69 --- /dev/null +++ b/packages/magika.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,19 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +try { + $toolName = 'magika' + $category = 'File Information' + $executablePath = $toolName + $arguments = " -h" + $iconLocation = Join-Path ${Env:WinDir} "system32\cmd.exe" -Resolve + + # Create output file to log python module installation details + $outputFile = VM-New-Install-Log ${Env:VM_COMMON_DIR} + + Invoke-Expression "py -3.10 -m pip install $toolName 2>&1 >> $outputFile" + + VM-Install-Shortcut $toolName $category $executablePath -consoleApp $true -arguments $arguments -iconLocation $iconLocation +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/magika.vm/tools/chocolateyuninstall.ps1 b/packages/magika.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 000000000..f75bc5788 --- /dev/null +++ b/packages/magika.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,9 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +$toolName = 'magika' +$category = 'File Information' + +Invoke-Expression "py -3.10 -m pip uninstall $toolName -y" + +VM-Uninstall $toolName $category