mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 14:19:53 +00:00
Improved dependency checking
This commit is contained in:
parent
d41bdfc31c
commit
2cb98c48c2
@ -398,11 +398,6 @@ namespace pocketmine {
|
|||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("sockets")){
|
|
||||||
$logger->critical("Unable to find the Socket extension.");
|
|
||||||
++$errors;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pthreads_version = phpversion("pthreads");
|
$pthreads_version = phpversion("pthreads");
|
||||||
if(substr_count($pthreads_version, ".") < 2){
|
if(substr_count($pthreads_version, ".") < 2){
|
||||||
$pthreads_version = "0.$pthreads_version";
|
$pthreads_version = "0.$pthreads_version";
|
||||||
@ -431,24 +426,22 @@ namespace pocketmine {
|
|||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("curl")){
|
$extensions = [
|
||||||
$logger->critical("Unable to find the cURL extension.");
|
"curl" => "cURL",
|
||||||
++$errors;
|
"json" => "JSON",
|
||||||
}
|
"mbstring" => "Multibyte String",
|
||||||
|
"yaml" => "YAML",
|
||||||
|
"openssl" => "OpenSSL",
|
||||||
|
"sockets" => "Sockets",
|
||||||
|
"zip" => "Zip",
|
||||||
|
"zlib" => "Zlib"
|
||||||
|
];
|
||||||
|
|
||||||
if(!extension_loaded("yaml")){
|
foreach($extensions as $ext => $name){
|
||||||
$logger->critical("Unable to find the YAML extension.");
|
if(!extension_loaded($ext)){
|
||||||
++$errors;
|
$logger->critical("Unable to find the $name ($ext) extension.");
|
||||||
}
|
++$errors;
|
||||||
|
}
|
||||||
if(!extension_loaded("zlib")){
|
|
||||||
$logger->critical("Unable to find the Zlib extension.");
|
|
||||||
++$errors;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!extension_loaded("openssl")){
|
|
||||||
$logger->critical("Unable to find the OpenSSL extension.");
|
|
||||||
++$errors;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($errors > 0){
|
if($errors > 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user