Changeset 1169
- Timestamp:
- 11/19/08 00:27:54 (2 months ago)
- Files:
-
- trunk/build/buildjelix.php (modified) (1 diff)
- trunk/build/manifests/jelix-checker.mn (added)
- trunk/build/manifests/jelix-lib.mn (modified) (2 diffs)
- trunk/lib/jelix/checker.php (modified) (1 diff)
- trunk/lib/jelix/core/jInstallChecker.class.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/buildjelix.php
r1163 r1169 235 235 } 236 236 237 $var = ENV::getAll(); 238 $var['STANDALONE_CHECKER'] = true; 239 jManifest::process('build/manifests/jelix-checker.mn','.', $BUILD_TARGET_PATH , $var); 240 237 241 file_put_contents($BUILD_TARGET_PATH.'lib/jelix/VERSION', $LIB_VERSION); 238 242 trunk/build/manifests/jelix-lib.mn
r1164 r1169 9 9 CREDITS 10 10 * init.php 11 checker.php11 * checker.php 12 12 INSTALL 13 13 LICENCE … … 37 37 ! defaultconfig.ini.php 38 38 * jConfigCompiler.class.php 39 jInstallChecker.class.php39 * jInstallChecker.class.php 40 40 jSoapCoordinator.class.php 41 41 jCmdlineCoordinator.class.php trunk/lib/jelix/checker.php
r819 r1169 16 16 * 17 17 */ 18 #if STANDALONE_CHECKER 19 #includephp core/jInstallChecker.class.php 20 #else 18 21 include dirname(__FILE__).'/core/jInstallChecker.class.php'; 19 22 #endif 20 23 /** 21 24 * an HTML reporter for jInstallChecker trunk/lib/jelix/core/jInstallChecker.class.php
r1075 r1169 39 39 protected $messages = array( 40 40 'fr'=>array( 41 #ifnot STANDALONE_CHECKER 41 42 'checker.title'=>'Vérification de l\'installation de Jelix', 43 #else 44 #expand 'checker.title'=>'Vérification de votre serveur pour Jelix __LIB_VERSION__', 45 #endif 42 46 'number.errors'=>' erreurs.', 43 47 'number.error'=>' erreur.', … … 46 50 'number.notices'=>' remarques.', 47 51 'number.notice'=>' remarque.', 52 #ifnot STANDALONE_CHECKER 48 53 'build.not.found'=>'Le fichier BUILD de jelix est introuvable', 49 54 'conclusion.error'=>'Vous devez corriger l\'erreur pour faire fonctionner correctement votre application.', … … 54 59 'conclusion.notices'=>'L\'installation est correcte malgré les remarques.', 55 60 'conclusion.ok'=>'L\'installation est correcte', 61 #else 62 #expand 'conclusion.error'=>'Vous devez corriger l\'erreur pour faire fonctionner correctement une application Jelix __LIB_VERSION__.', 63 #expand 'conclusion.errors'=>'Vous devez corriger les erreurs pour faire fonctionner correctement une application Jelix __LIB_VERSION__.', 64 #expand 'conclusion.warning'=>'Une application Jelix __LIB_VERSION__ peut à priori fonctionner, mais il est préférable de corriger l\'avertissement pour être sûr.', 65 #expand 'conclusion.warnings'=>'Une application Jelix __LIB_VERSION__ peut à priori fonctionner, mais il est préférable de corriger les avertissements pour être sûr.', 66 #expand 'conclusion.notice'=>'Aucun problème pour installer une application pour Jelix __LIB_VERSION__ malgré la remarque.', 67 #expand 'conclusion.notices'=>'Aucun problème pour installer une application pour Jelix __LIB_VERSION__ malgré les remarques.', 68 #expand 'conclusion.ok'=>'Vous pouvez installer une application avec Jelix __LIB_VERSION__', 69 #endif 56 70 'cannot.continue'=>'Les vérifications ne peuvent continuer : ', 57 71 'extension.dom'=>'L\'extension DOM n\'est pas installée', … … 93 107 94 108 'en'=>array( 109 #ifnot STANDALONE_CHECKER 95 110 'checker.title'=>'Jelix Installation checking', 111 #else 112 #expand 'checker.title'=>'Check your configuration server for Jelix __LIB_VERSION__', 113 #endif 96 114 'number.errors'=>' errors.', 97 115 'number.error'=>' error.', … … 100 118 'number.notices'=>' notices.', 101 119 'number.notice'=>' notice.', 120 #ifnot STANDALONE_CHECKER 102 121 'build.not.found'=>'BUILD jelix file is not found', 103 122 'conclusion.error'=>'You must fix the error in order to run your application correctly.', … … 108 127 'conclusion.notices'=>'The installation is ok, although there are notices.', 109 128 'conclusion.ok'=>'The installation is ok', 129 #else 130 #expand 'conclusion.error'=>'You must fix the error in order to run an application correctly with Jelix __LIB_VERSION__.', 131 #expand 'conclusion.errors'=>'You must fix errors in order to run an application correctly with Jelix __LIB_VERSION__.', 132 #expand 'conclusion.warning'=>'Your application for Jelix __LIB_VERSION__ may run without problems, but it is recommanded to fix the warning.', 133 #expand 'conclusion.warnings'=>'Your application for Jelix __LIB_VERSION__ may run without problems, but it is recommanded to fix warnings.', 134 #expand 'conclusion.notice'=>'You can install an application for Jelix __LIB_VERSION__, although there is a notice.', 135 #expand 'conclusion.notices'=>'You can install an application for Jelix __LIB_VERSION__, although there are notices.', 136 #expand 'conclusion.ok'=>'You can install an application for Jelix __LIB_VERSION__.', 137 #endif 110 138 'cannot.continue'=>'Cannot continue the checking: ', 111 139 'extension.dom'=>'DOM extension is not installed', … … 210 238 $this->reporter = $reporter; 211 239 $this->messages = new jInstallMessageProvider($lang); 240 #if STANDALONE_CHECKER 241 $this->buildProperties = array( 242 #expand 'PHP_VERSION_TARGET'=>'__PHP_VERSION_TARGET__', 243 #expand 'ENABLE_PHP_FILTER' =>'__ENABLE_PHP_FILTER__', 244 #expand 'ENABLE_PHP_JSON' =>'__ENABLE_PHP_JSON__', 245 #expand 'ENABLE_PHP_JELIX' =>'__ENABLE_PHP_JELIX__', 246 #expand 'WITH_BYTECODE_CACHE'=>'__WITH_BYTECODE_CACHE__', 247 ); 248 #endif 212 249 } 213 250 … … 219 256 $this->reporter->start(); 220 257 try { 258 #ifnot STANDALONE_CHECKER 221 259 $this->checkAppPaths(); 222 260 $this->loadBuildFile(); 261 #endif 223 262 $this->checkPhpExtensions(); 224 263 $this->checkPhpSettings(); … … 261 300 if(!version_compare($this->buildProperties['PHP_VERSION_TARGET'], phpversion(), '<=')){ 262 301 $this->error('php.bad.version'); 263 $notice = $this->messages->get('php.version.required').$this->buildProperties['PHP_VERSION_TARGET']; 302 $notice = $this->messages->get('php.version.required') 303 .$this->buildProperties['PHP_VERSION_TARGET']; 264 304 $notice.= '. '.$this->messages->get('php.version.current').phpversion(); 265 305 $this->reporter->showNotice($notice); … … 304 344 $ok=false; 305 345 } 306 if($this->buildProperties['WITH_BYTECODE_CACHE'] != 'auto' && $this->buildProperties['WITH_BYTECODE_CACHE'] != '') { 346 if($this->buildProperties['WITH_BYTECODE_CACHE'] != 'auto' && 347 $this->buildProperties['WITH_BYTECODE_CACHE'] != '') { 307 348 if(!extension_loaded ('apc') && !extension_loaded ('eaccelerator') && !extension_loaded ('xcache')) { 308 349 $this->error('extension.opcode.cache'); … … 315 356 return $ok; 316 357 } 317 358 #ifnot STANDALONE_CHECKER 318 359 function checkAppPaths(){ 319 360 $ok = true; … … 348 389 throw new Exception($this->messages->get('too.critical.error')); 349 390 350 if(!isset($GLOBALS['config_file']) || empty($GLOBALS['config_file']) || !file_exists(JELIX_APP_CONFIG_PATH.$GLOBALS['config_file'])){ 391 if(!isset($GLOBALS['config_file']) || 392 empty($GLOBALS['config_file']) || 393 !file_exists(JELIX_APP_CONFIG_PATH.$GLOBALS['config_file'])){ 351 394 throw new Exception($this->messages->get('config.file')); 352 395 } … … 362 405 } 363 406 } 407 #endif 364 408 365 409 function checkPhpSettings(){ 366 410 $ok = true; 411 #ifnot STANDALONE_CHECKER 367 412 $defaultconfig = parse_ini_file(JELIX_APP_CONFIG_PATH."defaultconfig.ini.php", true); 368 413 $indexconfig = parse_ini_file(JELIX_APP_CONFIG_PATH."index/config.ini.php", true); … … 379 424 } 380 425 else { 426 #endif 381 427 if(ini_get('magic_quotes_gpc') == 1){ 382 428 $this->warning('ini.magic_quotes_gpc'); 383 429 $ok=false; 384 430 } 385 } 386 431 #ifnot STANDALONE_CHECKER 432 } 433 #endif 387 434 if(ini_get('magic_quotes_runtime') == 1){ 388 435 $this->error('ini.magic_quotes_runtime');
