Compare commits

...

16 Commits

Author SHA1 Message Date
Anatol Belski
5999098add check infos also in other scripts if run outside starter shell 2016-10-26 17:18:35 +02:00
Anatol Belski
9f8cf17928 fix phpsdk_deps dies when called with no SdK setup 2016-10-26 17:09:54 +02:00
Anatol Belski
496a4498a1 bump version 2016-10-26 16:49:48 +02:00
Anatol Belski
1162213596 fix order 2016-10-26 16:11:50 +02:00
Anatol Belski
c8e1563cd4 separate list and do it shorter 2016-10-26 16:10:00 +02:00
Anatol Belski
9b139a61c8 remove unnecessary sentence 2016-10-26 16:07:29 +02:00
Anatol Belski
bf84962182 more readme rework 2016-10-26 16:06:10 +02:00
Anatol Belski
d87c132a7e improve note 2016-10-26 16:04:35 +02:00
Anatol Belski
c781649433 add more readme notes 2016-10-26 15:59:05 +02:00
Anatol Belski
bd8b82579f fix starter arg passing, handle error from setshell script 2016-10-26 15:30:00 +02:00
Anatol Belski
d6b76e7f7d split out the phpsdk-starter part and make possible to append scripts 2016-10-26 15:19:03 +02:00
Anatol Belski
7f0015a68c rework the buildtree script 2016-10-26 13:40:14 +02:00
Anatol Belski
23a3eb2473 set console title when run from the starter script 2016-10-26 02:07:10 +02:00
Anatol Belski
296be1b3b4 make the prompt a bit more user friendly 2016-10-26 02:00:53 +02:00
Anatol Belski
3ec0ac9d0b extend .gitignore 2016-10-26 01:20:18 +02:00
Anatol Belski
baf09da395 remove unsupported branches 2016-10-26 01:17:33 +02:00
11 changed files with 103 additions and 60 deletions

4
.gitignore vendored
View File

@@ -14,3 +14,7 @@ logs
PFTT
\.tmp
\.cache
oracle
# either these two become submodules, or uncomment them
#pgo-build
#rmtools*

View File

@@ -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

View File

@@ -1 +1 @@
2.0.0alpha2
2.0.0alpha3

View File

@@ -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

View File

@@ -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 %*

View File

@@ -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 %*

View File

@@ -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.

View File

@@ -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
View 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

View File

@@ -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

View File

@@ -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