From 17286568366666a56b0494c06de6a1f26ac582e8 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 11:21:31 +0100 Subject: [PATCH 1/9] PHP 5.5.9 --- src/build/compile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build/compile.sh b/src/build/compile.sh index e521f03f9..885898db7 100755 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -1,7 +1,7 @@ #!/bin/bash -COMPILER_VERSION="0.15" +COMPILER_VERSION="0.16" -PHP_VERSION="5.5.8" +PHP_VERSION="5.5.9" ZEND_VM="GOTO" LIBEDIT_VERSION="0.3" From 20f2ef0e8287a84d451ca7dd37618b007ecbb2de Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 11:45:12 +0100 Subject: [PATCH 2/9] Updated PHP binaries on the installer --- src/build/installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build/installer.sh b/src/build/installer.sh index d56550b59..73d528c2a 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -1,8 +1,8 @@ #!/bin/bash PMMP_VERSION="" -MAC_BUILD="PHP_5.5.8_x86_MacOS" -RPI_BUILD="PHP_5.5.8_ARM_Raspbian_hard" -AND_BUILD="PHP_5.5.8_ARMv7_Android" +MAC_BUILD="PHP_5.5.9_x86_MacOS" +RPI_BUILD="PHP_5.5.9_ARM_Raspbian_hard" +AND_BUILD="PHP_5.5.9_ARMv7_Android" update=off #Needed to use aliases From 951ac08703d11ef7ba9b9584e44c340e66fbdd0a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 18:13:19 +0100 Subject: [PATCH 3/9] Updated installer.sh --- src/build/installer.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/build/installer.sh b/src/build/installer.sh index 73d528c2a..831738ce9 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -3,6 +3,7 @@ PMMP_VERSION="" MAC_BUILD="PHP_5.5.9_x86_MacOS" RPI_BUILD="PHP_5.5.9_ARM_Raspbian_hard" AND_BUILD="PHP_5.5.9_ARMv7_Android" +IOS_BUILD="PHP_5.5.9_ARMv6_iOS" update=off #Needed to use aliases @@ -71,7 +72,15 @@ else echo " detecting if build is available..." if [ "$(uname -s)" == "Darwin" ]; then if ["$(uname -s)" == iPhone*] || ["$(uname -s)" == iPod*] || ["$(uname -s)" == iPad*]; then - echo -n "[3/3] No binaries for iOS available" + rm -r -f bin/ >> /dev/null 2>&1 + echo -n "[3/3] iOS PHP build available, downloading $IOS_BUILD.tar.gz..." + download_file "http://sourceforge.net/projects/pocketmine/files/builds/$IOS_BUILD.tar.gz" | tar -zx > /dev/null 2>&1 + chmod +x ./bin/php5/bin/* + echo -n " regenerating php.ini..." + echo "date.timezone=$TIMEZONE" >> "./bin/php5/lib/php.ini" + echo "short_open_tag=0" >> "./bin/php5/lib/php.ini" + echo "asp_tags=0" >> "./bin/php5/lib/php.ini" + echo " done" else rm -r -f bin/ >> /dev/null 2>&1 echo -n "[3/3] Mac OSX PHP build available, downloading $MAC_BUILD.tar.gz..." @@ -99,7 +108,7 @@ else if [ $? -eq 0 ]; then set -e rm -r -f bin/ >> /dev/null 2>&1 - echo -n "[3/3] Raspberry Pi build available, downloading $RPI_BUILD.tar.gz..." + echo -n "[3/3] Raspberry Pi PHP build available, downloading $RPI_BUILD.tar.gz..." download_file "http://sourceforge.net/projects/pocketmine/files/builds/$RPI_BUILD.tar.gz" | tar -zx > /dev/null 2>&1 chmod +x ./bin/php5/bin/* echo -n " regenerating php.ini..." From d8e34e9ac547c48ce1e6640e5dd78c748999690c Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 18:46:50 +0100 Subject: [PATCH 4/9] Added iOS support --- src/build/installer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build/installer.sh b/src/build/installer.sh index 831738ce9..a65115df0 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -71,7 +71,8 @@ else echo -n "[3/3] Obtaining PHP:" echo " detecting if build is available..." if [ "$(uname -s)" == "Darwin" ]; then - if ["$(uname -s)" == iPhone*] || ["$(uname -s)" == iPod*] || ["$(uname -s)" == iPad*]; then + IS_IOS=$(expr match "$(uname -m)" 'iP[a-zA-Z0-9,]*') + if [ $IS_IOS -gt 0 ]; then rm -r -f bin/ >> /dev/null 2>&1 echo -n "[3/3] iOS PHP build available, downloading $IOS_BUILD.tar.gz..." download_file "http://sourceforge.net/projects/pocketmine/files/builds/$IOS_BUILD.tar.gz" | tar -zx > /dev/null 2>&1 From af6174508d231f0d8ff2f097b2d4e81c178a0cba Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 19:15:00 +0100 Subject: [PATCH 5/9] MacOS fix --- src/build/installer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build/installer.sh b/src/build/installer.sh index a65115df0..d8e90dec9 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -71,7 +71,8 @@ else echo -n "[3/3] Obtaining PHP:" echo " detecting if build is available..." if [ "$(uname -s)" == "Darwin" ]; then - IS_IOS=$(expr match "$(uname -m)" 'iP[a-zA-Z0-9,]*') + UNAME_M=$(uname -m) + IS_IOS=$(expr match $UNAME_M 'iP[a-zA-Z0-9,]*') if [ $IS_IOS -gt 0 ]; then rm -r -f bin/ >> /dev/null 2>&1 echo -n "[3/3] iOS PHP build available, downloading $IOS_BUILD.tar.gz..." From bcee4e7c21f654167c04ffe8a65e4ac8e49d271f Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 19:23:16 +0100 Subject: [PATCH 6/9] bypass a few errors on installer.sh --- src/build/installer.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/build/installer.sh b/src/build/installer.sh index d8e90dec9..67812bbc8 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -71,8 +71,10 @@ else echo -n "[3/3] Obtaining PHP:" echo " detecting if build is available..." if [ "$(uname -s)" == "Darwin" ]; then + set +e UNAME_M=$(uname -m) IS_IOS=$(expr match $UNAME_M 'iP[a-zA-Z0-9,]*') + set -e if [ $IS_IOS -gt 0 ]; then rm -r -f bin/ >> /dev/null 2>&1 echo -n "[3/3] iOS PHP build available, downloading $IOS_BUILD.tar.gz..." From d4791ceb6c6ebc220acb1a5f9e66c23d97931377 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 20:53:29 +0100 Subject: [PATCH 7/9] removed time warning --- src/config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.php b/src/config.php index 900d9453c..b93bee79d 100644 --- a/src/config.php +++ b/src/config.php @@ -40,13 +40,13 @@ if(ini_get("date.timezone") == ""){ //No Timezone set $daylight = (int) date("I"); $d = timezone_name_from_abbr("", $offset, $daylight); - ini_set("date.timezone", $d); + @ini_set("date.timezone", $d); date_default_timezone_set($d); }else{ $d = @date_default_timezone_get(); if(strpos($d, "/") === false){ $d = timezone_name_from_abbr($d); - ini_set("date.timezone", $d); + @ini_set("date.timezone", $d); date_default_timezone_set($d); } } @@ -77,4 +77,4 @@ if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information! define("GIT_COMMIT", strtolower(trim(file_get_contents(FILE_PATH.".git/refs/heads/master")))); }else{ //Unknown :( define("GIT_COMMIT", str_repeat("00", 20)); -} \ No newline at end of file +} From 61953b55076c63ed1b0182e0c7ea724d5e6fe572 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Feb 2014 22:56:15 +0100 Subject: [PATCH 8/9] Fixed online functions on Android - do not use DNS --- src/utils/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 4651e4ab8..a83793fbf 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -28,7 +28,7 @@ class Utils{ public static $ip = false; public static function isOnline(){ - return ((@fsockopen("google.com", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false); + return ((@fsockopen("8.8.8.8", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false); } public static function getUniqueID($raw = false, $extra = ""){ From 5dd772754884b41931c50db1c9fea0da24d89053 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 8 Feb 2014 00:05:36 +0100 Subject: [PATCH 9/9] Reverted 8e37627bc0e583efaddff47928ee50df11a8de5a --- src/API/PlayerAPI.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 39709f69c..38a88c153 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -32,7 +32,7 @@ class PlayerAPI{ $this->server->api->console->register("kill", "", array($this, "commandHandler")); $this->server->api->console->register("gamemode", " [player]", array($this, "commandHandler")); $this->server->api->console->register("tp", "[target player] OR /tp [target player] ", array($this, "commandHandler")); - $this->server->api->console->register("setspawn", "[player] [x] [y] [z]", array($this, "commandHandler")); + $this->server->api->console->register("spawnpoint", "[player] [x] [y] [z]", array($this, "commandHandler")); $this->server->api->console->register("spawn", "", array($this, "commandHandler")); $this->server->api->console->register("ping", "", array($this, "commandHandler")); $this->server->api->console->alias("lag", "ping"); @@ -118,7 +118,7 @@ class PlayerAPI{ public function commandHandler($cmd, $params, $issuer, $alias){ $output = ""; switch($cmd){ - case "setspawn": + case "spawnpoint": if(!($issuer instanceof Player)){ $output .= "Please run this command in-game.\n"; break; @@ -499,4 +499,4 @@ class PlayerAPI{ $this->server->handle("player.offline.save", $data); $data->save(); } -} \ No newline at end of file +}