From a8fb24519c1c884c0b50f829b3d709d080d76ccf Mon Sep 17 00:00:00 2001 From: "Sergey S. Betke" Date: Mon, 8 Aug 2016 21:38:10 +0300 Subject: [PATCH] =?UTF-8?q?-=20=D1=83=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA?= =?UTF-8?q?=D0=B5=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20Install-Package=20(?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=B5=D0=B4=D1=8B=D0=B4=D1=83?= =?UTF-8?q?=D1=89=D0=B8=D1=85=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B9=20cho?= =?UTF-8?q?colatey)=20'=D0=A4=D0=B0=D0=B9=D0=BB=D1=8B=20=D1=8D=D1=82=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=B0=D1=80=D1=85=D0=B8=D0=B2=D0=BD=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D1=82=D0=B8=D0=BF=D0=B0=20=D0=BD=D0=B5=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=B8=D0=B2=D0=B0=D1=8E=D1=82?= =?UTF-8?q?=D1=81=D1=8F'=20(#9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signcode.install/chocolateyInstall.ps1 | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/chocolatey/signcode.install/sources/signcode.install/chocolateyInstall.ps1 b/chocolatey/signcode.install/sources/signcode.install/chocolateyInstall.ps1 index 9868752..8165582 100644 --- a/chocolatey/signcode.install/sources/signcode.install/chocolateyInstall.ps1 +++ b/chocolatey/signcode.install/sources/signcode.install/chocolateyInstall.ps1 @@ -6,16 +6,32 @@ $toolsDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition); $DSigUrl = 'http://download.microsoft.com/download/4/7/e/47e8e7fb-9441-4887-988f-e259a443052d/Dsig.EXE'; $signcodePwdUrl = 'http://www.stephan-brenner.com/downloads/signcode-pwd/signcode-pwd_1_02.zip'; +$chocTempDir = $env:TEMP; +$tempDir = Join-Path -Path $chocTempDir -ChildPath $env:chocolateyPackageName; +if ( $env:chocolateyPackageVersion -ne $null ) { + $tempDir = Join-Path -Path $tempDir -ChildPath $env:chocolateyPackageVersion; +}; +if ( ![System.IO.Directory]::Exists($tempDir) ) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null; }; +$filePath = Join-Path -Path $tempDir -ChildPath 'Dsig.zip'; + +$filePath = Get-ChocolateyWebFile ` + -packageName $packageName ` + -fileFullPath $filePath ` + -url $DSigUrl ` +; +Get-ChocolateyUnzip ` + -packageName $packageName ` + -fileFullPath "$filePath" ` + -destination $toolsDir ` +; + $packageArgs = @{ packageName = $packageName; unzipLocation = $toolsDir; - url = $DSigUrl; + url = $signcodePwdUrl; } Install-ChocolateyZipPackage @packageArgs; -$packageArgs.url = $signcodePwdUrl; -Install-ChocolateyZipPackage @packageArgs; - $exitCode = Start-ChocolateyProcessAsAdmin ` -statements @" `$DsigDllInstallFolder = [Environment]::GetFolderPath([Environment+SpecialFolder]::SystemX86);