|
47 | 47 |
|
48 | 48 | 2. Downloading and installing Visual Studio |
49 | 49 |
|
| 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 | + |
50 | 58 | 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) |
51 | 59 |
|
52 | 60 | Open the installer, and install Visual Studio Community 2019 and "C++ Desktop Development" |
53 | 61 |
|
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`. |
57 | 63 |
|
58 | 64 | ## Compiling PHP on Windows; |
59 | 65 |
|
|
71 | 77 |
|
72 | 78 | Open `cmd.exe` as admin, and go to `c:\php-dev\php-sdk` |
73 | 79 |
|
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` |
75 | 81 |
|
76 | | - Build tree source dir running `phpsdk_buildtree phpdev` |
| 82 | + Build tree source dir running `bin\phpsdk_buildtree phpdev` |
77 | 83 |
|
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` |
79 | 85 |
|
80 | 86 | 4. Preparing the PHP source |
81 | 87 |
|
82 | 88 | 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/) |
83 | 89 |
|
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` |
85 | 91 |
|
86 | 92 | 5. Downloading dependencies |
87 | 93 |
|
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 |
89 | 95 |
|
90 | 96 | 6. Build and compile PHP from source code |
91 | 97 |
|
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` |
95 | 99 |
|
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 |
97 | 101 |
|
98 | 102 | So now you can build with `nmake` |
99 | 103 |
|
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 |
101 | 105 |
|
102 | 106 | ## Preparing PHP, PHP-CPP and PHP-GTK code; |
103 | 107 |
|
|
181 | 185 |
|
182 | 186 | - Additional Include Directories: |
183 | 187 | ``` |
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 |
188 | 192 | C:\php-dev\php-cpp |
189 | 193 | C:\msys2\mingw64\include\libgladeui-2.0 |
190 | 194 | C:\msys2\mingw64\include\harfbuzz |
|
224 | 228 | G_PLATFORM_WIN32 |
225 | 229 | GIO_COMPILATION |
226 | 230 | 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) |
228 | 232 | GDK_PIXBUF_COMPILATION |
229 | 233 | GDK_COMPILATION |
230 | 234 | GTK_COMPILATION |
|
0 commit comments