Build behind proxy and appveyor.

Fixes #79. Uses Download-File function from d654a53ec43038c42344f9cdbe0abc5b8ff9b387

Create appveyor.yml

Should send build notifications to gitter as well.

Adds appveyor build status badge.

Always compile launcher for AppVeyor

This is to catch any errors that may be caused by changes to the launcher or any outside scripts.
This commit is contained in:
Martin Kemp
2015-10-13 09:40:48 +01:00
parent 2a26026749
commit 46fed27096
4 changed files with 57 additions and 2 deletions

View File

@ -74,7 +74,7 @@ if ($config -ne "") {
} else { $ConEmuXml = "" }
} else { $ConEmuXml = "" }
$vend = $pwd
foreach ($s in $sources) {
if($Full -eq $false -and $s.name -eq "git-for-windows"){
Continue
@ -87,7 +87,7 @@ foreach ($s in $sources) {
Delete-Existing $tempArchive
Delete-Existing $s.name
Invoke-WebRequest -Uri $s.url -OutFile $tempArchive -ErrorAction Stop
Download-File -Url $s.url -File $vend\$tempArchive -ErrorAction Stop
Extract-Archive $tempArchive $s.name
if ((Get-Childitem $s.name).Count -eq 1) {

View File

@ -89,3 +89,16 @@ function Register-Cmder(){
New-Item -Path "HKCR:\Directory\Shell\Cmder\Command" -Force -Value "`"$PathToExe`" `"$Command`" "
}
}
function Download-File {
param (
$Url,
$File
)
# I think this is the problem
$File = $File -Replace "/", "\"
Write-Verbose "Downloading from $Url to $File"
$wc = new-object System.Net.WebClient
$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;
$wc.DownloadFile($Url, $File)
}