Show
Ignore:
Timestamp:
11/05/07 14:44:57 (6 years ago)
Author:
benoitg
Message:
  • Commit most of Robin Jones install script improvements.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/Dependency.php

    r1294 r1306  
    3737 * @package    WiFiDogAuthServer 
    3838 * @author     Philippe April 
    39  * @author     Max Horváth <max.horvath@freenet.de> 
    40  * @author     Benoit Grégoire <bock@step.polymtl.ca> 
     39 * @author     Max Horváth <max.horvath@freenet.de> 
     40 * @author     Benoit Grégoire <bock@step.polymtl.ca> 
    4141 * @copyright  2005-2007 Philippe April 
    42  * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
    43  * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
     42 * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
     43 * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
    4444 * @version    Subversion $Id$ 
    4545 * @link       http://www.wifidog.org/ 
     
    6464  * @package    WiFiDogAuthServer 
    6565  * @author     Philippe April 
    66   * @author     Max Horváth <max.horvath@freenet.de> 
    67   * @author     Benoit Grégoire <bock@step.polymtl.ca> 
     66  * @author     Max Horváth <max.horvath@freenet.de> 
     67  * @author     Benoit Grégoire <bock@step.polymtl.ca> 
    6868  * @copyright  2005-2007 Philippe April 
    69   * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
    70   * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
     69  * @copyright  2005-2007 Max Horváth, Horvath Web Consulting 
     70  * @copyright  2006-2007 Benoit Grégoire, Technologies Coeus inc. 
    7171  */ 
    7272  class Dependency 
     
    123123       'installDestination' => "/" 
    124124       ), 
     125       
    125126       /* PHP extensions (optional) */ 
     127       "simplepie" => array ( 
     128       "type" => "localLib", 
     129       "detectFiles" => "lib/simplepie/simplepie.inc", 
     130       'description' => "SimplePie is a dependency that provides an RSS parser in PHP. It is required for RssPressReview.  It is is recommended to install it, if you do not, RSS feed options will be disabled.", 
     131       'website' => "http://simplepie.org/", 
     132       'installSourceUrl' => "http://svn.simplepie.org/simplepie/branches/1.0/", 
     133       'installMethod' => "svn", 
     134       'installDestination' => "simplepie" 
     135       ), 
     136       'jpgraph' => array ( 
     137       "type" => "localLib", 
     138       "detectFiles" => "lib/jpgraph-1.22/src/jpgraph.php", 
     139       'description' => "JpGraph is a Object-Oriented Graph creating library for PHP. 
     140JpGraph is not currently used by Wifidog (it will be use for statistic graphs in a later version). You can skip this installation if your not a developper.", 
     141       'website' => "http://www.aditus.nu/jpgraph/", 
     142       'installSourceUrl' => "http://hem.bredband.net/jpgraph/jpgraph-1.22.tar.gz", 
     143       'installMethod' => "tarball", 
     144       'installDestination' => "/" 
     145        ), 
     146       'feedpressreview' => array ( 
     147       "type" => "localLib", 
     148       "detectFiles" => "lib/feedpressreview/FeedPressReview.inc", 
     149       'description' => "Feed Press Review allows your athentication server to produce RSS Feeds.  It is recommended that it is installed.  If it is not installed, the RSS feed options will be disabled.", 
     150       'website' => "http://projects.coeus.ca/feedpressreview/", 
     151       'installSourceUrl' => "http://projects.coeus.ca/svn/feedpressreview/trunk/", 
     152       'installMethod' => "svn", 
     153       'installDestination' => "feedpressreview" 
     154        ), 
    126155       'gettext' => array ( 
    127156       "type" => "phpExtension", 
     
    282311 
    283312          /** Use PHP internal functions to execute a command 
    284             @return: Return value of the command*/ 
     313           Â @return: Return value of the command*/ 
    285314          function execVerbose($command, & $output, & $return_var, &$errMsg = null) { 
    286315              $errMsg .= "Executing: $command <br/>"; 
     
    469498                             break; 
    470499                         case "localLib": 
    471                                                   if($this->getInstallSourceUrl()) { 
    472                                                                                    $name = $this->getId().'_install'; 
    473                                                                                    $value = sprintf(_("Install %s"), $this->getId()); 
    474                                                               $html .= sprintf("<input type='submit' name='%s' value='%s'/>", $name, $value); 
     500                             if($this->getInstallSourceUrl()) { 
     501                                 $name = $this->getId().'_install'; 
     502                                 $value = sprintf(_("Install %s"), $this->getId()); 
     503                                 $html .= sprintf("<input type='submit' name='%s' value='%s'/>", $name, $value); 
    475504                                                       
    476505                             } 
    477506                             else { 
    478                                  $html .= sprintf(_("Sorry, i couldn't find the source for %s in installSourceUrl"), $this->getId()); 
     507                                 $html .= sprintf(_("Sorry, i couldn't find the source for %s in installSourceUrl"), 
     508                                 $this->getId()); 
    479509                             } 
    480510 
     
    657687                           } 
    658688                           else { 
    659                                $installDestinationPath = WIFIDOG_ABS_FILE_PATH . "lib/";$installDestinationPathOrig. 
     689                               $installDestinationPath = WIFIDOG_ABS_FILE_PATH . "lib/" .$installDestinationPathOrig; 
    660690                               $installMethod = $this->getInstallMethod(); 
    661691                               switch($installMethod) { 
     692                                   case "svn": 
     693                                       self::execVerbose("svn co ".escapeshellarg($installSourceUrl)." ".escapeshellarg      ($installDestinationPath), $output, $return, $errorMsg); 
     694 
     695 
     696                                       break; 
     697 
    662698                                   case "tarball": 
    663699                                       $downloadPath = WIFIDOG_ABS_FILE_PATH . "tmp/";