diff --git a/src/build/installer.sh b/src/build/installer.sh index 67812bbc8..4cba6bcde 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -59,7 +59,7 @@ rm -f start.sh rm -f start.bat echo "[1/3] Downloading PocketMine-MP $PMMP_VERSION..." set -e -download_file "https://github.com/shoghicp/PocketMine-MP/archive/$PMMP_VERSION.tar.gz" | tar -zx > /dev/null +download_file "https://github.com/PocketMine/PocketMine-MP/archive/$PMMP_VERSION.tar.gz" | tar -zx > /dev/null mv -f PocketMine-MP-$PMMP_VERSION/* ./ rm -f -r PocketMine-MP-$PMMP_VERSION/ rm -f ./start.cmd diff --git a/src/installer/Installer.php b/src/installer/Installer.php index ac8217134..e7dd1070f 100644 --- a/src/installer/Installer.php +++ b/src/installer/Installer.php @@ -96,7 +96,7 @@ LICENSE; $config->set("server-port", $port); echo "[*] ".$this->lang->ram_warning."\n"; echo "[?] ".$this->lang->server_ram." (".self::DEFAULT_MEMORY."): "; - $config->set("gamemode", ((int) $this->getInput(self::DEFAULT_MEMORY))."M"); + $config->set("memory-limit", ((int) $this->getInput(self::DEFAULT_MEMORY))."M"); echo "[*] ".$this->lang->gamemode_info."\n"; do{ echo "[?] ".$this->lang->default_gamemode.": (".self::DEFAULT_GAMEMODE."): "; @@ -284,4 +284,4 @@ LICENSE; } } -/***REM_END***/ \ No newline at end of file +/***REM_END***/ diff --git a/src/utils/Utils.php b/src/utils/Utils.php index c25597941..9d77a8a63 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -90,13 +90,23 @@ class Utils{ } public static function getOS(){ - $uname = trim(strtoupper(php_uname("s"))); - if(strpos($uname, "DARWIN") !== false){ - return "mac"; - }elseif(strpos($uname, "WIN") !== false){ + $uname = php_uname("s"); + if(stripos($uname, "Darwin") !== false){ + if(strpos(php_uname("m"), "iP") === 0){ + return "ios"; + }else{ + return "mac"; + } + }elseif(stripos($uname, "Win") !== false or $uname === "Msys"){ return "win"; - }elseif(strpos($uname, "LINUX") !== false){ - return "linux"; + }elseif(stripos($uname, "Linux") !== false){ + if(@file_exists("/system/build.prop")){ + return "android"; + }else{ + return "linux"; + } + }elseif(stripos($uname, "BSD") !== false or $uname === "DragonFly"){ + return "bsd"; }else{ return "other"; }