mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-03-24 09:02:12 +01:00
Compare commits
20 Commits
php-sdk-2.
...
php-sdk-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb396f33e6 | ||
|
|
1deb33bebc | ||
|
|
d00bcf80d0 | ||
|
|
1d645c9faf | ||
|
|
c9ff81440a | ||
|
|
c3a4890b8a | ||
|
|
ac53945a3f | ||
|
|
c7ad0fd314 | ||
|
|
76ed6e3374 | ||
|
|
f3cbba7fc5 | ||
|
|
1d4d208f4b | ||
|
|
6711f1f6d1 | ||
|
|
1ba1bf1dff | ||
|
|
1048a4d346 | ||
|
|
ed4f2d50d0 | ||
|
|
75124abf52 | ||
|
|
58d2c1a009 | ||
|
|
dfdea742dc | ||
|
|
0553f3219f | ||
|
|
2cbe03f44c |
14
README.md
14
README.md
@@ -4,7 +4,7 @@ PHP SDK is a tool kit for Windows PHP builds
|
||||
|
||||
# License
|
||||
|
||||
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 itself and the SDK own tools and code are licensed under the BSD 2-Clause license. With the usage of the other tools, you accept the respective licenses.
|
||||
|
||||
# Overview
|
||||
|
||||
@@ -32,7 +32,7 @@ All the tools included are either scripts or 32-bit binaries. They are therefore
|
||||
|
||||
## Other tools
|
||||
|
||||
- `bison` 3.0.2, `re2c` 0.15.3, `lemon`
|
||||
- `bison` 3.0.4, `re2c` 1.0.2, `lemon`
|
||||
- `awk`, `gawk`, `sed`, `grep`
|
||||
- `diff`, `diff3`, `patch`
|
||||
- `md5sum`, `sha1sum`, `sha224sum`, `sha256sum`, `sha384sum`, `sha512sum`
|
||||
@@ -60,7 +60,7 @@ It is not required to hold the source in the PHP SDK directory. It could be usef
|
||||
|
||||
- `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 later
|
||||
- `git checkout php-sdk-2.0.12` or later
|
||||
- invoke `phpsdk-vc15-x64.bat`
|
||||
- `phpsdk_buildtree phpmaster`
|
||||
- `git clone https://github.com/php/php-src.git && cd php-src`, or fetch a zipball
|
||||
@@ -90,6 +90,8 @@ The starter scripts can be also easy integrated with the consoles other than sta
|
||||
|
||||
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.
|
||||
|
||||
Be aware, that starter scripts always start a new shell. Scripts intended to run as a task need to be passed with `-t` argument to a starter script.
|
||||
|
||||
# Upgrading
|
||||
|
||||
- backup phpsdk-local.bat
|
||||
@@ -102,14 +104,14 @@ If the PHP SDK is kept as a git checkout, merely what is needed instead is to gi
|
||||
|
||||
# Extending
|
||||
|
||||
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.
|
||||
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. A suitable PHP binary is bound with the PHP SDK. 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.
|
||||
|
||||
# Pitfalls
|
||||
|
||||
- SDK or PHP sources put into paths including spaces might cause issue.
|
||||
- SDK or PHP sources put into too long paths, will cause an issue.
|
||||
- If Cygwin is installed, it might cause issues. If it's unavoidable, to have Cygwin on the same machine, ensure SDK preceeds it on the PATH.
|
||||
- When fetching from git, git `core.autocrlf` configuration directive set to `false` is recommended.
|
||||
- If Cygwin, MSYS2 or MinGW flavors are exposed in global PATH, it might cause issues. If it's unavoidable, ensure SDK preceeds it on the PATH.
|
||||
- When fetching the binary SDK from git, git `core.autocrlf` configuration directive set to `false` is recommended.
|
||||
- Tools, based on MSYS2, only accept paths with forward slashes.
|
||||
- Both Visual C++ toolset and the Windows SDK components have to be installed for the PHP SDK to work properly.
|
||||
- The VC++ toolset is still requried, even if another compiler, fe. clang, is intended to be used.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/php/php.exe
BIN
bin/php/php.exe
Binary file not shown.
BIN
bin/php/php7.dll
BIN
bin/php/php7.dll
Binary file not shown.
@@ -98,6 +98,21 @@ set TMPKEY=
|
||||
|
||||
if 15 gtr %PHP_SDK_VC_NUM% (
|
||||
rem get sdk dir
|
||||
rem if 10.0 is available, it's ok
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
|
||||
) else (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0
|
||||
)
|
||||
for /f "tokens=2*" %%a in ('reg query "!TMPKEY!" /v InstallationFolder') do (
|
||||
for /f "tokens=2*" %%c in ('reg query "!TMPKEY!" /v ProductVersion') do (
|
||||
if exist "%%bInclude\%%d.0\um\Windows.h" (
|
||||
goto got_sdk
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
rem Otherwise 8.1 should be available anyway
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1
|
||||
) else (
|
||||
@@ -105,13 +120,13 @@ if 15 gtr %PHP_SDK_VC_NUM% (
|
||||
)
|
||||
for /f "tokens=2*" %%a in ('reg query "!TMPKEY!" /v InstallationFolder') do (
|
||||
if exist "%%b\Include\um\Windows.h" (
|
||||
set PHP_SDK_WIN_SDK_DIR=%%b
|
||||
goto got_sdk
|
||||
)
|
||||
)
|
||||
if not defined PHP_SDK_WIN_SDK_DIR (
|
||||
echo Windows SDK not found.
|
||||
goto out_error;
|
||||
)
|
||||
|
||||
echo Windows SDK not found.
|
||||
goto out_error;
|
||||
:got_sdk
|
||||
set TMPKEY=
|
||||
)
|
||||
|
||||
|
||||
BIN
bin/vswhere.exe
BIN
bin/vswhere.exe
Binary file not shown.
@@ -134,7 +134,7 @@ trait FileOps
|
||||
|
||||
$ret = curl_exec($ch);
|
||||
if (false === $ret) {
|
||||
$err = curl_error();
|
||||
$err = curl_error($ch);
|
||||
curl_close($ch);
|
||||
if ($dest) {
|
||||
fclose($fd);
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
rem make sure we end up where we started (for VS2017)
|
||||
set "VSCMD_START_DIR=%CD%"
|
||||
set "__VSCMD_ARG_NO_LOGO=yes"
|
||||
|
||||
rem this will be eventually overridden by phpsdk_setvars, but nothing wrong to use the same name here
|
||||
set PHP_SDK_ROOT_PATH=%~dp0
|
||||
set PHP_SDK_ROOT_PATH=%PHP_SDK_ROOT_PATH:~0,-1%
|
||||
@@ -31,7 +35,7 @@ set ARCH=%ARCH: =%
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
|
||||
title PHP SDK %CRT% %ARCH%
|
||||
title PHP SDK %CRT% %ARCH%
|
||||
|
||||
call %PHP_SDK_ROOT_PATH%\bin\phpsdk_setshell.bat %CRT% %ARCH%
|
||||
|
||||
@@ -62,9 +66,9 @@ if "%TASK%" neq "" (
|
||||
)
|
||||
|
||||
if exist "%PHP_SDK_ROOT_PATH%\phpsdk-local.bat" (
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\bin\phpsdk_dumpenv.bat && %PHP_SDK_ROOT_PATH%\phpsdk-local.bat && echo. && set prompt=$P$_$+$$$S"
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && set __VSCMD_ARG_NO_LOGO=&& set VSCMD_START_DIR=&& %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\bin\phpsdk_dumpenv.bat && %PHP_SDK_ROOT_PATH%\phpsdk-local.bat && echo. && set prompt=$P$_$+$$$S"
|
||||
) else (
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\bin\phpsdk_dumpenv.bat && set prompt=$P$_$+$$$S"
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && set __VSCMD_ARG_NO_LOGO=&& set VSCMD_START_DIR=&& %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\bin\phpsdk_dumpenv.bat && set prompt=$P$_$+$$$S"
|
||||
)
|
||||
|
||||
exit /b !ERRORLEVEL!
|
||||
|
||||
Reference in New Issue
Block a user