Re: PHAR archives
| From: | Greg Beaver | Date: | Mon, 05 Jun 2006 21:15:43 +0000 |
| Subject: | Re: PHAR archives | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24255@lists.php.net to get a copy of this message | ||
Paul Scott wrote:
> I was just wondering...Dangerous, I know, but anyway...
>
> Our application makes *extensive* use of a whole whack of the PEAR
> objects, and our users are starting to find it increasingly difficult to
> install all of them. (Most of our users are lecturers/educators, not
> sysadmins). Is it reasonable to create a PHAR archive of them all and
> use a postinstall script to pear upgrade-all? This archive we could then
> distribute as a separate download or something with a README. Does
> something like this exist already? Has someone got something that they
> would like to share?
>
> Thoughts?
Two questions should answer this one realy quick:
1) will all of your users have simple, easy internet access at the time
they install your application?
2) do any of them have enough know-how to set up a proxy?
If the answer is "yes" to both, then use some kind of remote
installation method like PEAR_PackageUpdate, it will ultimately have a
lower setup cost for you.
if the answer is "no" to either, then you should instead use a phar
archive. However, this begs another question:
3) do all of your users have PHP 5.1.0 or newer?
phar archives require PHP 5.1.0 because of the new __HALT_COMPILER();
token, so if any users have PHP 5.1.0 or older, you need to use some
other method.
The gnope installer for PHP-GTK2 (http://www.gnope.org) uses a modified
version of the make-installpear-nozlib-phar.php (phew) script available
in CVS of pear-core/ to create a custom phar for installation.
The script may need some updating to match the parameter order of the
current PHP_Archive, I have to check that some time soon, but
instructions are available inside the file for setting it up, and also
inside README.RELEASING inside pear-core/
This should get you started, ask here for further questions.
Greg