Skip to content

Commit 0bd5294

Browse files
committed
start update doc with modern phpsdk and vs17
1 parent 5240004 commit 0bd5294

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

docs/compile-windows.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,19 @@
4747

4848
2. Downloading and installing Visual Studio
4949

50+
2.1. Using Visual Studio 2022
51+
52+
Just download Visual Studio 2022 community, and install
53+
54+
ON Visual Studio 2022 Installer, Just check "C++ Desktop Development"
55+
56+
2.2 Using Visual Studio 2019
57+
5058
For PHP 8.1, all you need is install VS16 too, wich are included on VS 2019. So you can download Visual Studio 2019 from [here](https://visualstudio.microsoft.com/pt-br/thank-you-downloading-visual-studio/?sku=Community&rel=16&src=myvs&utm_medium=microsoft&utm_source=my.visualstudio.com&utm_campaign=download&utm_content=vs+community+2019)
5159

5260
Open the installer, and install Visual Studio Community 2019 and "C++ Desktop Development"
5361

54-
If when you are reading that you cannot install Visual Studio 2019, try to install the current version of "C++ Desktop Development" and after that, click in modify "Visual Studio Community", and on "Individual Componentes" tab, look for "Build Tools MSVC v142 (VS 2019 C++)" and "Windows 10 SDK".
55-
56-
3. Install [Visual C++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe);
62+
If when you are reading that you cannot install Visual Studio 2019, try to install the current version of `C++ Desktop Development` and after that, click in modify `Visual Studio Community`, and on `Individual Componentes` tab, look for `Build Tools MSVC v142` and `Windows 10 SDK`.
5763

5864
## Compiling PHP on Windows;
5965

@@ -71,33 +77,31 @@
7177

7278
Open `cmd.exe` as admin, and go to `c:\php-dev\php-sdk`
7379

74-
Run `phpsdk-vs16-x64.bat` to prepare PHP environment
80+
Run `phpsdk-vs17-x64.bat` to prepare PHP environment. If you are running vs16, change to `phpsdk-vs16-x64.bat`, and keeping follow this doc using `vs16` instead `vs17`
7581

76-
Build tree source dir running `phpsdk_buildtree phpdev`
82+
Build tree source dir running `bin\phpsdk_buildtree phpdev`
7783

78-
This will create some folders like `C:\php-dev\php-sdk\phpdev\vs16\x64`
84+
This will create some folders like `C:\php-dev\php-sdk\phpdev\vs17\x64`
7985

8086
4. Preparing the PHP source
8187

8288
Now download the [PHP source](https://windows.php.net/downloads/releases), if you want to use another versions, go to [archives](https://windows.php.net/downloads/releases/archives/)
8389

84-
Extract the source code inside de `C:\php-dev\php-sdk\phpdev\vs16\x64`, and rename it to be like `C:\php-dev\php-sdk\phpdev\vs16\x64\php-8.1.14-src`
90+
Extract the source code inside de `C:\php-dev\php-sdk\phpdev\vs17\x64`, and rename it to be like `C:\php-dev\php-sdk\phpdev\vs17\x64\php-8.2.20-src`
8591

8692
5. Downloading dependencies
8793

88-
Back to the `cmd.exe` opend, go to `C:\php-dev\php-sdk\phpdev\vs16\x64\php-8.1.14-src`, and run the command `phpsdk_deps -u` to download dependencies
94+
Back to the `cmd.exe` opend, go to `C:\php-dev\php-sdk\phpdev\vs17\x64\php-8.2.20-src`, and run the command `phpsdk_deps --update --branch master` to download dependencies
8995

9096
6. Build and compile PHP from source code
9197

92-
Inside the source code `C:\php-dev\php-sdk\phpdev\vs16\x64\php-8.1.14-src`, run `buildconf`
93-
94-
Now you can create the config running `configure --disable-all --enable-cli --enable-$remains --disable-zts`. You may want to run `configure --help` to see options and what you need to enable
98+
Inside the source code `C:\php-dev\php-sdk\phpdev\vs17\x64\php-8.2.20-src`, run `buildconf`
9599

96-
If `ERROR: mc is required` appear, run command `set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64` to add `mc.exe` to the PATH
100+
Now you can create the config running `configure --disable-all --enable-cli --disable-zts`. You may want to run `configure --help` to see options and what you need to enable
97101

98102
So now you can build with `nmake`
99103

100-
It will compile PHP on `C:\php-gtk3\php-sdk\phpdev\vs16\x64\php-8.1.14-src\x64\Release`. You can run `x64\Release\php.exe -m` to confirm that is working
104+
It will compile PHP on `C:\php-gtk3\php-sdk\phpdev\vs17\x64\php-8.2.20-src\x64\Release`. You can run `x64\Release\php.exe -m` to confirm that is working
101105

102106
## Preparing PHP, PHP-CPP and PHP-GTK code;
103107

@@ -181,10 +185,10 @@
181185

182186
- Additional Include Directories:
183187
```
184-
C:\php-gtk3\php-sdk\phpdev\vs16\x64\php-8.1.14-src
185-
C:\php-gtk3\php-sdk\phpdev\vs16\x64\php-8.1.14-src\TSRM
186-
C:\php-gtk3\php-sdk\phpdev\vs16\x64\php-8.1.14-src\Zend
187-
C:\php-gtk3\php-sdk\phpdev\vs16\x64\php-8.1.14-src\main
188+
C:\php-gtk3\php-sdk\phpdev\vs17\x64\php-8.2.20-src
189+
C:\php-gtk3\php-sdk\phpdev\vs17\x64\php-8.2.20-src\TSRM
190+
C:\php-gtk3\php-sdk\phpdev\vs17\x64\php-8.2.20-src\Zend
191+
C:\php-gtk3\php-sdk\phpdev\vs17\x64\php-8.2.20-src\main
188192
C:\php-dev\php-cpp
189193
C:\msys2\mingw64\include\libgladeui-2.0
190194
C:\msys2\mingw64\include\harfbuzz
@@ -224,7 +228,7 @@
224228
G_PLATFORM_WIN32
225229
GIO_COMPILATION
226230
BUILDING_PHPCPP
227-
PHP_VERSION_ID=80114 (Following your PHP version of choice, you can find on C:\php-gtk3\php-sdk\phpdev\vs16\x64\php-8.1.14-src\main\php_version.h)
231+
PHP_VERSION_ID=80114 (Following your PHP version of choice, you can find on C:\php-gtk3\php-sdk\phpdev\vs17\x64\php-8.2.20-src\main\php_version.h)
228232
GDK_PIXBUF_COMPILATION
229233
GDK_COMPILATION
230234
GTK_COMPILATION

0 commit comments

Comments
 (0)