mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-03-24 09:02:12 +01:00
Compare commits
16 Commits
php-sdk-2.
...
php-sdk-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5999098add | ||
|
|
9f8cf17928 | ||
|
|
496a4498a1 | ||
|
|
1162213596 | ||
|
|
c8e1563cd4 | ||
|
|
9b139a61c8 | ||
|
|
bf84962182 | ||
|
|
d87c132a7e | ||
|
|
c781649433 | ||
|
|
bd8b82579f | ||
|
|
d6b76e7f7d | ||
|
|
7f0015a68c | ||
|
|
23a3eb2473 | ||
|
|
296be1b3b4 | ||
|
|
3ec0ac9d0b | ||
|
|
baf09da395 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -14,3 +14,7 @@ logs
|
||||
PFTT
|
||||
\.tmp
|
||||
\.cache
|
||||
oracle
|
||||
# either these two become submodules, or uncomment them
|
||||
#pgo-build
|
||||
#rmtools*
|
||||
|
||||
21
README.md
21
README.md
@@ -30,21 +30,24 @@ This reworked SDK is compatible with PHP 7.0 and above. The compatibility with p
|
||||
|
||||
These are not included with the PHP SDK, but might be useful for the compilation and other tasks. While Visual C++ is the only required, the others might enable some additional functionality. Care yourself about making them available on your system.
|
||||
|
||||
- Visual C++
|
||||
- clang
|
||||
- ICC
|
||||
- Git
|
||||
- Cppcheck
|
||||
- `Visual C++` - required always
|
||||
- `clang` - optional, useful for experimental builds and for static analysis
|
||||
- `ICC` - optional, useful for experimental builds
|
||||
- `Git` - optional, useful for PHP source management
|
||||
- `Cppcheck` - optional, used for static analysis
|
||||
|
||||
# Usage
|
||||
|
||||
## Basic usage
|
||||
## Basic usage example
|
||||
|
||||
- `git clone https://github.com/OSTC/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- `cd c:\php-sdk`
|
||||
- `git checkout new_binary_tools`
|
||||
- `cd` to c:\php-sdk and click one of the `phpsdk-*.bat` files in the SDK root, depending on the desired build parameters
|
||||
- `phpsdk_buildtree && git clone https://github.com/php/php-src.git`, or fetch a zipball from windows.php.net
|
||||
- while in php-src, run `phpsdk_deps --update --branch YOUR_BRANCH_NAME`
|
||||
- either run or click on `phpsdk-vc14-x64.bat` in the SDK root
|
||||
- `cd` to c:\php-sdk and click on `phpsdk-vc14-x64.bat` in the SDK root
|
||||
- `phpsdk_buildtree phpmaster`
|
||||
- `git clone https://github.com/php/php-src.git && cd php-src`, or fetch a zipball
|
||||
- `phpsdk_deps --update --branch master`
|
||||
- do the build, eg. `buildconf && configure --enable-cli && nmake`
|
||||
|
||||
TODO more extensive documentation on the wiki
|
||||
|
||||
@@ -4,33 +4,27 @@ IF "%1" EQU "" GOTO Help
|
||||
IF "%2" NEQ "" SET _=%2\%1
|
||||
IF "%2" EQU "" SET _=%CD%\%1
|
||||
|
||||
MD %_%\vc9\x86\deps\bin
|
||||
MD %_%\vc9\x86\deps\lib
|
||||
MD %_%\vc9\x86\deps\include
|
||||
MD %_%\vc9\x64\deps\bin
|
||||
MD %_%\vc9\x64\deps\lib
|
||||
MD %_%\vc9\x64\deps\include
|
||||
rem if we're in the starter script shell, create the only struct that corresponds to the current env
|
||||
rem otherwise - retain the old behavior, create structs for all the known build combinations and don't cd
|
||||
|
||||
MD %_%\vc11\x86\deps\bin
|
||||
MD %_%\vc11\x86\deps\lib
|
||||
MD %_%\vc11\x86\deps\include
|
||||
MD %_%\vc11\x64\deps\bin
|
||||
MD %_%\vc11\x64\deps\lib
|
||||
MD %_%\vc11\x64\deps\include
|
||||
|
||||
MD %_%\vc12\x86\deps\bin
|
||||
MD %_%\vc12\x86\deps\lib
|
||||
MD %_%\vc12\x86\deps\include
|
||||
MD %_%\vc12\x64\deps\bin
|
||||
MD %_%\vc12\x64\deps\lib
|
||||
MD %_%\vc12\x64\deps\include
|
||||
|
||||
MD %_%\vc14\x86\deps\bin
|
||||
MD %_%\vc14\x86\deps\lib
|
||||
MD %_%\vc14\x86\deps\include
|
||||
MD %_%\vc14\x64\deps\bin
|
||||
MD %_%\vc14\x64\deps\lib
|
||||
MD %_%\vc14\x64\deps\include
|
||||
if "%PHP_SDK_ARCH%" NEQ "" (
|
||||
if "%PHP_SDK_VC%" NEQ "" (
|
||||
MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\bin
|
||||
MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\lib
|
||||
MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\include
|
||||
cd %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%
|
||||
goto exit
|
||||
)
|
||||
goto create_all
|
||||
) else (
|
||||
:create_all
|
||||
MD %_%\vc14\x86\deps\bin
|
||||
MD %_%\vc14\x86\deps\lib
|
||||
MD %_%\vc14\x86\deps\include
|
||||
MD %_%\vc14\x64\deps\bin
|
||||
MD %_%\vc14\x64\deps\lib
|
||||
MD %_%\vc14\x64\deps\include
|
||||
)
|
||||
|
||||
GOTO EXIT
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_PHP_CMD%"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit 3
|
||||
call %~dp0phpsdk_setvars.bat
|
||||
if "!PHP_SDK_PHP_CMD!"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
)
|
||||
|
||||
call %PHP_SDK_PHP_CMD% %PHP_SDK_BIN_PATH%\phpsdk_deps.php %*
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_PHP_CMD%"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit 3
|
||||
call %~dp0phpsdk_setvars.bat
|
||||
if "!PHP_SDK_PHP_CMD!"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
)
|
||||
|
||||
call %PHP_SDK_PHP_CMD% %PHP_SDK_BIN_PATH%\phpsdk_dllmap.php %*
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_OS_ARCH%"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %PHP_SDK_BIN_PATH%\phpsdk_version.bat
|
||||
echo.
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_PHP_CMD%"=="" (
|
||||
call %~dp0phpsdk_setvars.bat
|
||||
if "!PHP_SDK_PHP_CMD!"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
)
|
||||
|
||||
%PHP_SDK_PHP_CMD% -r "echo 'PHP SDK ' . file_get_contents(getenv('PHP_SDK_PATH') . '\\VERSION');"
|
||||
|
||||
exit /b
|
||||
|
||||
39
phpsdk-starter.bat
Normal file
39
phpsdk-starter.bat
Normal file
@@ -0,0 +1,39 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
if "%1" equ "" goto help
|
||||
if "%2" equ "" goto help
|
||||
goto skip_help
|
||||
|
||||
:help
|
||||
echo Usage: phpsdk-starter ^<crt^> ^<arch^> [^<append_script.bat^>]
|
||||
exit /b 0
|
||||
|
||||
:skip_help
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
title PHP SDK
|
||||
|
||||
call %~dp0bin\phpsdk_setshell.bat %1 %2
|
||||
|
||||
if errorlevel 3 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
if "%3" neq "" (
|
||||
if exist "%3" (
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat && %3 && set prompt=$P$_$+$$$S"
|
||||
) else (
|
||||
echo The appended file %3 doesn't exist
|
||||
exit /b 3
|
||||
)
|
||||
) else (
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat && set prompt=$P$_$+$$$S"
|
||||
)
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
|
||||
exit /b
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
call %~dp0phpsdk-starter.bat vc14 x64 %*
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
call %~dp0bin\phpsdk_setshell.bat vc14 x64
|
||||
|
||||
cmd /k "%PHP_SDK_VC_SHELL_CMD% && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat"
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
|
||||
exit
|
||||
exit /b
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
call %~dp0phpsdk-starter.bat vc14 x86 %*
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
call %~dp0bin\phpsdk_setshell.bat vc14 x86
|
||||
|
||||
cmd /k "%PHP_SDK_VC_SHELL_CMD% && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat"
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
|
||||
exit
|
||||
exit /b
|
||||
|
||||
|
||||
Reference in New Issue
Block a user