blob: 165c0b52033e4e0357b50651a86cc0cfe2f91f03 [file] [log] [blame]
<?php
$deps = array(
"eclipse" => "<a href=\"http://www.eclipse.org/eclipse/\">Eclipse</a>",
);
require_once($_SERVER["DOCUMENT_ROOT"] . "/gef/downloads/downloads-scripts.php");
if (is_array($projects))
{
$projectArray = getProjectArray($projects, $extraprojects, $nodownloads, $PR);
$proj = "/" . (isset($_GET["project"]) && preg_match("/^(?:" . join("|", $projects) . ")$/", $_GET["project"]) ? $_GET["project"] : ""); # default
}
else
{
$proj = "";
}
if ((!$proj || $proj == "/") && isset($defaultProj)) { $proj = $defaultProj; }
$projct = preg_replace("#^/#", "", $proj);
if (strstr($PR, "/") !== false)
{
list($topProj, $parentProj) = explode("/", $PR); # modeling, emf
}
else
{
list($topProj, $parentProj) = array("NONE", $PR); # NONE, gef
}
if (isset($projct) && isset($hasmoved) && is_array($hasmoved) && array_key_exists($projct,$hasmoved))
{
header("Location: http://www.eclipse.org/modeling/" . $hasmoved[$projct] . "/downloads/?" . $_SERVER["QUERY_STRING"]);
exit;
}
$numzips = isset($extraZips) ? 0 - sizeof($extraZips) : 0; // if extra zips (new zips added later), reduce the "required" count when testing a build
if (isset($dls[$proj]) && is_array($dls[$proj]))
{
foreach (array_keys($dls[$proj]) as $z)
{
$numzips += sizeof($dls[$proj][$z]);
}
}
# store an array of paths to hide
$hiddenBuilds = is_readable($_SERVER["DOCUMENT_ROOT"] . "/$PR/downloads/hidden.txt") ? file($_SERVER["DOCUMENT_ROOT"] . "/$PR/downloads/hidden.txt") : array();
// include extras-$proj.php or extras-$PR.php
$files = array ($_SERVER["DOCUMENT_ROOT"] . "/$PR/downloads/extras-" . $projct . ".php", $_SERVER["DOCUMENT_ROOT"] . "/$PR/downloads/extras-" . $PR . ".php");
foreach ($files as $file)
{
if (file_exists($file))
{
include_once($file);
break;
}
}
$hadLoadDirSimpleError = 1; //have we echoed the loadDirSimple() error msg yet? if 1, omit error; if 0, echo at most 1 error
$sortBy = ""; // no longer supported
$showAll = (isset($_GET["showAll"]) && preg_match("/^(1)$/", $_GET["showAll"], $regs) ? $regs[1] : "0");
$showMax = (isset($_GET["showMax"]) && preg_match("/^(\d+)$/", $_GET["showMax"], $regs) ? $regs[1] : ($sortBy == "date" ? "10" : "5"));
$showBuildResults = !isset($_GET["light"]) && !isset($_GET["nostatus"]); // suppress display of status to render page faster
$doRefreshPage = false;
$GEF_DROPS_DIR = getPWD("$projct/downloads/drops"); // see scripts.php
$GEF4_DROPS_DIR = getPWD("$projct/gef4/downloads/drops"); // see scripts.php
$isTools = isset($_GET["tools"]);
$isTech = isset($_GET["tech"]);
if (preg_match("#/(tools|technology)/#", $GEF_DROPS_DIR, $m))
{
$isTools = $m[1] == "tools";
$isTech = $m[1] == "technology";
}
if ($isBuildServer || false != strpos($_SERVER["HTTP_HOST"], "fullmoon")) //internal
{
$downloadScript = "../../../";
$downloadPre = "../../..";
}
else // all others
{
$downloadScript = getdownloadScript();
$downloadPre = "";
}
print "<div id=\"midcolumn\">\n";
print "<h2>Update-Sites and SDK archives</h2>\n";
print "<p>This page provides an update-site archive for each build of GEF and GEF4, as well as different SDK archives for each build of Draw2d, GEF (MVC), and Zest. The artifacts bundled in the respective archives are also provided via our (online) update-sites listed on the <a href=\"https://projects.eclipse.org/projects/tools.gef/downloads\">dashboard</a>.</p><p>Please note that old-style builds (common modeling build infrastructure) ship with build details (test results, build notes), while new-style builds (Hudson/Tycho) only contain a link to the Hudson build job that was promoted (so detailed information can be searched and found there). Futher, if still needed, the old version of the download page can be found <a href=\"index_old.php\">here</a>.</p>";
// collect which branches (3.9.101, 3.10.0, etc.) of GEF and GEF4 exist in the drop dirs
$branches = array_unique(array_merge(loadDirSimple($GEF_DROPS_DIR, ".*", "d"), loadDirSimple($GEF4_DROPS_DIR, ".*", "d")));
rsort($branches);
// $buildtypes is configured in _projectCommon.php to be R, S, I
$buildTypes = getBuildTypes($branches, $buildtypes);
$builds = getBuildsFromDirs($GEF_DROPS_DIR, "GEF");
reset($builds);
print "<div id=\"midcolumn\">\n";
if (sizeof($builds) == 0)
{
print "<h2>Builds</h2>\n";
print "<ul>\n";
if (is_array($projectArray) && !in_array($projct, $projectArray))
{
print "<li><i><b>Sorry!</b></i> There are no builds yet available for this component.</li>";
}
else
{
print "<li><i><b>Error!</b></i> No builds found on this server!</li>";
}
print "</ul>\n";
}
$c = 0;
foreach ($builds as $branch => $types)
{
foreach ($types as $type => $IDs)
{
print "<h3>" . $buildTypes[$branch][$type] . "s</h3>\n";
print "<ul>\n";
$i = 0;
foreach ($IDs as $ID)
{
print outputBuild($GEF_DROPS_DIR, $branch, $ID, $c++);
$i++;
if (!$showAll && $i == $showMax && $i < sizeof($IDs))
{
print showToggle($showAll, $showMax, $sortBy, sizeof($IDs));
break;
}
else if ($showAll && sizeof($IDs) > $showMax && $i == sizeof($IDs))
{
print showToggle($showAll, $showMax, $sortBy, sizeof($IDs));
}
}
print "</ul>\n";
}
}
if ($doRefreshPage)
{ ?>
<script type="text/javascript">
setTimeout('document.location.reload()', 60*1000); // refresh every 60 seconds if there's a build in progress
</script>
<?php }
if (isset($oldrels) && is_array($oldrels) && sizeof($oldrels) > 0)
{
showArchived($oldrels);
}
print "</div>\n";
?>