Make Berry Dash Launcher work again (not supported still)

This commit is contained in:
2026-02-16 22:07:45 -07:00
parent 65d860e6cb
commit 876b1bce08
2 changed files with 19 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
<?php <?php
require __DIR__ . '/../../incl/util.php'; require __DIR__ . '/../../incl/util.php';
setPlainHeader(); setPlainHeader();
echo "-1"; echo "1.1.0";

View File

@@ -0,0 +1,18 @@
<?php
error_reporting(E_ALL); // Report all errors, warnings, and notices
ini_set('display_errors', 1); // Display errors in the browser
ini_set('display_startup_errors', 1);
require __DIR__ . '/../../incl/util.php';
header("Content-Type: application/json");
$conn = newConnection(0);
$stmt = $conn->prepare("SELECT * FROM launcherversionmanifest WHERE hidden = 0 AND game = 1 ORDER BY id DESC");
$stmt->execute();
$result_versions = $stmt->get_result();
$versions = array_map(fn($row) => ['id' => $row['id'], 'version' => $row['downloadUrlVersion'], 'displayName' => $row['downloadUrlVersion'], 'platforms' => json_decode($row['platforms']), 'downloadUrls' => json_decode(str_replace("%version%", $row["downloadUrlVersion"], $row["downloadUrls"])), 'executables' => json_decode($row['executables'])], $result_versions->fetch_all(MYSQLI_ASSOC));
echo json_encode($versions);
$conn->close();