diff --git a/.github/workflows/windows-native.yml b/.github/workflows/windows-native.yml index ab6d2a703e..4992be0ef2 100644 --- a/.github/workflows/windows-native.yml +++ b/.github/workflows/windows-native.yml @@ -59,7 +59,9 @@ jobs: dir :: VisualStudioSetup.exe --help vs_buildtools.exe --quiet --force - :: VisualStudioSetup.exe --locale en-US --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.CoreBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --path install="C:\VS" --path cache="C:\VS\cache" --path shared="C:\VS\shared" --quiet --norestart --force + vs_buildtools.exe --quiet --force --verify + VisualStudioSetup.exe --locale en-US --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.CoreBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --path install="D:\VS" --path cache="D:\VS\cache" --path shared="D:\VS\shared" --quiet --norestart --force + VisualStudioSetup.exe --locale en-US --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.CoreBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --path install="D:\VS" --path cache="D:\VS\cache" --path shared="D:\VS\shared" --quiet --norestart --force --verify - uses: microsoft/setup-msbuild@v2 with: diff --git a/sapi/quickstart/windows/windows-php-native.md b/sapi/quickstart/windows/windows-php-native.md index 0da2d52826..07b81d2b57 100644 --- a/sapi/quickstart/windows/windows-php-native.md +++ b/sapi/quickstart/windows/windows-php-native.md @@ -9,10 +9,14 @@ https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=community&channel=R https://aka.ms/vs/17/release/vs_buildtools.exe +curl -Lo VisualStudioSetup.exe 'https://c2rsetup.officeapps.live.com/c2r/downloadVS.aspx?sku=community&channel=Release&version=VS2022' +curl -Lo VisualStudioSetup.exe 'https://aka.ms/vs/17/release/vs_community.exe' +curl -Lo vs_buildtools.exe 'https://aka.ms/vs/17/release/vs_buildtools.exe' + + # 使用命令行参数安装、更新和管理 Visual Studio https://learn.microsoft.com/zh-cn/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2022 -# uninstall ^ VisualStudioSetup.exe --locale en-US --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.CoreBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --path install="C:\VS" --path cache="C:\VS\cache" --path shared="C:\VS\shared" --quiet --force --norestart @@ -23,3 +27,9 @@ vs_buildtools.exe --quiet --force --norestart git clone -b php-8.3.6 --depth=1 https://github.com/php/php-src.git git clone -b php-sdk-2.2.0 --depth=1 https://github.com/php/php-sdk-binary-tools.git + +## 通过命令行使用 MSVC 工具集 + https://learn.microsoft.com/zh-cn/cpp/build/building-on-the-command-line?view=msvc-170 + +## 通过命令行使用 MSBuild + https://learn.microsoft.com/zh-cn/cpp/build/msbuild-visual-cpp?view=msvc-170