34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
<?php
|
|
|
|
require "config.php";
|
|
require "functions.php";
|
|
require "options.php";
|
|
|
|
$os_guess = guess_os();
|
|
|
|
$latest = json_decode(file_get_contents('releases/latest.json'), true);
|
|
$version = empty($latest["version"]) ? "" : $latest["version"];
|
|
$version_timestamp = empty($latest["timestamp"]) ? -1 : $latest["timestamp"];
|
|
$version_timestamp_in_words = timestamp_in_words($version_timestamp);
|
|
|
|
if (!empty($latest["linux_path"])) {
|
|
$options["linux"]["download_path"] = $latest["linux_path"];
|
|
if (!str_contains($latest["linux_path"], "://")) {
|
|
$options["linux"]["download_path"] = "releases/" . $options["linux"]["download_path"];
|
|
}
|
|
}
|
|
|
|
if (!empty($latest["windows_path"])) {
|
|
$options["windows"]["download_path"] = $latest["windows_path"];
|
|
if (!str_contains($latest["windows_path"], "://")) {
|
|
$options["windows"]["download_path"] = "releases/" . $options["windows"]["download_path"];
|
|
}
|
|
}
|
|
|
|
$display_other_builds = false;
|
|
foreach($options as $os => $target) {
|
|
if (!empty($target["download_path"])) {
|
|
$display_other_builds = true;
|
|
}
|
|
}
|