From 48905089353a175149aab5416d71bb107724acc0 Mon Sep 17 00:00:00 2001 From: Eric Fontana Date: Wed, 27 Aug 2014 09:54:52 -0400 Subject: [PATCH] Added chocolatey --- tools/chocolateyInstall.ps1 | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tools/chocolateyInstall.ps1 diff --git a/tools/chocolateyInstall.ps1 b/tools/chocolateyInstall.ps1 new file mode 100644 index 0000000..e6e8cd7 --- /dev/null +++ b/tools/chocolateyInstall.ps1 @@ -0,0 +1,46 @@ +#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one + +$packageName = 'TimberWinR' # arbitrary name for the package, used in messages +$installerType = 'msi' #only one of these: exe, msi, msu +$url = 'http://www.ericfontana.com/TimberWix/TimberWinR-1.2.175.0.msi' # download url +$silentArgs = '/quiet' # "/s /S /q /Q /quiet /silent /SILENT /VERYSILENT" # try any of these to get the silent installer #msi is always /quiet +$validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx + +# main helpers - these have error handling tucked into them already +# installer, will assert administrative rights + +# if removing $url64, please remove from here +Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes +# download and unpack a zip file + +#try { #error handling is only necessary if you need to do anything in addition to/instead of the main helpers + # other helpers - using any of these means you want to uncomment the error handling up top and at bottom. + # downloader that the main helpers use to download items + + # if removing $url64, please remove from here + #Get-ChocolateyWebFile "$packageName" 'DOWNLOAD_TO_FILE_FULL_PATH' "$url" "$url64" + # installer, will assert administrative rights - used by Install-ChocolateyPackage + #Install-ChocolateyInstallPackage "$packageName" "$installerType" "$silentArgs" '_FULLFILEPATH_' -validExitCodes $validExitCodes + # unzips a file to the specified location - auto overwrites existing content + #Get-ChocolateyUnzip "FULL_LOCATION_TO_ZIP.zip" "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" + # Runs processes asserting UAC, will assert administrative rights - used by Install-ChocolateyInstallPackage + #Start-ChocolateyProcessAsAdmin 'STATEMENTS_TO_RUN' 'Optional_Application_If_Not_PowerShell' -validExitCodes $validExitCodes + # add specific folders to the path - any executables found in the chocolatey package folder will already be on the path. This is used in addition to that or for cases when a native installer doesn't add things to the path. + #Install-ChocolateyPath 'LOCATION_TO_ADD_TO_PATH' 'User_OR_Machine' # Machine will assert administrative rights + # add specific files as shortcuts to the desktop + #$target = Join-Path $MyInvocation.MyCommand.Definition "$($packageName).exe" + #Install-ChocolateyDesktopLink $target + + #------- ADDITIONAL SETUP -------# + # make sure to uncomment the error handling if you have additional setup to do + + # outputs the bitness of the OS (either "32" or "64") + #$osBitness = Get-ProcessorBits + + + # the following is all part of error handling + #Write-ChocolateySuccess "$packageName" +#} catch { + #Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)" + #throw +#}