New directory structure. More powerful startup scripts

This commit is contained in:
Shoghi Cervantes 2014-03-08 04:41:43 +01:00
parent 8d75bff34b
commit cbc64462e6
413 changed files with 326 additions and 151 deletions

View File

@ -41,7 +41,7 @@ namespace PocketMine{
}else{ }else{
$path = ""; $path = "";
} }
$fPath = \PocketMine\PATH . "src" . DIRECTORY_SEPARATOR . $path . $className . ".php"; $fPath = \PocketMine\PATH . "src" . DIRECTORY_SEPARATOR . "PocketMine" . DIRECTORY_SEPARATOR . $path . $className . ".php";
if(file_exists($fPath)){ if(file_exists($fPath)){
require_once($fPath); require_once($fPath);
} }
@ -59,7 +59,7 @@ namespace PocketMine{
} }
}); });
define("PocketMine\PATH", realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR); define("PocketMine\PATH", \getcwd() . DIRECTORY_SEPARATOR);
//Startup code. Do not look at it, it can harm you. Most of them are hacks to fix date-related bugs, or basic functions used after this //Startup code. Do not look at it, it can harm you. Most of them are hacks to fix date-related bugs, or basic functions used after this
@ -357,7 +357,7 @@ namespace PocketMine{
ini_set("opcache.mmap_base", bin2hex(Utils\Utils::getRandomBytes(8, false))); //Fix OPCache address errors ini_set("opcache.mmap_base", bin2hex(Utils\Utils::getRandomBytes(8, false))); //Fix OPCache address errors
require_once(\PocketMine\PATH . "src/utils/pthreads.php"); require_once(\PocketMine\PATH . "src/pthreads.php");
if(!file_exists(\PocketMine\DATA . "server.properties") and !isset($opts["no-wizard"])){ if(!file_exists(\PocketMine\DATA . "server.properties") and !isset($opts["no-wizard"])){
$installer = new Wizard\Installer(); $installer = new Wizard\Installer();

View File

@ -47,7 +47,7 @@ class Server{
private function load(){ private function load(){
$this->version = new VersionString(); $this->version = new VersionString();
if(defined("DEBUG") and DEBUG >= 0){ if(defined("DEBUG") and DEBUG >= 0){
@cli_set_process_title("PocketMine-MP " . MAJOR_VERSION); @cli_set_process_title("PocketMine-MP " . \PocketMine\VERSION);
} }
console("[INFO] Starting Minecraft PE server on " . ($this->serverip === "0.0.0.0" ? "*" : $this->serverip) . ":" . $this->port); console("[INFO] Starting Minecraft PE server on " . ($this->serverip === "0.0.0.0" ? "*" : $this->serverip) . ":" . $this->port);
define("BOOTUP_RANDOM", Utils::getRandomBytes(16)); define("BOOTUP_RANDOM", Utils::getRandomBytes(16));

Some files were not shown because too many files have changed in this diff Show More