PHP SDK is a tool kit for Windows PHP builds
The PHP SDK itself and the SDK own tools are licensed under the BSD 2-Clause license. With the usage of the other tools, you accept the respective licenses.
The PHP SDK 2.0 is compatible with PHP 7.0 and above. The compatibility with older versions is kept, also available from the legacy branch. The toolset was significantly revamped. Newer tools are now available, better workflows are now possible. The toolset consists on a mix of the hand written scripts, selected MSYS2 parts and standalone programs.
Visual C++ 2015
or Visual C++ 2017
must be installed prior SDK usageCygwin
is installed, please read notes in the pitfalls sectionAll the tools included are either scripts or 32-bit binaries. They are therefore runable on any of x86 or x64 supported Windows system.
phpsdk_buildtree
- initialize the development filesystem structurephpsdk_deps
- handle dependency librariesphpsdk_version
- show SDK versionphpsdk_dllmap
- create a JSON listing of DLLs contained in zip filestask.exe
- wrapper to hide the given command linebison
3.0.2, re2c
0.15.3, lemon
awk
, gawk
, sed
, grep
diff
, diff3
, patch
md5sum
, sha1sum
, sha224sum
, sha256sum
, sha384sum
, sha512sum
7za
, zip
, unzip
, unzipsfx
wget
, pwgen
These are not included with the PHP SDK, but might be useful. While Visual C++ is the only required, the others might enable some additional functionality. Care yourself about making them available on your system, if relevant.
Git
- useful for PHP source managementCppcheck
- used for static analysisclang
- useful for experimental builds and for static analysisICC
- useful for experimental buildsThe PHP SDK should be unzipped into the shortest possible path, preferrably somewhere near the drive root.
Usually, the first step to start the PHP SDK is by invoking one of the suitable starter scripts. This automatically puts the console on the correct environment relevant for the desired PHP build configuration.
It is not required to hold the source in the PHP SDK directory. It could be useful, for example, to simplify the SDK updates.
git clone https://github.com/OSTC/php-sdk-binary-tools.git c:\php-sdk
cd c:\php-sdk
git checkout php-sdk-2.0.0
or laterphpsdk-vc15-x64.bat
phpsdk_buildtree phpmaster
git clone https://github.com/php/php-src.git && cd php-src
, or fetch a zipballphpsdk_deps --update --branch master
, use PHP-X.Y for a non master branchbuildconf && configure --enable-cli && nmake
More extensive documentation can be found on the wiki.
git clone https://github.com/OSTC/php-sdk-binary-tools.git c:\php-sdk
A sript called phpsdk-local.bat has to be put into the PHP SDK root. If present, it will be automatically picked up by the starter script. A template for such a script is included with the PHP SDK. This allows to automatically meet any required preparations, that are not foreseen by the standard PHP SDK startup. Be careful while creating your own phpsdk-local. It's your responsibility to ensure the regular PHP SDK startup isn't broken after phpsdk-local.bat was injected into the startup sequence.
The starter scripts can be also easy integrated with the consoles other than standard cmd.exe. For the reference, here's an example ConEmu task
C:\php-sdk\phpsdk-vc14-x64.bat -cur_console:d:C:\php-sdk\php70\vc14\x64\php-src
An elementary functionality to run unattended builds is included. See an example on how to setup a simple unattended build task in the doc directory.
If the PHP SDK is kept as a git checkout, merely what is needed instead is to git fetch and to checkout an updated git tag.
The SDK tools are based on the KISS principle and should be kept so. Basic tools are implemented as simple batch script. The minimalistic PHP
is available for internal SDK purposes. It can be used, if more complexity is required. If you have an idea for some useful tool or workflow, please open a ticket or PR, so it can be discussed, implemented and added to the SDK. By contributing an implementation, you should also accept the SDK license.
core.autocrlf
configuration directive set to false
is recommended.cmd /c
, etc.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。