Re: Installer post install script

From: Date: Tue, 20 Mar 2007 20:38:56 +0000
Subject: Re: Installer post install script
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26888@lists.php.net to get a copy of this message
On 3/20/07, Lars Olesen <lsolesen@gmail.com> wrote:
I am making an application installable via the PEAR installer. I have been looking at pearweb's post install script, and it has references to the following: @web-dir@ in initialize database. How is it substituted with the correct values - I have setup the Role_Web, but it is still not substituted when running the post install script.
The web_dir path is replaced by a post-install task when the package is installed by the pear installer --- not by a post-install script, which could do a text replacement as well as many other things. Simple replacements from pear config values can be handled with a post install task... additional question & answers and custom configuration can be handled by a post-install script (which is a separate beast). See the php file which generates the package.xml file for pearweb at http://cvs.php.net/viewvc.cgi/pearweb/package.php?view=markup Greg adds a dependency on Role_Web, then indicates replacements to be made in the pearweb.php file: $a->addPostinstallTask($script, 'pearweb.php'); $a->addReplacement('pearweb.php', 'pear-config', '@web-dir@', 'web_dir'); Have you tried this for your package? If this doesn't answer your question, could you give some more information on your package.xml file or PFM generation script? -- -Brett Bieber http:saltybeagle.com aim:ianswerq

« previous php.pear.general (#26888) next »