Add installer URL, checksum, and install arguments

This commit is contained in:
Steven Pickles 2020-03-10 09:53:55 -04:00
parent 3a1e464b14
commit b891a8801c

View File

@ -15,34 +15,34 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
#$fileLocation = '\\SHARE_LOCATION\to\INSTALLER_FILE'
# Community Repo: Use official urls for non-redist binaries or redist where total package size is over 200MB
# Internal/Organization: Download from internal location (internet sources are unreliable)
$url = '' # download url, HTTPS preferred
$url64 = '' # 64bit URL here (HTTPS preferred) or remove - if installer contains both (very rare), use $url
$url = 'https://staticcontent.cricut.com/a/software/win32-native/Cricut%20Design%20Space%20Install%20v5.6.19.exe' # download url, HTTPS preferred
#$url64 = '' # 64bit URL here (HTTPS preferred) or remove - if installer contains both (very rare), use $url
$packageArgs = @{
packageName = $env:ChocolateyPackageName
unzipLocation = $toolsDir
fileType = 'EXE_MSI_OR_MSU' #only one of these: exe, msi, msu
fileType = 'EXE' #only one of these: exe, msi, msu
url = $url
url64bit = $url64
#url64bit = $url64
#file = $fileLocation
softwareName = 'CricutDesignSpace*' #part or all of the Display Name as you see it in Programs and Features. It should be enough to be unique
softwareName = 'cricutdesignspace*' #part or all of the Display Name as you see it in Programs and Features. It should be enough to be unique
# Checksums are now required as of 0.10.0.
# To determine checksums, you can get that from the original site if provided.
# You can also use checksum.exe (choco install checksum) and use it
# e.g. checksum -t sha256 -f path\to\file
checksum = ''
checksum = 'E9096A6E69A46AE816075392B722436237811A48E570C5007C9822B7C31B2753'
checksumType = 'sha256' #default is md5, can also be sha1, sha256 or sha512
checksum64 = ''
checksumType64= 'sha256' #default is checksumType
#checksum64 = ''
#checksumType64= 'sha256' #default is checksumType
# MSI
silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" # ALLUSERS=1 DISABLEDESKTOPSHORTCUT=1 ADDDESKTOPICON=0 ADDSTARTMENU=0
validExitCodes= @(0, 3010, 1641)
#silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" # ALLUSERS=1 DISABLEDESKTOPSHORTCUT=1 ADDDESKTOPICON=0 ADDSTARTMENU=0
#validExitCodes= @(0, 3010, 1641)
# OTHERS
# Uncomment matching EXE type (sorted by most to least common)
#silentArgs = '/S' # NSIS
silentArgs = '/S' # NSIS
#silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' # Inno Setup
#silentArgs = '/s' # InstallShield
#silentArgs = '/s /v"/qn"' # InstallShield with MSI
@ -53,14 +53,14 @@ $packageArgs = @{
# Note that some installers, in addition to the silentArgs above, may also need assistance of AHK to achieve silence.
#silentArgs = '' # none; make silent with input macro script like AutoHotKey (AHK)
# https://chocolatey.org/packages/autohotkey.portable
#validExitCodes= @(0) #please insert other valid exit codes here
validExitCodes= @(0) #please insert other valid exit codes here
}
Install-ChocolateyPackage @packageArgs # https://chocolatey.org/docs/helpers-install-chocolatey-package
#Install-ChocolateyPackage @packageArgs # https://chocolatey.org/docs/helpers-install-chocolatey-package
#Install-ChocolateyZipPackage @packageArgs # https://chocolatey.org/docs/helpers-install-chocolatey-zip-package
## If you are making your own internal packages (organizations), you can embed the installer or
## put on internal file share and use the following instead (you'll need to add $file to the above)
#Install-ChocolateyInstallPackage @packageArgs # https://chocolatey.org/docs/helpers-install-chocolatey-install-package
Install-ChocolateyInstallPackage @packageArgs # https://chocolatey.org/docs/helpers-install-chocolatey-install-package
## Main helper functions - these have error handling tucked into them already
## see https://chocolatey.org/docs/helpers-reference