2012-04-21 49 views

回答

0

在现代的Windows(Vista中,Windows 7,更高版本),你有PowerShell的,所以你可以这样做:

# ================================================================== 
_PS=${WINDIR}\System32\WindowsPowerShell\v1.0\powershell.exe 
OAUTHCS_URL=https://cropperplugins.svn.codeplex.com/svn/Cropper.Plugins/OAuth1.0/OAuth.cs 

OAuth.cs: 
    $(_PS) -Command "& {(new-object System.Net.WebClient).DownloadFile('$(OAUTHCS_URL)','OAuth.cs')}" 

如果你不喜欢依赖PowerShell中,你可以使用的wget命令行工具用于窗户,像这样:

CSC=\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe 

Oauth.cs: wget.exe 
    .\wget.exe $(OAUTHCS_URL) 

wget.exe: wget.cs $(CSC) 
    $(CSC) /t:exe /debug+ /out:wget.exe wget.cs 

源为一个可用的wget工具可here