chocolateyinstall.ps1 1.2 KB

12345678910111213141516171819202122232425262728
  1. $ErrorActionPreference = 'Stop';
  2. $packageName = $env:ChocolateyPackageName
  3. $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
  4. $blueBrickExe = Join-Path $toolsDir 'BlueBrick.exe'
  5. $blueBrickLnk = Join-Path ([System.Environment]::GetFolderPath('CommonPrograms')) 'BlueBrick.lnk'
  6. $packageArgs = @{
  7. packageName = $packageName
  8. unzipLocation = $toolsDir
  9. url = 'https://bluebrick.lswproject.com/download/BlueBrick1.8.2.zip' # BlueBrick
  10. checksum = '37645dc4fe22193843b8b662eda983192eaf92b88f5cf0b9542311bbc0857ae7' # BlueBrick
  11. checksumType = 'sha256' # BlueBrick
  12. }
  13. $partsPackageArgs = @{
  14. packageName = $packageName
  15. unzipLocation = $toolsDir
  16. url = 'https://bluebrick.lswproject.com/download/AllAdditionalParts.zip'
  17. checksum = 'f728151147d8c862ce88e50f1bf9cb2b748734f52417be8bb9c11fdf60f2150b'
  18. checksumType = 'sha256'
  19. }
  20. Install-ChocolateyZipPackage @packageArgs
  21. Install-ChocolateyZipPackage @partsPackageArgs
  22. Install-ChocolateyShortcut `
  23. -ShortcutFilePath $blueBrickLnk `
  24. -TargetPath $blueBrickExe `
  25. -Description 'Plan LEGO® Layout with BlueBrick'