internals:windows:stepbystepbuild_sdk_2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
internals:windows:stepbystepbuild_sdk_2 [2017/04/26 11:29] abinternals:windows:stepbystepbuild_sdk_2 [2018/12/29 18:56] ab
Line 17: Line 17:
  
   * Visual C++ 14.0 (Visual Studio 2015) for **PHP 7.0** or **PHP 7.1**.   * Visual C++ 14.0 (Visual Studio 2015) for **PHP 7.0** or **PHP 7.1**.
-  * Visual C++ 15.0 (Visual Studio 2017) for **PHP 7.2**+  * Visual C++ 15.0 (Visual Studio 2017) for **PHP 7.2** or **PHP 7.3**.
  
 ==== Setup ==== ==== Setup ====
    
-  * Fetch the latest stable SDK tag from https://github.com/OSTC/php-sdk-binary-tools+  * Fetch the latest stable SDK tag from https://github.com/Microsoft/php-sdk-binary-tools
     * The new PHP SDK is required, when building PHP 7.2+     * The new PHP SDK is required, when building PHP 7.2+
     * Read the PHP SDK specific notes on the Github repository page     * Read the PHP SDK specific notes on the Github repository page
Line 36: Line 36:
 ==== Command prompt ==== ==== Command prompt ====
  
-The PHP SDK 2.0.0+ provides starter scripts, that automaticaly setup the compiler environment. The starter scripts also provide functionality to inject custom setup pieces. To create a customized setup script, put your code into the file ''phpsdk-local.bat'' into the PHP SDK root dir. The following variables are automatically available within the PHP SDK shell+The PHP SDK 2.0.0+ provides starter scripts, that automatically setup the compiler environment. The starter scripts also provide functionality to inject custom setup pieces. To create a customized setup script, put your code into the file ''phpsdk-local.bat'' into the PHP SDK root dir. The following variables are automatically available within the PHP SDK shell
  
   * PHP_SDK_ARCH - the target build architecture used for environment setup   * PHP_SDK_ARCH - the target build architecture used for environment setup
   * PHP_SDK_OS_ARCH - the operating system architecture   * PHP_SDK_OS_ARCH - the operating system architecture
   * PHP_SDK_PHP_CMD - integrated PHP binary wrapper script   * PHP_SDK_PHP_CMD - integrated PHP binary wrapper script
-  * PHP_SDK_ROOT_PATH - the path to the PHP SDK rood directory+  * PHP_SDK_ROOT_PATH - the path to the PHP SDK root directory
   * PHP_SDK_VC - Visual C++ version used for the environment   * PHP_SDK_VC - Visual C++ version used for the environment
   * several other less relevant vars are available, that can be viewed by the ''set'' command   * several other less relevant vars are available, that can be viewed by the ''set'' command
Line 47: Line 47:
 The full list of the tools included with the PHP SDK can be found on the repository readme page. The full list of the tools included with the PHP SDK can be found on the repository readme page.
  
-Each version of Visual Studio (or Windows SDK) provides a command prompt environment for compiling (available from the Start Menu group). It is usable, for example, if you want to ommit the starter scripts usage or want to test a pre release Visual Studio version.+Each version of Visual Studio (or Windows SDK) provides a command prompt environment for compiling (available from the Start Menu group). It is usable, for example, if you want to omit the starter scripts usage or want to test a pre release Visual Studio version.
  
     * If compiling **PHP 7.0+** open either the **"VS2015 x64 Native Tools Command Prompt"** or the **"VS2015 x86 Native Tools Command Prompt"**.     * If compiling **PHP 7.0+** open either the **"VS2015 x64 Native Tools Command Prompt"** or the **"VS2015 x86 Native Tools Command Prompt"**.
Line 59: Line 59:
     * clone the [[http://git.php.net/|PHP Git repository]] ([[https://github.com/php/php-src|GitHub mirror]])     * clone the [[http://git.php.net/|PHP Git repository]] ([[https://github.com/php/php-src|GitHub mirror]])
   - Get the binary tools:   - Get the binary tools:
-    * available from [[https://github.com/OSTC/php-sdk-binary-tools]]+    * available from [[https://github.com/Microsoft/php-sdk-binary-tools]]
     * either fetch a tag as zip, or clone the git repository and checkout the tag     * either fetch a tag as zip, or clone the git repository and checkout the tag
   - Get the libraries on which PHP depends:   - Get the libraries on which PHP depends:
-    * use the PHP SDK tools to fetch the suitable dependencies automatically by calling ''phpsdk_deps -u'', or alternatively do the following steps +    * use the PHP SDK tools to fetch the suitable dependencies automatically by calling ''phpsdk_deps -u'' 
-    * download the packaged deps from [[http://windows.php.net/downloads/php-sdk/]] +    * alternatively, download the packaged deps from [[http://windows.php.net/downloads/php-sdk/deps/]] choosing the matching VC++ version and architecture directory. **Note** the .7z packages are not provided anymore for PHP 7.2 and up.
-    * dependency archives are named ''deps-<php version>-<vc version>-<architecture>.7z'' +
-    chose the archive which matches your desired PHP version and architecture, for example ''deps-7.1-vc14-x64.7z''+
     * **Note:** This should include the libraries needed to build most the core extensions. However, some other extensions may need additional libraries, header files and helper apps.  See [[internals/windows/libs]], fetch the version you need and extract the archive into the deps directory (see below). Another set of libraries used for the PECL extension builds is available under [[http://windows.php.net/downloads/pecl/deps/|PECL deps directory]]. If required, they need to be fetched manually.     * **Note:** This should include the libraries needed to build most the core extensions. However, some other extensions may need additional libraries, header files and helper apps.  See [[internals/windows/libs]], fetch the version you need and extract the archive into the deps directory (see below). Another set of libraries used for the PECL extension builds is available under [[http://windows.php.net/downloads/pecl/deps/|PECL deps directory]]. If required, they need to be fetched manually.
  
Line 85: Line 83:
   - In the same directory where you extracted the PHP source there is a ''**deps**'' directory. Do one of the following   - In the same directory where you extracted the PHP source there is a ''**deps**'' directory. Do one of the following
     * switch into the php source directory and run ''phpsdk_deps -u''     * switch into the php source directory and run ''phpsdk_deps -u''
-    * If you downloaded the dependencies manually in the perevious step (the ''deps-*.7z'' archive), extract them into deps+    * If you downloaded the dependencies manually in the previous step, extract them into deps
  
 ===== Compile ===== ===== Compile =====
Line 92: Line 90:
  
   - Invoke the starter script to automatically setup the environment for the desired build config, fe <code bash>c:\php-sdk\phpsdk-vc14-x64.bat</code>   - Invoke the starter script to automatically setup the environment for the desired build config, fe <code bash>c:\php-sdk\phpsdk-vc14-x64.bat</code>
-  - Change directory to the location of your PHP source code, e.g. <code bash>cd 'C:\php-sdk\phpdev\vc14\x64\php-7.1.0-src</code>+  - Change directory to the location of your PHP source code, e.g. <code bash>cd C:\php-sdk\phpdev\vc14\x64\php-7.1.0-src</code>
   - Run: <code bash>buildconf</code>   - Run: <code bash>buildconf</code>
   - To get an overview of the compiling flags: <code bash>configure --help</code>   - To get an overview of the compiling flags: <code bash>configure --help</code>
Line 134: Line 132:
  
   - For possible PHP SDK issues, please consult the PHP SDK readme   - For possible PHP SDK issues, please consult the PHP SDK readme
 +  - As of PHP 7.3 the switch --enable-native-intrinsics is available. The resulting binary will then require a processor with the corresponding feature set available. For example, if you set --enable-native-intrinsics=avx2, be sure the target machine has processor with AVX2 support.
  
  
internals/windows/stepbystepbuild_sdk_2.txt · Last modified: 2022/01/10 09:43 by cmb