@@ -12,25 +12,14 @@ currently broken).
1212Compared to installation on GNU/Linux it's way more tedious to install V8Js
1313on Windows, since you need to compile PHP with all its dependencies beforehand.
1414
15- The problem is that Google v8 requires (at least) Visual Studio 2013 as it
16- uses certain C++11 features not available in Visual Studio 2012.
17-
18- Unfortunately the [ PHP for Windows] ( http://windows.php.net/ ) project still
19- relies on either Visual Studio 2012 or Visual Studio 2008.
20- It supplies pre-compiled binary archives of required dependencies, however also
21- compiled with Visual Studio 2008 and 2012 only.
22-
23- Since it is not compatible to link a v8 compiled with Visual Studio 2013 with
24- a PHP interpreter compiled with Visual Studio 2012, you need to step up and
25- compile PHP with Visual Studio 2013. This requires to compile dependencies as
26- well, if you would like to use certain extensions or e.g. the Apache SAPI.
27-
15+ You need to have Visual Studio 2015 (aka VC14), make sure to install the C++
16+ compiler (which is not installed by default any longer).
2817
2918Compiling v8
3019------------
3120
3221The Google v8 project already has excellent step-by-step guide on
33- [ how to build with gyp] ( https://code.google. com/p /v8-wiki /wiki/BuildingWithGYP ) .
22+ [ how to build with gyp] ( https://github. com/v8 /v8/wiki/Building%20with%20Gyp ) .
3423
3524As a short run through:
3625
@@ -42,18 +31,13 @@ As a short run through:
4231Then open a command prompt
4332
4433```
45- cd \
46- git clone https://github.com/v8/v8.git
47- cd v8
48- svn co http://gyp.googlecode.com/svn/trunk build/gyp
49- svn co https://src.chromium.org/chrome/trunk/deps/third_party/icu46 third_party/icu
50- svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@89111 third_party/python_26
51- svn co http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844 third_party/cygwin
52- svn co http://googletest.googlecode.com/svn/trunk testing/gtest --revision 643
53- svn co http://googlemock.googlecode.com/svn/trunk testing/gmock --revision 410
54-
34+ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
35+ fetch v8
36+ git checkout 4.7.80.25
37+ gclient sync
5538python build\gyp_v8 -Dcomponent=shared_library -Dv8_use_snapshot=0
56- "\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" /build Release build/All.sln
39+ CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
40+ msbuild build\All.sln /m /p:Configuration=Release
5741```
5842
5943(alternatively ` start build/all.sln ` ... and build within the Visual Studio GUI)
@@ -63,13 +47,8 @@ python build\gyp_v8 -Dcomponent=shared_library -Dv8_use_snapshot=0
6347Compiling PHP
6448-------------
6549
66- There [ Build your own PHP on Windows] ( https://wiki.php.net/internals/windows/stepbystepbuild )
67- guide on the PHP wiki. However it concentrates on Visual Studio 2008 and 2012.
68- Since you need to use Visual Studio 2013 it doesn't apply very well.
69-
70- This document concentrates on building V8Js for CLI SAPI (only). In order
71- to enable more extensions you need to provide further dependencies, which may
72- be more or less cumbersome to build with Visual Studio beforehand.
50+ Then follow the [ build your own PHP on Windows] ( https://wiki.php.net/internals/windows/stepbystepbuild )
51+ guide on the PHP wiki. Use Visual Studio 2015 with PHP7.
7352
7453A quick run through:
7554
@@ -78,33 +57,34 @@ A quick run through:
7857* Download http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip
7958* ... and unpack to \php-sdk
8059
81- Open "VS2013 x86 Native Tools Command Prompt"
60+ Open "VS2015 x86 Native Tools Command Prompt"
8261
8362```
8463cd \php-sdk
8564bin\phpsdk_setvars.bat
8665bin\phpsdk_buildtree.bat phpdev
8766
88- mkdir vc12
89- mkdir vc12 \x86
90- mkdir vc12 \x86\deps
91- mkdir vc12 \x86\deps\bin
92- mkdir vc12 \x86\deps\include
93- mkdir vc12 \x86\deps\lib
67+ mkdir vc14
68+ mkdir vc14 \x86
69+ mkdir vc14 \x86\deps
70+ mkdir vc14 \x86\deps\bin
71+ mkdir vc14 \x86\deps\include
72+ mkdir vc14 \x86\deps\lib
9473```
9574
96- * download PHP from http://php.net/get/php-5.5.18 .tar.gz/from/a/mirror
97- and unpack to below ` \php-sdk\phpdev\vc12 \x86 `
98- * from ` \v8\build\Release\lib ` copy ` icui18n.lib ` , ` icuuc.lib ` and ` v8.lib `
99- to deps\lib folder
75+ * download PHP from http://php.net/get/php-7.0.1 .tar.gz/from/a/mirror
76+ and unpack to below ` \php-sdk\phpdev\vc14 \x86 `
77+ * from ` \v8\build\Release\lib ` copy ` icui18n.lib ` , ` icuuc.lib ` , ` v8.lib ` ,
78+ ` v8_libbase.lib ` and ` v8_libplatform.lib ` to deps\lib folder
10079* from ` \v8\include ` copy all v8* .h files to deps\include folder
80+ * copy ` v8-platform.h ` again to deps\include\include folder
10181* download V8Js and unpack it into a separate directory below ` ext ` folder
10282* make sure ` config.w32 ` file inside that folder defines version of the compiled v8
10383
104- (still in "VS2013 x86 Native Tools Command Prompt")
84+ (still in "VS2015 x86 Native Tools Command Prompt")
10585
10686```
107- cd \php-sdk\phpdev\vc12 \x86\php-5.5.18 \
87+ cd \php-sdk\phpdev\vc14 \x86\php-7.0.1 \
10888
10989buildconf
11090configure --disable-all --enable-cli --with-v8js
@@ -115,12 +95,12 @@ After nmake completes the php.exe is in Release_TS\ directory.
11595
11696In order to try things out in place, copy over ` icui18n.dll ` , ` icuuc.dll ` and
11797` v8.dll ` file from ` \v8\build\Release ` folder to
118- ` \php-sdk\phpdev\vc12 \x86\php-5.5.18 \Release_TS\ ` first.
98+ ` \php-sdk\phpdev\vc14 \x86\php-7.0.1 \Release_TS\ ` first.
11999
120100Then run
121101
122102```
123- php.exe -d extension=php_v8js.dll -d extension_dir=\php-sdk\phpdev\vc12\x86\php-5.5.18\ Release_TS\
103+ Release_TS\ php.exe -d extension=php_v8js.dll -d extension_dir=Release_TS\
124104```
125105
126106Alternatively copy all stuff to c:\php\ (including the three DLL files from
0 commit comments