Skip to content

Commit

Permalink
- устранена ошибка при установке через Install-Package (для предыдущи…
Browse files Browse the repository at this point in the history
…х версий chocolatey) 'Файлы этого архивного типа не поддерживаются' (#9)
  • Loading branch information
sergey-s-betke committed Aug 8, 2016
1 parent b92d936 commit a8fb245
Showing 1 changed file with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a8fb245

Please sign in to comment.