internals:windows:buildv2
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
internals:windows:buildv2 [2016/11/21 03:18] – created kalle | internals:windows:buildv2 [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 42: | Line 42: | ||
+- ... | +- ... | ||
</ | </ | ||
+ | |||
+ | ===== Extension Config Load Order ===== | ||
+ | |||
+ | On the Unix build system, the config.m4 files allows a numeric order to be loaded in, this is done by adding a suffix to " | ||
===== Multi Compiler Support ===== | ===== Multi Compiler Support ===== | ||
Line 294: | Line 298: | ||
</ | </ | ||
- | This makes the libraries much easier to handle and check and it provides the same flexibility as before in a more friendly interface. | + | This makes the libraries much easier to handle and check and it provides the same flexibility as before in a more friendly interface. |
+ | |||
+ | ==== Extension dependencies ==== | ||
+ | |||
+ | It is common for extensions to depend on others, these can either be optional, required or even semi depended on others, like the ext/curl extension that can depend on ZLib depending on how it was configured. | ||
+ | |||
+ | In the Extension constructor, | ||
+ | |||
+ | <code javascript> | ||
+ | public function pdo_sqlite() | ||
+ | { | ||
+ | this.Dependencies([' | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | If the ' | ||
+ | |||
+ | An extension can also optionally depend on another, and if it is available, then an extension can take advantage of its utility: | ||
+ | |||
+ | <code javascript> | ||
+ | public function test_ext() | ||
+ | { | ||
+ | // Works for both static and shared builds | ||
+ | if(this.getExtension(' | ||
+ | { | ||
+ | this.Define(' | ||
+ | } | ||
+ | |||
+ | // Or if static json is required | ||
+ | if(this.getExtension(' | ||
+ | { | ||
+ | this.Define(' | ||
+ | } | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | ==== Extensions that run external programs, such as parsers ==== | ||
+ | |||
+ | Some extensions, or SAPIs run external programs before compiling for generating parsers or similar, such is also possible in the new build system: | ||
+ | |||
+ | <code javascript> | ||
+ | public function json() | ||
+ | { | ||
+ | if(!this.FSO.FileExists(' | ||
+ | { | ||
+ | PHPBuild.ExecuteBinary(' | ||
+ | } | ||
+ | |||
+ | /* ... */ | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | ==== Extensions that adds additional configure arguments ==== | ||
+ | |||
+ | It is very common for extensions to provide additional configurations from arguments, by default each declared extension will be supported by either: | ||
+ | |||
+ | * --with-< | ||
+ | * --enable-< | ||
+ | |||
+ | This type is defined in the Extension.arg_type property to an enum value of either ArgType.WITH or ArgType.ENABLE. However extensions may also add their own, this is done in the property called ' | ||
+ | |||
+ | <code javascript> | ||
+ | class test_ext extends Extension | ||
+ | { | ||
+ | public const name : string = 'Test Extension'; | ||
+ | public const short_name : string = ' | ||
+ | |||
+ | public const arg_type : ArgType = ArgType.WITH; | ||
+ | public const config_args : object = { | ||
+ | ' | ||
+ | }; | ||
+ | |||
+ | public shared : bool; | ||
+ | |||
+ | public const files : array = [' | ||
+ | |||
+ | |||
+ | public function test_ext() | ||
+ | { | ||
+ | if(this.GetArg(' | ||
+ | { | ||
+ | this.CFlag('/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | PHPBuild.AddExtension(new test_ext); | ||
+ | </ | ||
+ | |||
+ | The GetArg() method returns an ' | ||
+ | |||
+ | ==== Extensions that implements multiple build modess in one config file ==== | ||
+ | |||
+ | There are some extensions that can be built in multiple ways, one such case is ext/ | ||
TODO | TODO | ||
* sapis | * sapis | ||
+ | * consider changing 'new xxx' in calls, as they are executed directly | ||
* improve arg api for exts | * improve arg api for exts | ||
* multi build args for an ext | * multi build args for an ext | ||
* multi extensions per config, like pdo_dblib | * multi extensions per config, like pdo_dblib | ||
- | * configX.m4 support, priority load order | ||
* talk about task size and target | * talk about task size and target | ||
* talk about design reasoning | * talk about design reasoning | ||
* API reference | * API reference | ||
* implementation stages(?) | * implementation stages(?) |
internals/windows/buildv2.1479698332.txt.gz · Last modified: 2017/09/22 13:28 (external edit)