blob: cc8ad1708a3acdcce915d8187b0688a21453405c [file] [log] [blame]
<?php
require_once ($_SERVER ['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once ($_SERVER ['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php");
require_once ($_SERVER ['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php");
$App = new App ();
$Nav = new Nav ();
$Menu = new Menu ();
include ($App->getProjectCommon ()); // All on the same line to unclutter the user's desktop'
/**
* *****************************************************************************
* Copyright (c) 2010
* All rights reserved.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
* *****************************************************************************
*/
$pageTitle = "GEF Downloads";
require_once ($_SERVER ['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once ($_SERVER ['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php");
require_once ($_SERVER ['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php");
$App = new App ();
$Nav = new Nav ();
$Menu = new Menu ();
include ($App->getProjectCommon ());
ob_start ();
$PR = "gef";
$debug = (isset ( $_GET ["debug"] ) && preg_match ( "/^\d+$/", $_GET ["debug"] ) ? $_GET ["debug"] : - 1);
$buildtypes = array (
"R" => "Release",
"S" => "Milestone",
"I" => "Integration"
);
$gef4_dls = array (
"GEF4 Common, Geometry, FX, MVC, Graph, Layout, Zest, DOT, Cloudio" => array (
"<acronym title=\"Click to download archived All-In-One p2 Update Site\"><img alt=\"Click to download archived All-In-One p2 Update Site\" src=\"/modeling/images/dl-icon-update-zip.gif\"/> <b style=\"color:green\">GEF4 Update Site</b></acronym>" => "Update"
)
);
$gef_dls = array (
"Draw2D, GEF (MVC) 3.x and Zest 1.x" => array (
"<acronym title=\"Click to download archived All-In-One p2 Update Site\"><img alt=\"Click to download archived All-In-One p2 Update Site\" src=\"/modeling/images/dl-icon-update-zip.gif\"/> <b style=\"color:green\">GEF Update Site</b></acronym>" => "Update",
"<img alt=\"All-In-One SDK Zip\" src=\"/modeling/images/dl-icon-aio-sdk.gif\"/> <b>GEF ALL SDK</b> (Runtime, Source, Examples)" => "ALL"
),
"Draw2D 3.x" => array (
"SDK (Runtime, Source)" => "draw2d-sdk", // GEF-draw2d-sdk-*.zip
"Runtime" => "draw2d"
),
"GEF (MVC) 3.x + Draw2D 3.x" => array (
"SDK (Runtime, Source)" => "SDK",
"Runtime" => "runtime"
),
"GEF (MVC) 3.x" => array (
"Examples" => "examples"
),
"Zest 1.x + Draw2D 3.x" => array (
"SDK (Runtime, Source)" => "zest-sdk",
"Runtime" => "zest"
)
);
/* zips that are allowed to be absent from the downloads page (eg., new ones added mid-stream) */
$extraZips = array (
"GEF-zest",
"GEF-zest-sdk",
"GEF-draw2d",
"GEF-draw2d-sdk",
"GEF-examples",
"GEF-SDK",
"GEF-runtime",
"GEF-ALL"
);
require_once ($_SERVER ["DOCUMENT_ROOT"] . "/gef/downloads/downloads-scripts.php");
$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"] . "/gef/downloads/hidden.txt" ) ? file ( $_SERVER ["DOCUMENT_ROOT"] . "/gef/downloads/hidden.txt" ) : array ();
// include extras-$PR.php
$files = array (
$_SERVER ["DOCUMENT_ROOT"] . "/gef/downloads/extras-gef.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
$regs = null;
$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] : "5");
$GEF_DROPS_DIR = getPWD ( "downloads/drops" ); // see scripts.php
$GEF4_DROPS_DIR = getPWD ( "gef4/downloads/drops" ); // see scripts.php
$downloadScript = getDownloadScript ();
print "<div id=\"midcolumn\">\n";
print "<h2>$pageTitle</h2>\n";
print "<p>All downloads are provided under the terms and conditions of the <a href=\"/legal/epl/notice.php\">Eclipse Foundation Software User Agreement</a> unless otherwise specified.</p>";
print "<h3>Online Update-Sites</h3>";
print "<p>All deployed GEF and GEF4 artifacts can be consumed from our releases, milestones, integration, and CI <a href=\"https://projects.eclipse.org/projects/tools.gef/downloads\">update-sites</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" ) ) );
sort ( $branches );
// $buildtypes is configured in _projectCommon.php to be R, S, I, here statically all build types are created for each branch
$buildTypes = getBuildTypes ( $branches, $buildtypes );
$gefBuilds = getBuildsFromDirs ( $GEF_DROPS_DIR );
$gef4Builds = getBuildsFromDirs ( $GEF4_DROPS_DIR );
print "<h3>Update-Site Archives</h3>";
print "<p>The update-sites provided by individual GEF and GEF4 release, milestone, and integration builds can also be downloaded as .zip archives for offline-installation below.</p>";
print "<p><small>For Draw2d 3.x, GEF (MVC) 3x., and Zest 1.x, there are also SDK archives in runnable form. Please note that we will discontinue support for these SDK archives after Mars SR1. We will then only provide update-site archives for GEF and GEF4 (see <a href=\"https://bugs.eclipse.org/bugs/show_bug.cgi?id=470240\">bug #470240</a> for details).</small></p>";
print "<div id=\"midcolumn\">\n";
if (sizeof ( $gefBuilds ) == 0 || sizeof ( $gef4Builds ) == 0) {
print "<h4>Builds</h4>\n";
print "<ul>\n";
print "<li><i><b>Error!</b></i> No builds found on this server!</li>";
print "</ul>\n";
}
$c = 0;
foreach ( $buildTypes as $branch => $types ) {
foreach ( $types as $type => $label ) {
// Check if a GEF or GEF4 build exists
if ((array_key_exists ( $branch, $gefBuilds ) && array_key_exists ( $type, $gefBuilds [$branch] )) || (array_key_exists ( $branch, $gef4Builds ) && array_key_exists ( $type, $gef4Builds [$branch] ))) {
print "<h4>" . $label . "s</h4>\n";
print "<ul>\n";
// output GEF4 builds
if (array_key_exists ( $branch, $gefBuilds ) && array_key_exists ( $type, $gefBuilds [$branch] )) {
showBuilds ( "gef/gef4", $GEF4_DROPS_DIR, $branch, $gef4Builds [$branch] [$type], "GEF4 ", "GEF4", $gef4_dls, $c );
}
// output GEF builds
if (array_key_exists ( $branch, $gefBuilds ) && array_key_exists ( $type, $gefBuilds [$branch] )) {
showBuilds ( "gef", $GEF_DROPS_DIR, $branch, $gefBuilds [$branch] [$type], "GEF ", "GEF", $gef_dls, $c );
}
print "</ul>\n";
}
}
}
// output archived GEF builds
if (isset ( $old_gef_rels ) && is_array ( $old_gef_rels ) && sizeof ( $old_gef_rels ) > 0) {
showArchived ( "gef", $old_gef_rels );
}
print "<h3>Translations</h3>";
print "<p>Translations packages can be downloaded from the <a href=\"http://www.eclipse.org/babel/downloads.php\">Babel project downloads page</a> (from GEF 3.4 onwards). Older translation packages (for GEF 3.0 - 3.2) can still be found <a href=\"translations/translation.html\">here</a></p>";
print "</div>\n";
$html = ob_get_contents ();
ob_end_clean ();
$pageTitle = "GEF Update-Site and SDK Archive Downloads";
$pageKeywords = ""; // TODO: add something here
// Generate the web page
$App->AddExtraHtmlHeader ( '<script src="/gef/downloads/downloads.js" type="text/javascript"></script>' . "\n" ); // ie doesn't understand self closing script tags, and won't even try to render the page if you use one
$App->generatePage ( $theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html );
// Generate the web page
$App->generatePage ( $theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html );
?>