Open TenHian opened 6 months ago
The main reason is that I'm not very good at Windows OS build and Visual Studio and currently I mainly update Linux and macOS. Windows maintenance will be slower. For embed SAPI on Windows, it would be great if someone could initiate a PR or guidance for us to start.
可以借助 MSYS2 环境 和 CMD 环境 进行构建
pacman
)浏览器打开,自动给下载 msys2: https://mirror.msys2.org/distrib/x86_64/msys2-x86_64-20240507.exe
双击
msys2-x86_64-20240507.exe
进行安装
msys2安装软件
pacman -Syy --noconfirm git curl
# 下载 vs2022
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'
```shell
# 下载 php 源码
git clone -b php-8.3.6 --depth=1 https://github.com/php/php-src.git
# 下载 php-sdk for windows
# git clone -b php-sdk-2.2.0 --depth=1 https://github.com/php/php-sdk-binary-tools.git
git clone -b master --depth=1 https://github.com/php/php-sdk-binary-tools.git
使用命令行快速安装 VisualStudio 组件
cd c:\msys64\home\Administrator\
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 ^ --add Microsoft.VisualStudio.Component.Windows11SDK.22000 ^ --add Microsoft.VisualStudio.Component.Windows10SDK.20348 ^ --add Microsoft.VisualStudio.Component.Windows10SDK ^ --passive --force --norestart
## CMD 环境 编译构建
```bat
cd c:\msys64\home\Administrator\php-sdk-binary-tools
phpsdk-vs17-x64.bat
cd c:\msys64\home\Administrator\php-src
buildconf
configure --help
configure --disable-all --enable-cli --enable-static=yes --enable-shared=no
nmake
x64\Release_TS\php.exe -v
x64\Release_TS\php.exe -m
I've noticed that
embed SAPI
on Win is on TODO list. However, its 4 mouths ago. What are the current bottlenecks encountered with this feature? What is the current implementation plan? What attempts have been made? Any guidance information beyond that?