首先确保安装cmake和powershell(需要6以上,本人升级到了7.5),vs(本人用的vs2022)
powershell,默认是5,会编译不成功,所以附带一个升级的流程
$PSVersionTable.PSVersion 查看当前版本
winget search Microsoft.PowerShell 查找可更新的版本
winget install --id Microsoft.Powershell --source winget 安装新版
winget install --id Microsoft.Powershell.Preview --source winget 安装预览版
以上,先看powershell版本,然后再看可升级的版本,7.5.1和一个7.6.0的预览版,然后安装7.5.1(正式版和预览版二选一就可以,我这里已经安装过了)
由于powershell多个版本是可以共存的,所以需要把默认的powershell换成当前的7.5.1
powershell 7默认安装到C:\Program Files\PowerShell了,把 C:\Program Files\PowerShell\7目录拷贝到 C:\Windows\System32\WindowsPowerShell
将v1.0改成v1.0_old,将目录7改成v1.0,再将v1.0\pwsh.sh改成powershell.exe
大功告成,shift按住右键打开powershell,便可以默认打开7.5.1的新版powershell了
然后下载msquic,参照Building MsQuic
First, clone the repo recursively: git clone --recurse-submodules https://github.com/microsoft/msquic.git
For existing repositories, run git submodule update --init --recursive
to get all the submodules.
然后进入msquic目录
打开powershell,输入./scripts/build.ps1
编译完成后可以在 msquic\build\windows\x64_schannel目录看到msquic.sln
打开后大概是这样