From dbaa52a12ebca960f34335ba49c8681dd4b702d4 Mon Sep 17 00:00:00 2001 From: Eric Fontana Date: Mon, 13 Apr 2015 07:31:06 -0400 Subject: [PATCH] Embed the MSI into chocolatey package --- chocolateyInstall.ps1.template | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/chocolateyInstall.ps1.template b/chocolateyInstall.ps1.template index 63002c1..f2c908b 100644 --- a/chocolateyInstall.ps1.template +++ b/chocolateyInstall.ps1.template @@ -1,8 +1,14 @@ $packageName = 'TimberWinR-${version}' -$installerType = 'msi' -$url = 'http://www.ericfontana.com/TimberWinR/TimberWinR-${version}.0.msi' +$fileType = 'msi' $silentArgs = '/quiet' -$validExitCodes = @(0) -Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes +$scriptPath = $(Split-Path $MyInvocation.MyCommand.Path) +$fileFullPath = Join-Path $scriptPath 'TimberWinR-${version}' +try { + Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $fileFullPath +} catch { + Write-ChocolateyFailure $packageName $($_.Exception.Message) + throw +} +