function com_install() { register_shutdown_function("deleteExtFolder"); $installer = new Installer(); $installer->install(); return true; }
function com_install() { register_shutdown_function("NextendSS3DeleteExtensionFolder"); $installer = new Installer(); $installer->install(); return true; }
function com_install() { $installer = new Installer(); // echo "<H3>Installing Universal AJAX Live Search component and module Success</h3>"; $installer->install(); return true; }
/** * * @throws Installer_Exception */ public function action_go() { $this->auto_render = FALSE; $post = $this->request->post('install'); try { $this->_installer->install($post); Observer::notify('after_install', $post); Cache::clear_file(); } catch (Validation_Exception $e) { Messages::errors($e->errors('validation')); $this->go_back(); } catch (Exception $e) { Messages::errors($e->getMessage()); $this->go_back(); } $this->go($post['admin_dir_name'] . '/login'); }
protected function _execute(array $params) { if ($params['db_driver'] === NULL) { $params['db_driver'] = Minion_CLI::read(__('Please enter database driver (:types)', array(':types' => implode(', ', array_keys($this->_installer->database_drivers()))))); } if ($params['locale'] === NULL) { $params['locale'] = Minion_CLI::read(__('Please enter locale (:types)', array(':types' => implode(', ', array_keys(I18n::available_langs()))))); } if ($params['db_name'] === NULL) { $params['db_name'] = Minion_CLI::read(__('Please enter database name')); } if ($params['timezone'] === NULL) { $answer = Minion_CLI::read(__('Select current timezone automaticly (:current)', array(':current' => date_default_timezone_get())), array('y', 'n')); if ($answer == 'y') { $params['timezone'] = date_default_timezone_get(); } else { $params['timezone'] = Minion_CLI::read(__('Please enter current timezone (:site)', array(':site' => 'http://www.php.net/manual/en/timezones.php')), DateTimeZone::listIdentifiers()); } } if ($params['cache_type'] === NULL) { $params['cache_type'] = Minion_CLI::read(__('Please enter cache type (:types)', array(':types' => implode(', ', array_keys($this->_installer->cache_types()))))); } if ($params['session_type'] === NULL) { $session_types = Kohana::$config->load('installer')->get('session_types', array()); $params['session_type'] = Minion_CLI::read(__('Please enter session type (:types)', array(':types' => implode(', ', array_keys($this->_installer->session_types()))))); } if ($params['password'] !== NULL) { unset($params['password_generate']); $params['password_field'] = $params['password_confirm'] = $params['password']; } try { $this->_installer->install($params); Observer::notify('after_install', $params); Cache::clear_file(); Minion_CLI::write('=============================================='); Minion_CLI::write(__('KodiCMS installed successfully')); Minion_CLI::write('=============================================='); $install_data = Session::instance()->get_once('install_data'); Minion_CLI::write(__('Login: :login', array(':login' => Arr::get($install_data, 'username')))); Minion_CLI::write(__('Password: :password', array(':password' => Arr::get($install_data, 'password_field')))); } catch (Exception $e) { Minion_CLI::write(__(':text | :file [:line]', array(':text' => $e->getMessage(), ':file' => $e->getFile(), ':line' => $e->getLine()))); } }
// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Pastèque is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Pastèque. If not, see <http://www.gnu.org/licenses/>. namespace Pasteque; if (isset($_POST['install'])) { $country = $_POST['install']; $country = str_replace("..", "", $country); Installer::install($country); } else { if (isset($_POST['update'])) { $country = $_POST['country']; $country = str_replace("..", "", $country); Installer::upgrade($country); } } function show_install() { tpl_open(); ?> <h1><?php \pi18n("Installation"); ?> </h1>
<?php /** * Part of CI PHPUnit Test * * @author Kenji Suzuki <https://github.com/kenjis> * @license MIT License * @copyright 2015 Kenji Suzuki * @link https://github.com/kenjis/ci-phpunit-test */ require __DIR__ . '/Installer.php'; $installer = new Installer(); $installer->install();
function vce_activation() { $installerVCE = new Installer(); $installerVCE->install(); }
#!/usr/bin/env php <?php $installer = new Installer(); if ($argc === 3) { $package = $argv[1]; $version = $argv[2]; echo $installer->install($package, $version); } else { echo $installer->usage($argv[0]); } class Installer { protected $tmp_dir; protected $packages = array(); public function __construct() { $this->tmp_dir = __DIR__ . '/tmp'; @mkdir($this->tmp_dir); $this->packages = array('translations' => array('site' => 'github', 'user' => 'bcit-ci', 'repos' => 'codeigniter3-translations', 'name' => 'Translations for CodeIgniter System Messages', 'dir' => 'language', 'example_branch' => '3.0.0')); } public function usage($self) { $msg = 'You can install:' . PHP_EOL; foreach ($this->packages as $key => $value) { $msg .= ' ' . $value['name'] . ' (' . $key . ')' . PHP_EOL; } $msg .= PHP_EOL; $msg .= 'Usage:' . PHP_EOL; $msg .= ' php install.php <package> <version/branch>' . PHP_EOL; $msg .= PHP_EOL; $msg .= 'Examples:' . PHP_EOL;
/** * Install packages slated for installation during transaction */ static function commit() { if (static::$inTransaction === false) { return false; } try { static::preCommitDependencyResolve(); $installer = new Installer(); // validate dependencies $errs = new \PEAR2\MultiErrors(); foreach (static::$installPackages as $package) { $package->validateDependencies(static::$installPackages, $errs); } if (count($errs->E_ERROR)) { throw new Installer\Exception('Dependency validation failed ' . 'for some packages to install, installation aborted', $errs); } // download non-local packages foreach (static::$installPackages as $package) { $fullPackageName = $package->channel . '/' . $package->name; Logger::log(1, 'Downloading ' . $fullPackageName); $package->download(); if ($package->isPlugin()) { // check for downloaded packages if (!isset(Main::$options['install-plugins'])) { // Check the plugin registry so we can provide more info $command = 'install'; if (Config::current()->pluginregistry->exists($package->name, $package->channel)) { $command = 'upgrade'; } Logger::log(0, 'Skipping plugin ' . $fullPackageName . PHP_EOL . 'Plugins modify the installer and cannot be installed at the same time as regular packages.' . PHP_EOL . 'Add the -p option to manage plugins, for example:' . PHP_EOL . ' php pyrus.phar ' . $command . ' -p ' . $fullPackageName); unset(static::$installPackages[$fullPackageName]); } } } // now validate everything to the fine-grained level foreach (static::$installPackages as $package) { $package->validate(Validate::INSTALLING); } // create dependency connections and load them into the directed graph $graph = new DirectedGraph(); foreach (static::$installPackages as $package) { $package->makeConnections($graph, static::$installPackages); } // topologically sort packages and install them via iterating over the graph $packages = $graph->topologicalSort(); $reg = Config::current()->registry; try { AtomicFileTransaction::begin(); $reg->begin(); if (isset(Main::$options['upgrade'])) { foreach ($packages as $package) { $fullPackageName = $package->channel . '/' . $package->name; if ($reg->exists($package->name, $package->channel)) { static::$wasInstalled[$fullPackageName] = $reg->package[$fullPackageName]; $reg->uninstall($package->name, $package->channel); } } } static::detectDownloadConflicts($packages, $reg); foreach ($packages as $package) { if (isset(static::$installedPackages[$package->channel . '/' . $package->name])) { continue; } $installer->install($package); static::$installedPackages[$package->channel . '/' . $package->name] = $package; } foreach (static::$installedPackages as $package) { try { $previous = $reg->toPackageFile($package->name, $package->channel, true); } catch (\Exception $e) { $previous = null; } $reg->install($package->getPackageFile()->info); static::$registeredPackages[] = array($package, $previous); } static::$installPackages = array(); AtomicFileTransaction::commit(); $reg->commit(); } catch (AtomicFileTransaction\Exception $e) { $errs = new \PEAR2\MultiErrors(); $errs->E_ERROR[] = $e; try { AtomicFileTransaction::rollback(); } catch (\Exception $ex) { $errs->E_WARNING[] = $ex; } try { $reg->rollback(); } catch (\Exception $ex) { $errs->E_WARNING[] = $ex; } throw new Installer\Exception('Installation failed', $errs); } Config::current()->saveConfig(); // success AtomicFileTransaction::removeBackups(); static::$inTransaction = false; if (isset(Main::$options['install-plugins'])) { Config::setCurrent(self::$lastCurrent->path); } } catch (\Exception $e) { static::rollback(); throw $e; } }
<?php /** * Part of ci-phpunit-test * * @author Kenji Suzuki <https://github.com/kenjis> * @license MIT License * @copyright 2015 Kenji Suzuki * @link https://github.com/kenjis/ci-phpunit-test */ require __DIR__ . '/Installer.php'; $app = 'application'; if (isset($argv[1]) && is_dir($argv[1])) { $app = $argv[1]; } $installer = new Installer(); $installer->install($app);
// CLI-install error message. exit(1) will halt any makefile. if($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) { echo "Cannot install due to errors:\n"; $req->listErrors(); $dbReq->listErrors(); exit(1); } if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) { // Confirm before reinstalling if(!isset($_REQUEST['force_reinstall']) && !$installFromCli && $alreadyInstalled) { include('sapphire/dev/install/config-form.html'); } else { $inst = new Installer(); if($_REQUEST) $inst->install($_REQUEST); else $inst->install(array( 'database' => $databaseConfig['type'], 'mysql' => $databaseConfig, 'admin' => $adminConfig, )); } // Show the config form } else { include('sapphire/dev/install/config-form.html'); } /** * This class checks requirements * Each of the requireXXX functions takes an argument which gives a user description of the test. It's an array
public static function setUpBeforeClass() { // Install empty database Installer::install(null); }
$_SESSION['ost_installer']['s'] = 'config'; } else { $errors['prereq'] = __('Minimum requirements not met!'); } break; case 'config': if (!$installer->config_exists()) { $errors['err'] = __('Configuration file does NOT exist. Follow steps below to add one.'); } elseif (!$installer->config_writable()) { $errors['err'] = __('Write access required to continue'); } else { $_SESSION['ost_installer']['s'] = 'install'; } break; case 'install': if ($installer->install($_POST)) { $_SESSION['info'] = array('name' => ucfirst($_POST['fname'] . ' ' . $_POST['lname']), 'email' => $_POST['admin_email'], 'URL' => URL); //TODO: Go to subscribe step. $_SESSION['ost_installer']['s'] = 'done'; } elseif (!($errors = $installer->getErrors()) || !$errors['err']) { $errors['err'] = __('Error installing osTicket - correct the errors below and try again.'); } break; case 'subscribe': if (!trim($_POST['name'])) { $errors['name'] = __('Required'); } if (!$_POST['email']) { $errors['email'] = __('Required'); } elseif (!Validator::is_valid_email($_POST['email'])) { $errors['email'] = __('Invalid');
$installFromCli = isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'install'; // CLI-install error message. exit(1) will halt any makefile. if ($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) { echo "Cannot install due to errors:\n"; $req->listErrors(); $dbReq->listErrors(); exit(1); } if ((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) { // Confirm before reinstalling if (!$installFromCli && $alreadyInstalled) { include FRAMEWORK_NAME . '/dev/install/config-form.html'; } else { $inst = new Installer(); if ($_REQUEST) { $inst->install($_REQUEST); } else { $inst->install(array('db' => $databaseConfig, 'admin' => $adminConfig)); } } // Show the config form } else { include FRAMEWORK_NAME . '/dev/install/config-form.html'; } /** * This class checks requirements * Each of the requireXXX functions takes an argument which gives a user description of the test. * It's an array of 3 parts: * $description[0] - The test catetgory * $description[1] - The test title * $description[2] - The test error to show, if it goes wrong
public function install_9() { if ($this->accessAdminPage(1)) { require_once dirname(__FILE__) . '/resources/install.php'; $installer = new Installer($this->parent); return $installer->install(9); } else { $this->parent->parent->addHeader('Location', '/admin/modules/'); return new ActionResult($this, '/admin/modules/', 1, 'You are not allowed to do that', B_T_FAIL); } }
echo PHP_EOL; logMessage(L_USER, "Checking for leftovers from a previous installation"); $leftovers = $installer->detectLeftovers(true, $app, $db_params); if (isset($leftovers)) { logMessage(L_USER, $leftovers); if ($user->getTrueFalse(null, "Leftovers from a previouse Kaltura installation have been detected. In order to continue with the current installation these leftovers must be removed. Do you wish to remove them now?", 'n')) { $installer->detectLeftovers(false, $app, $db_params); } else { installationFailed("Installation cannot continue because a previous installation of Kaltura was detected.", $leftovers, "Please manually uninstall Kaltura before running the installation or select yes to remove the leftovers."); } } // last chance to stop the installation echo PHP_EOL; if (!$silentRun && !$user->getTrueFalse('', "Installation is now ready to begin. Start installation now?", 'y')) { echo "Bye" . PHP_EOL; die(1); } // run the installation $install_output = $installer->install($app, $db_params); if ($install_output !== null) { installationFailed("Installation failed.", $install_output, $fail_action, $cleanupIfFail); } $installer->finalizeInstallation($app); exec('./postinstall.sh ' . $app->get("KALTURA_VIRTUAL_HOST_NAME") . ' ' . $app->get('BASE_DIR')); if (isset($report)) { $report->reportInstallationSuccess(); } // print after installation instructions logMessage(L_USER, sprintf("\nInstallation Completed Successfully.\nYour Kaltura Admin Console credentials:\nSystem Admin user: %s\nSystem Admin password: %s\n\nPlease keep this information for future use.\n", $app->get('ADMIN_CONSOLE_ADMIN_MAIL'), $app->get('ADMIN_CONSOLE_PASSWORD'))); logMessage(L_USER, sprintf("To get started browse your Admin Console at: http://%s/admin_console/\n", $app->get("KALTURA_VIRTUAL_HOST_NAME"))); die(0);
<div class="row"> <label for="password">Admin Password</label> <input type="text" value="<?php echo !$password ? generate_password() : $password; ?> " name="password" id="password" class="input" size="40" /> <p class="sidenote">Pick something strong and memorable. If you forget this, you might have to reinstall!</p> </div> </fieldset> <input type="hidden" value="2" name="page" id="page" /> <input type="submit" value="Next" class="submit" /> </form> <?php break; case 2: $installer->install($sitename, $username, $password); break; default: ?> <h1 id="title">Installation</h1> <p>Welcome to Lilina installation. We're now going to start installing. Make sure that the <code>content/system/</code> directory and all subdirectories are <a href="readme.html#permissions">writable</a>.</p> <form action="<?php echo $_SERVER['REQUEST_URI']; ?> " method="post"> <input type="hidden" name="page" value="1" /> <input type="submit" value="Install" class="submit" /> </form> <?php break; }
/** @depends testInstallStruct */ public function testInstallUnitedKingdom() { Installer::install("united_kingdom"); $pdo = PDOBuilder::getPDO(); $this->assertEquals(PT::DB_LEVEL, Installer::getVersion(), "Version doesn't match"); // Check data insert $sql = "SELECT * FROM PLACES WHERE ID = '10'"; $stmt = $pdo->prepare($sql); $this->assertNotEquals(false, $stmt->execute(), "Query failed"); $row = $stmt->fetch(); $this->assertEquals("Table 10", $row['NAME'], "Country data failed to be inserted"); $sql = "SELECT * FROM CASHREGISTERS"; $stmt = $pdo->prepare($sql); $this->assertNotEquals(false, $stmt->execute(), "Query failed"); $row = $stmt->fetch(); $this->assertEquals("Till", $row['NAME'], "Cash register failed to be inserted"); }
} //Always rewrite config file in case MySQL details changed (e.g. ip address) echo "Updating configuration file\n"; if (!($configFile = file_get_contents($vars['config']))) { err("Failed to load configuration file: {$vars['config']}"); } $configFile = str_replace("define('OSTINSTALLED',FALSE);", "define('OSTINSTALLED',TRUE);", $configFile); $configFile = str_replace('%ADMIN-EMAIL', $vars['admin_email'], $configFile); $configFile = str_replace('%CONFIG-DBHOST', $vars['dbhost'], $configFile); $configFile = str_replace('%CONFIG-DBNAME', $vars['dbname'], $configFile); $configFile = str_replace('%CONFIG-DBUSER', $vars['dbuser'], $configFile); $configFile = str_replace('%CONFIG-DBPASS', $vars['dbpass'], $configFile); $configFile = str_replace('%CONFIG-PREFIX', $vars['prefix'], $configFile); $configFile = str_replace('%CONFIG-SIRI', $vars['siri'], $configFile); if (!file_put_contents($installer->getConfigFile(), $configFile)) { err("Failed to write configuration file"); } //Perform database installation if required if (!$db_installed) { echo "Installing database. Please wait...\n"; if (!$installer->install($vars)) { $errors = $installer->getErrors(); echo "Database installation failed. Errors:\n"; foreach ($errors as $e) { echo " {$e}\n"; } exit(1); } else { echo "Database installation successful\n"; } }
$hostname = $_POST["hostname"]; $username = $_POST["username"]; $password = $_POST["password"]; $dbname = $_POST["dbname"]; $adminname = $_POST["adminname"]; $adminpwd = md5($_POST["adminpwd"]); //$ihavedb = $_POST["ihavedb"]; //$ihavedb = ($ihavedb=="on"||$ihavedb==true)?true:false; $ihavedb = true; //$lan = $_POST["language"]; $lan = $_SESSION['lan']; $installer = new Installer($lan); $SCRIPT_NAME = $_SERVER['SCRIPT_NAME']; $POS = strpos($SCRIPT_NAME, 'install', 0); $webroot = substr($SCRIPT_NAME, 0, $POS - 1); $ret = $installer->install($hostname, $username, $password, $dbname, $adminname, $adminpwd, $ihavedb, "bitword.sql", $webroot); $msgarr = $installer->msg; ?> <div class="main"> <div class="pact" readonly="readonly"> <?php if (!$ret) { echo "<p> {$errtip} <br/></p>"; foreach ($msgarr as $msg) { echo "<p>{$msg}</p>"; } } else { echo $suctip; } ?>
} if ($databaseConfig) { $dbReq = new InstallRequirements(); $dbReq->checkdatabase($databaseConfig, 'CiviCRM'); if ($installType == 'drupal') { $dbReq->checkdatabase($drupalConfig, 'Drupal'); } } // Actual processor if (isset($_REQUEST['go']) && !$req->hasErrors() && !$dbReq->hasErrors()) { // Confirm before reinstalling if (!isset($_REQUEST['force_reinstall']) && $alreadyInstalled) { include $installDirPath . 'template.html'; } else { $inst = new Installer(); $inst->install($_REQUEST); } // Show the config form } else { include $installDirPath . 'template.html'; } /** * This class checks requirements * Each of the requireXXX functions takes an argument which gives a user description of the test. It's an array * of 3 parts: * $description[0] - The test catetgory * $description[1] - The test title * $description[2] - The test error to show, if it goes wrong */ class InstallRequirements {
// CLI-install error message. exit(1) will halt any makefile. if($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) { echo "Cannot install due to errors:\n"; $req->listErrors(); $dbReq->listErrors(); exit(1); } if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) { // Confirm before reinstalling if(!$installFromCli && $alreadyInstalled) { include(FRAMEWORK_NAME . '/dev/install/config-form.html'); } else { $inst = new Installer(); if($_REQUEST) $inst->install($_REQUEST); else $inst->install(array( 'db' => $databaseConfig, 'admin' => $adminConfig, )); } // Show the config form } else { include(FRAMEWORK_NAME . '/dev/install/config-form.html'); } /** * This class checks requirements * Each of the requireXXX functions takes an argument which gives a user description of the test. * It's an array of 3 parts:
} if ($databaseConfig) { $dbReq = new InstallRequirements(); $dbReq->checkdatabase($databaseConfig, 'CiviCRM'); if ($installType == 'drupal') { $dbReq->checkdatabase($drupalConfig, 'Drupal'); } } // Actual processor if (isset($_POST['go']) && !$req->hasErrors() && !$dbReq->hasErrors()) { // Confirm before reinstalling if (!isset($_POST['force_reinstall']) && $alreadyInstalled) { include $installDirPath . 'template.html'; } else { $inst = new Installer(); $inst->install($_POST); } // Show the config form } else { include $installDirPath . 'template.html'; } /** * This class checks requirements * Each of the requireXXX functions takes an argument which gives a user description of the test. It's an array * of 3 parts: * $description[0] - The test category * $description[1] - The test title * $description[2] - The test error to show, if it goes wrong */ class InstallRequirements {
* @updated 04/13/2009 */ // Imports require_once 'Installer.php'; // Setup Installer::init(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Bedrock Framework » Install</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.scrollto.js"></script> <script type="text/javascript"> <!-- $(document).ready(function() { parent.installComplete(); }); //--> </script> </head> <body id="output"> <?php Installer::install() ?> </body> </html>