xp-framework/xp-runners — pull request #5 by thekid (2012-08-20 08:45:57+00:00)
Title: Version-agnostic runtime configuration

Motivated by the [recent BC break with ext/com in PHP](http://news.planet-xp.net/article/474/2012/08/20/) , I decided to create a workaround for via the XP runners.

This pull request enables version-agnostic configuration settings by splitting the `runtime` section into version-specific sections (e.g. `runtime@5.4`) and a default section `runtime`. The version-specific section will overwrite any default values.

Example:

```ini
use=~/devel/xp.public/core;~/devel/xp.public/tools
rt=5.4

[runtime@5.4]
default=F:/Programme/php-5.4.6-nts-Win32-VC9-x86/php.exe
extension_dir=F:/Programme/php-5.4.6-nts-Win32-VC9-x86/ext/
extension=php_com_dotnet.dll

[runtime@5.3]
default=F:/Programme/php-5.3.14-nts-Win32-VC9-x86/php.exe
extension_dir=F:/Programme/php-5.3.14-nts-Win32-VC9-x86/ext/

[runtime]
date.timezone=Europe/Berlin
extension=php_xsl.dll
extension=php_openssl.dll
extension=php_sockets.dll
```

The new `rt` setting can be overriden by the environment variable `XP_RT`, e.g.:

```sh
# Use default from ini file
$ xp -v | head -1
XP 5.8.6-dev { PHP 5.4.6 & ZE 2.4.0 } @ Windows NT CARLA 6.0 build 6002 (Windows Vista Home Premium Edition Service Pack 2) i586

# Overwrite with XP_RT
$ XP_RT=5.3 xp -v | head -1
XP 5.8.6-dev { PHP 5.3.14 & ZE 2.3.0 } @ Windows NT CARLA 6.0 build 6002 (Windows Vista Home Premium Edition Service Pack 2) i586
```