Creating packages for XP

at 2006-10-14 in Editorial by kiesel (0 comments)

Today RFC #0074 has been accepted and merged into the public XP repository.

RFC #0074 describes some changes that bring the ability to the framework, to load classes from an archive rather than directly from a directory in the classpath. That does not seem to be so special, but it brings you some very cool things in the day-to-day work with XP.

So, let's take a look on how to create a new archive (.xar was chosen as extension for the time being, though this could still be changed).

Currently, there are no "official" tools you can use to create an archive, but there is a tool named package.php which can create one. Imaging I want to create an archive containing all of the XP framework. Here we go:


alex@found ~ $ cd devel/xp.public/trunk/experiments/people/kiesel/php/cca/
/home/alex/devel/xp.public/trunk/experiments/people/kiesel/php/cca
alex@found ~/devel/xp.public/trunk/experiments/people/kiesel/php/cca $ php package.php \
--file=public.xar /home/alex/devel/xp.public/trunk/skeleton/
===> 1298 files added


To introspect the newly created package file, you can invoke pkgls.php on the file:

alex@found ~/devel/xp.public/trunk/experiments/people/kiesel/php/cca $ php pkgls.php public.xar
Archive public.xar contains:
938 lang/reflect/InvocationHandler.class.php
1.508 lang/reflect/Constructor.class.php
8.523 lang/reflect/Routine.class.php
[...]
4.091 com/google/util/GoogleDateRange.class.php
1.348 TODO
16.746 lang.base.php
757 README
1.929 LICENCE
================================================================================
4.883.512 Total 1298 files


The next step will be the creation of a package handling utility suite which unifies and simplifies that process.



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

Related

Find related articles by a search for «Creating».