Re: Policy/thoughts on running/bundling C binaries with PHP package?
| From: | Alan Knowles | Date: | Fri, 16 Dec 2005 05:53:37 +0000 |
| Subject: | Re: Policy/thoughts on running/bundling C binaries with PHP package? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40746@lists.php.net to get a copy of this message | ||
Keith Palmer Jr. wrote:
I'm going to propose a Net_CDDB package soon which is used to access the FreeDB.org audio-cd database to get audio-cd songs names/artist/cd info. for a CD in your cd-drive. In order to do this I need to be able to read the table of contents from the cd-drive. As far as I know I can't do this with just PHP. The best thought I have so far (other ideas?) is to use an external program like 'cd-discid' (http://lly.org/~rcw/cd-discid/) to read the TOC and return the info. to the PHP script. My thoughts are this:or try cdtools (cdinfo) - I suggest you use a driver model, for each of the backends - I've no idea how you deal win windows though ;)
Check if the cd-discid program is actually installed (which cd-discid)
(see the System::which() method)
If it is, execute that one, otherwise, run a bundled executableNope not a good idea ;) - just show an error message if the applciation does not exist, with a link to the website of the author of that program, or the the end user install the distro version.
(Can I bundle executables with PEAR packages?although there is no 'rule' as such, it would be frowned upon, unless it was the only way to solve a problem, which this is not... Regards Alan
License is GPL, author said its fine to do this) If I can bundle executables with the PEAR package, where do they get placed? Pear extension directory or in the packages directory or...? - Keith