chocolatey-packages/cricut-design-space/tools/chocolateyinstall.ps1
Adam Goldsmith 9b13e4c80c
All checks were successful
/ Build-Chocolatey-Packages (push) Successful in 1m8s
cricut-design-space: Extract files directly instead of running installer
2024-12-16 15:15:33 -05:00

31 lines
1.0 KiB
PowerShell

$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$installDir = "C:\Program Files (x86)\Cricut Design Space\"
$packageArgs = @{
packageName = $env:ChocolateyPackageName
File = '\\ucs\software\CricutDesignSpace-Install-v8.60.67.exe'
Checksum = '78b04935a1be4cef0e9f690a75b53c86c5783d8491760a5dada709544cf25d0c'
ChecksumType = 'sha256'
UnzipLocation = $toolsDir
}
Install-ChocolateyZipPackage @packageArgs
$innerPackageArgs = @{
File = "$(Join-Path $toolsDir '$PLUGINSDIR/app-32.7z')"
Destination = $installDir
}
Get-ChocolateyUnzip @innerPackageArgs
$shortcutArgs = @{
ShortcutFilePath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cricut Design Space.lnk"
TargetPath = "$(Join-Path $installDir 'Cricut Design Space.exe')"
WorkingDirectory = $installDir
IconLocation = "$(Join-Path $installDir 'Cricut Design Space.exe')"
Description = "Cricut Design Space Application"
}
Install-ChocolateyShortcut @shortcutArgs