mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-13 13:17:55 +08:00
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:
@ -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) {
|
||||
|
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user