Renames to Get-Wix for proper style, and switches to IO.Compression.ZipFile instead of the shell.
This commit is contained in:
Родитель
d474ded6b2
Коммит
0e09bf4a14
|
@ -1,18 +1,15 @@
|
|||
function GetWix {
|
||||
function Get-Wix {
|
||||
param($target)
|
||||
|
||||
Write-Output "Downloading Wix to $target"
|
||||
|
||||
$file = [IO.Path]::GetTempFileName()
|
||||
del $file
|
||||
$file += ".zip"
|
||||
Write-Output " - temporary storage: $file"
|
||||
|
||||
Invoke-WebRequest "https://wix.codeplex.com/downloads/get/1421697" -UseBasicParsing -OutFile $file
|
||||
|
||||
$shell = New-Object -COM Shell.Application
|
||||
$dest = $shell.NameSpace("$target")
|
||||
$shell.NameSpace("$file").items() | %{ $dest.CopyHere($_) }
|
||||
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') | Out-Null
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($file, $target)
|
||||
|
||||
del $file
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ if ($sign -or $mocksign) {
|
|||
|
||||
if (-not (Test-Path $projectDir\Build\Wix\wix.targets)) {
|
||||
Import-Module $projectDir\Build\GetWix.ps1 -Force
|
||||
GetWix (mkdir -Force "$projectDir\Build\Wix") -EA Stop
|
||||
Get-Wix (mkdir -Force "$projectDir\Build\Wix") -EA Stop
|
||||
}
|
||||
|
||||
msbuild $projectDir\Installer\Installer.wixproj `
|
||||
|
|
Загрузка…
Ссылка в новой задаче