New features in XP runners

at 2009-04-23 in ReleasesAnnouncements by friebe (0 comments)

RunnerThe XP team is proud to announce a new release of the XP runtimes. Here's a quick overview of the changes:

  • Support for php.ini options
  • Additional search paths / RFC #0178
  • Merging settings
  • Included XCC
  • Tests
Continue reading for more details!



Support for php.ini options
Following the strategy of no longer having to configure php via its .ini-file, we can now add php.ini-options to the xp.ini file.
  == xp.ini ==
use=~/devel/xp/trunk

[runtime]
default=C:/Programme/php-5.2.8-Win32/php
date.timezone=Europe/Berlin
============

The last line is now interpreted as a php.ini option and passed to the runtime (before, it was ignored:)).

Additional search paths / RFC #0178
Before, the xp.ini file was looked for in `dirname($0)`/xp.ini. This is still available but additionally the following locations are searched (in the written order) for xp.ini files:

  1. . (current directory)
  2. ~/.xp/ (where "~" expands to $HOME, also works on Windows+Cygwin)
  3. Environment.SpecialFolder.LocalApplicationData (only on Windows)
  4. `dirname($0)`/xp.ini (where $0 = filename of the binary)

Merging settings
XP runner settings are controllable by two environment variables, "USE_XP" (same as use=... in the .ini file) and "XP_RT" (same as [runtime]."default" in xp.ini). These variables always have precedence over what is written down in the xp.ini files). To allow inheriting settings though the settings are merged.

E.g.:
  == ~/.xp/xp.ini =======
use=~/devel/xp/trunk
========================

== /opt/xp/bin/xp.ini ==
[runtime]
default= C:/Programme/php-5.2.8-Win32/php
extension=php_mysql.dll
========================

This would lead to use_xp being read from the user configuration whereas the runtime and args are selected from the system-wide configuration.

Included XCC
XCC is the XP compiler and used for xp.experiments/arena/lang. The runner is included in the distribution whereas the compiler itself isn't yet. To make it work, add /path/to/devel/xp.forge/trunk/experiments/arena/lang ... to your use_xp setting and you're done:)

Tests
I've started writing unittests for the XP runners to be able to ensure the Un*x and Windows implementations are consistent.



To install (or update) the XP runners without installing (or updating) the framework, you can use the following:
  $ cd ~/bin
$ wget 'http://xp-framework.net/downloads/releases/bin/setup' -O - | php



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES

Related

Find related articles by a search for «New».