|
|
|
|
|
|
|
|
|
|
|
|
|
|
$root = preg_replace('/\/[^\/]+$/', '', dirname(__FILE__)); |
|
|
$root = preg_replace('/\/[^\/]+$/', '', dirname(__FILE__)); |
|
|
|
|
|
|
|
|
if ($argv[1] == "-b") |
|
|
|
|
|
|
|
|
if ($argv[1] == "-b") { |
|
|
|
|
|
$argv[1] = "all"; |
|
|
include_once("{$root}/build.php"); |
|
|
include_once("{$root}/build.php"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$platforms = array_filter(scandir("{$root}/src/platform/"), function ($str) { |
|
|
$platforms = array_filter(scandir("{$root}/src/platform/"), function ($str) { |
|
|
return strncmp($str, ".", 1); |
|
|
return strncmp($str, ".", 1); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
foreach ($platforms as $platform) { |
|
|
foreach ($platforms as $platform) { |
|
|
|
|
|
echo "Packaging for: {$platform}\n"; |
|
|
|
|
|
|
|
|
$manifest = JSON_decode(file_get_contents("{$root}/build/{$platform}/manifest.json"), true); |
|
|
$manifest = JSON_decode(file_get_contents("{$root}/build/{$platform}/manifest.json"), true); |
|
|
$version = $manifest["version"]; |
|
|
$version = $manifest["version"]; |
|
|
|
|
|
|