2004-11-15 01:58:30 +00:00
|
|
|
<?php
|
|
|
|
|
2007-03-04 02:30:48 +00:00
|
|
|
// NOTE: the core client fetches download.php?xml=1 every so often;
|
|
|
|
// don't break this!!!
|
|
|
|
|
2004-11-15 01:58:30 +00:00
|
|
|
require_once("docutil.php");
|
2005-05-20 17:42:06 +00:00
|
|
|
require_once("versions.inc");
|
2006-08-03 17:31:40 +00:00
|
|
|
require_once("../html/inc/translation.inc");
|
2005-03-22 22:50:33 +00:00
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
$client_info = $_SERVER['HTTP_USER_AGENT'];
|
2005-05-20 17:42:06 +00:00
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
function latest_version($p) {
|
|
|
|
foreach ($p['versions'] as $i=>$v) {
|
|
|
|
if (!$dev && is_dev($v)) continue;
|
|
|
|
return $v;
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
2007-05-01 21:21:13 +00:00
|
|
|
foreach ($p['versions'] as $i=>$v) {
|
|
|
|
return $v;
|
|
|
|
}
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
2004-11-15 01:58:30 +00:00
|
|
|
|
2008-12-16 21:33:33 +00:00
|
|
|
// show a download link as a button or table row
|
|
|
|
//
|
|
|
|
function download_link($pname, $button=false) {
|
2006-08-02 21:33:19 +00:00
|
|
|
global $platforms;
|
2005-12-09 07:12:56 +00:00
|
|
|
global $url_base;
|
2006-08-02 21:33:19 +00:00
|
|
|
$p = $platforms[$pname];
|
|
|
|
$v = latest_version($p);
|
|
|
|
$file = $v['file'];
|
|
|
|
$long_name = $p['name'];
|
|
|
|
$num = $v['num'];
|
2005-05-20 17:42:06 +00:00
|
|
|
$path = "dl/$file";
|
2005-12-09 07:12:56 +00:00
|
|
|
$url = $url_base.$file;
|
2008-08-16 20:59:53 +00:00
|
|
|
$dlink = "<a href=\"$url\">$file</a>";
|
2005-05-20 17:42:06 +00:00
|
|
|
$s = number_format(filesize($path)/1000000, 2);
|
2005-03-05 23:12:31 +00:00
|
|
|
|
2008-12-16 21:33:33 +00:00
|
|
|
if ($button) {
|
|
|
|
echo "
|
|
|
|
<table cellpadding=10><tr><td class=heading>
|
|
|
|
<a href=\"$url\"><font size=4><u>".tra("Download BOINC")."</u></font></a>
|
|
|
|
<br>".
|
|
|
|
sprintf(tra("%s for %s (%s MB)"), $num, $long_name, $s )."
|
|
|
|
</td></tr> </table>
|
|
|
|
";
|
|
|
|
if ($pname == 'linux'||$pname == 'linuxx64') {
|
2012-06-05 20:13:19 +00:00
|
|
|
echo "<p>", linux_info();
|
2008-12-16 21:33:33 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo "<tr>
|
|
|
|
<td class=rowlineleft>$long_name</td>
|
|
|
|
<td class=rowline> $num</td>
|
|
|
|
<td class=rowlineright><a href=$url>Download</a> ($s MB)</td>
|
|
|
|
</tr>
|
|
|
|
";
|
2005-10-23 07:19:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-03 16:39:57 +00:00
|
|
|
$apps = array(
|
|
|
|
array('classic.jpg', 180, 143),
|
|
|
|
array('cpdn_200.jpg', 200, 147),
|
|
|
|
array('eah_200.png', 200, 150),
|
2006-08-04 21:39:03 +00:00
|
|
|
array('rosetta_at_home.jpg', 200, 150),
|
|
|
|
array('qah.200x150.png', 200, 150),
|
2006-08-03 16:39:57 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
function show_pictures() {
|
|
|
|
global $apps;
|
|
|
|
shuffle($apps);
|
|
|
|
$a0 = $apps[0];
|
|
|
|
$a1 = $apps[1];
|
|
|
|
$f0 = $a0[0];
|
|
|
|
$f1 = $a1[0];
|
|
|
|
echo "
|
|
|
|
<div style=\"max-height: 300px\">
|
2008-08-16 20:59:53 +00:00
|
|
|
<img src=\"images/mgrwork.png\" alt=\"BOINC manager\"><br>
|
2006-08-03 16:39:57 +00:00
|
|
|
<div style=\"position:relative; top:-80px; left:30px\">
|
2008-08-16 20:59:53 +00:00
|
|
|
<img src=\"images/$f0\" alt=\"BOINC project\"><br>
|
2006-08-03 16:39:57 +00:00
|
|
|
</div>
|
|
|
|
<div style=\"position:relative; top:-160px; left:70px\">
|
2008-08-16 20:59:53 +00:00
|
|
|
<img src=\"images/$f1\" alt=\"BOINC project\"><br>
|
2006-08-03 16:39:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
function show_download($pname) {
|
|
|
|
echo "
|
2006-08-03 16:39:57 +00:00
|
|
|
<table cellpadding=10><tr><td valign=top>
|
2009-12-03 19:09:45 +00:00
|
|
|
".tra("BOINC is a program that lets you donate your idle computer time to science projects like SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others. <p> After installing BOINC on your computer, you can connect it to as many of these projects as you like.")
|
|
|
|
."<p>"
|
|
|
|
.tra("You may run this software on a computer only if you own the computer or have the permission of its owner.").
|
2008-05-20 00:11:28 +00:00
|
|
|
"<p>"
|
2006-08-03 17:31:40 +00:00
|
|
|
;
|
2005-10-23 07:19:03 +00:00
|
|
|
if ($pname) {
|
2008-12-16 21:33:33 +00:00
|
|
|
download_link($pname, true);
|
2005-10-23 07:19:03 +00:00
|
|
|
} else {
|
2008-12-16 21:33:33 +00:00
|
|
|
list_start();
|
|
|
|
list_heading_array(array(
|
|
|
|
'Computer type',
|
|
|
|
'Current version ',
|
|
|
|
'Size'
|
|
|
|
));
|
|
|
|
download_link('win');
|
|
|
|
download_link('winx64');
|
|
|
|
download_link('mac');
|
2012-04-13 01:12:27 +00:00
|
|
|
download_link('macppc');
|
2008-12-16 21:33:33 +00:00
|
|
|
download_link('linux');
|
|
|
|
download_link('linuxx64');
|
|
|
|
download_link('linuxcompat');
|
|
|
|
end_table();
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
|
|
|
echo "
|
|
|
|
<p>
|
2012-07-23 21:53:09 +00:00
|
|
|
After downloading BOINC you must <b>install</b> it:
|
2012-07-22 06:18:24 +00:00
|
|
|
<ul>
|
2012-07-23 21:53:09 +00:00
|
|
|
<li> Save the file to disk.
|
|
|
|
<li> Double-click on the file icon.
|
2012-07-22 06:18:24 +00:00
|
|
|
</ul>
|
|
|
|
<p>
|
2008-12-16 21:33:33 +00:00
|
|
|
<center>
|
2008-08-16 20:59:53 +00:00
|
|
|
<a href=\"wiki/System_requirements\"><span class=nobr>".tra("System requirements")."</span></a>
|
2012-07-22 06:18:24 +00:00
|
|
|
· <a href=\"wiki/Release_Notes\"><span class=nobr>".tra("Release notes")."</span></a>
|
|
|
|
· <a href=\"wiki/BOINC_Help\"><span class=nobr>".tra("Help")."</span></a>
|
|
|
|
· <a href=download_all.php><span class=nobr>".tra("All versions")."</span></a>
|
|
|
|
· <a href=\"trac/wiki/VersionHistory\">".tra("Version history")."</a>
|
|
|
|
· <a href=http://boinc.berkeley.edu/wiki/GPU_computing>".tra("GPU computing")."</a>
|
2008-12-16 21:33:33 +00:00
|
|
|
</center>
|
2012-07-22 06:18:24 +00:00
|
|
|
</td>
|
|
|
|
<td valign=top>
|
2006-08-03 16:39:57 +00:00
|
|
|
";
|
|
|
|
show_pictures();
|
|
|
|
echo "
|
|
|
|
</td>
|
|
|
|
</tr></table>
|
2005-05-20 17:42:06 +00:00
|
|
|
";
|
2005-03-22 22:50:33 +00:00
|
|
|
}
|
2005-05-20 17:42:06 +00:00
|
|
|
|
2010-09-27 20:34:47 +00:00
|
|
|
if (get_str2('xml')) {
|
2006-08-03 04:07:18 +00:00
|
|
|
$args = strstr($_SERVER['REQUEST_URI'], '?');
|
|
|
|
Header("Location: download_all.php$args");
|
2006-08-02 21:33:19 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2008-05-20 00:11:28 +00:00
|
|
|
page_head(tra("BOINC: compute for science"));
|
2006-08-02 21:33:19 +00:00
|
|
|
|
2010-09-27 20:34:47 +00:00
|
|
|
if (get_str2('all_platforms')) {
|
2006-08-02 21:33:19 +00:00
|
|
|
show_download(null);
|
|
|
|
} else if (strstr($client_info, 'Windows')) {
|
2007-06-19 16:00:59 +00:00
|
|
|
if (strstr($client_info, 'Win64')||strstr($client_info, 'WOW64')) {
|
2007-05-01 21:21:13 +00:00
|
|
|
show_download('winx64');
|
|
|
|
} else {
|
|
|
|
show_download('win');
|
|
|
|
}
|
2006-08-02 21:33:19 +00:00
|
|
|
} else if (strstr($client_info, 'Mac')) {
|
2012-04-13 01:12:27 +00:00
|
|
|
if (strstr($client_info, 'PPC Mac OS X')) {
|
|
|
|
show_download('macppc');
|
|
|
|
} else {
|
|
|
|
show_download('mac');
|
|
|
|
}
|
2013-02-14 04:10:55 +00:00
|
|
|
} else if (strstr($client_info, 'Linux') && strstr($client_info, 'Android')) {
|
|
|
|
// Check for Android before Linux, since Android contains the Linux kernel and the
|
|
|
|
// web browser user agent string list Linux too.
|
2013-02-14 04:02:26 +00:00
|
|
|
show_download('android');
|
2013-02-14 04:10:55 +00:00
|
|
|
} else if (strstr($client_info, 'Linux')) {
|
|
|
|
if (strstr($client_info, 'x86_64')) {
|
|
|
|
show_download('linuxx64');
|
|
|
|
} else {
|
|
|
|
show_download('linux');
|
|
|
|
}
|
2006-08-02 21:33:19 +00:00
|
|
|
} else {
|
|
|
|
show_download(null);
|
|
|
|
}
|
2008-01-15 18:43:00 +00:00
|
|
|
|
2006-08-08 20:32:37 +00:00
|
|
|
page_tail(true);
|
2006-08-02 21:33:19 +00:00
|
|
|
|
2004-11-15 01:58:30 +00:00
|
|
|
?>
|