improving download pages
diff --git a/releng.wtpbuilder/distribution/wtp.site/publish.xml b/releng.wtpbuilder/distribution/wtp.site/publish.xml
index 86a36c3..1cb8ca7 100644
--- a/releng.wtpbuilder/distribution/wtp.site/publish.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/publish.xml
@@ -127,7 +127,7 @@
         <!--  Insert Build Type descriptor  -->
         <antcall target="${buildType}" />
 
-      <antcall target="writeData" />
+        <antcall target="writeData" />
 
         <mkdir dir="${resultDir}/whatisfixed" />
         <echo
@@ -186,7 +186,7 @@
         <!--  Insert Build Type descriptor  -->
         <antcall target="${buildType}" />
 
-    	  <antcall target="writeData" />
+        <antcall target="writeData" />
 
         <mkdir dir="${resultDir}/whatisfixed" />
         <echo
@@ -363,77 +363,138 @@
         </condition>
     </target>
 
-	
-  <target name="writeData">
-  <!--  Insert Build Date  -->
-  <replace
-      file="${resultingIndex}"
-      token="@date@"
-      value="${TODAY}" />
 
-  <!--  Insert Build Name  -->
-  <replace
-      file="${resultingIndex}"
-      token="@build@"
-      value="${buildLabel}" />
+    <target name="writeData">
+        <!--  Insert Build Date  -->
+        <replace
+            file="${resultingIndex}"
+            token="@date@"
+            value="${TODAY}" />
 
-  <replace
-      file="${resultingIndex}"
-      token="@buildBranch@"
-      value="${buildBranch}" />
+        <!--  Insert Build Name  -->
+        <replace
+            file="${resultingIndex}"
+            token="@build@"
+            value="${buildLabel}" />
 
-  <!--  Insert PreRequsites  -->
+        <replace
+            file="${resultingIndex}"
+            token="@buildBranch@"
+            value="${buildBranch}" />
 
-  <replace
-      file="${resultingIndex}"
-      token="@eclipseFile@"
-      value="${eclipse.file.linux-gtk-x86}" />
-  <replace
-      file="${resultingIndex}"
-      token="@eclipseURL@"
-      value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
-  <replace
-      file="${resultingIndex}"
-      token="@eclipseBuildURL@"
-      value="${eclipse.url}" />
-  <replace
-      file="${resultingIndex}"
-      token="@emfFile@"
-      value="${emf.file}" />
-  <replace
-      file="${resultingIndex}"
-      token="@emfURL@"
-      value="${emf.url}/${emf.file}" />
-  <replace
-      file="${resultingIndex}"
-      token="@gefFile@"
-      value="${gef.file}" />
-  <replace
-      file="${resultingIndex}"
-      token="@gefURL@"
-      value="${gef.url}/${gef.file}" />
-  <replace
-      file="${resultingIndex}"
-      token="@jemFile@"
-      value="${jem.file}" />
-  <replace
-      file="${resultingIndex}"
-      token="@jemURL@"
-      value="${jem.url}/${jem.file}" />
-  <!-- 
-      these token/s should not exist in maintenance stream, but 
-      no harm done, so in the interests of keeping builder 
-      streams in sync, we'll leave them here as place hold
-  -->
-  <replace
-      file="${resultingIndex}"
-      token="@dtpFile@"
-      value="${dtp.file}" />
-  <replace
-      file="${resultingIndex}"
-      token="@dtpURL@"
-      value="${dtp.url}/${dtp.file}" />
-</target>
-	
+        <!--  Insert PreRequsites  -->
+
+        <replace
+            file="${resultingIndex}"
+            token="@eclipseFile@"
+            value="${eclipse.file.linux-gtk-x86}" />
+        <replace
+            file="${resultingIndex}"
+            token="@eclipseURL@"
+            value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
+        <replace
+            file="${resultingIndex}"
+            token="@eclipseBuildURL@"
+            value="${eclipse.url}" />
+
+        <replace
+            file="${resultingIndex}"
+            token="@eclipsefilelinux@"
+            value="${eclipse.file.linux-gtk-x86}" />
+        <replace
+            file="${resultingIndex}"
+            token="@eclipsefilewindows@"
+            value="${eclipse.file.win32-win32-x86}" />
+        <replace
+            file="${resultingIndex}"
+            token="@eclipsefilemacos@"
+            value="${eclipse.file.macosx-carbon-ppc}" />
+        <replace
+            file="${resultingIndex}"
+            token="@eclispeBuildHome@"
+            value="${eclipse.build.home}" />
+        <replace
+            file="${resultingIndex}"
+            token="@eclipse.mirror.prefixuri@"
+            value="${eclipse.mirror.prefixuri}" />
+
+
+        <replace
+            file="${resultingIndex}"
+            token="@emfFile@"
+            value="${emf.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@emfURL@"
+            value="${emf.url}/${emf.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@emfBuildHome@"
+            value="${emf.build.home}" />
+        <replace
+            file="${resultingIndex}"
+            token="@emf.mirror.prefixuri@"
+            value="${emf.mirror.prefixuri}" />
+
+
+
+        <replace
+            file="${resultingIndex}"
+            token="@gefFile@"
+            value="${gef.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@gefURL@"
+            value="${gef.url}/${gef.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@gefBuildHome@"
+            value="${gef.build.home}" />
+        <replace
+            file="${resultingIndex}"
+            token="@gef.mirror.prefixuri@"
+            value="${gef.mirror.prefixuri}" />
+
+        <!-- no longer used. Post 1.5.5 -->
+        <replace
+            file="${resultingIndex}"
+            token="@jemFile@"
+            value="${jem.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@jemURL@"
+            value="${jem.url}/${jem.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@jemBuildHome@"
+            value="${jem.build.home}" />
+        <replace
+            file="${resultingIndex}"
+            token="@jem.mirror.prefixuri@"
+            value="${jem.mirror.prefixuri}" />
+        <!-- 
+            these token/s should not exist in maintenance stream, but 
+            do no harm done, so in the interests of keeping builder 
+            streams in sync, we'll leave them here as place hold
+        -->
+        <replace
+            file="${resultingIndex}"
+            token="@dtpFile@"
+            value="${dtp.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@dtpURL@"
+            value="${dtp.url}/${dtp.file}" />
+        <replace
+            file="${resultingIndex}"
+            token="@dtpBuildHome@"
+            value="${dtp.build.home}" />
+        <replace
+            file="${resultingIndex}"
+            token="@dtp.mirror.prefixuri@"
+            value="${dtp.mirror.prefixuri}" />
+
+    </target>
+
 
 </project>
\ No newline at end of file
diff --git a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php
index 9e47298..1dd5ad0 100644
--- a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php
+++ b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php
@@ -149,13 +149,16 @@
     return $platform;
 }
 
-function getPrereqReferenceOrName($prerequrl, $prereqname) {
+
+function getPrereqReferenceOrName($eclipseMirrorScript, $mirrorPrefixuri, $prerequrl, $prereqfilename) {
     // todo: we really only need "if exists" so could make a bit more efficient
     // I tried "file_exists" but is didn't seem to work on my test server
+    // For these pre-reqs, we assume if they exist, they are mirrored. This is true
+    // 99% of the time. 
     if (stream_last_modified($prerequrl)) {
-        $reflink="<a href=\"" . $prerequrl . "\">" . $prereqname . "</a>";
+        $reflink="<a href=\"" . $eclipseMirrorScript . $mirrorPrefixuri . $prereqfilename . "\">" . $prereqfilename . "</a>";
     } else {
-        $reflink=$prereqname;
+        $reflink=$prereqfilename;
     }
     return $reflink;
 }
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
index f45cd10..73df153 100644
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
@@ -7,27 +7,35 @@
 
 <?php
 
-
-$eclipsefilelinux="@eclipsefilelinux@";
-$eclipsefilewindows="@eclipsefilewindows@";
-$eclipsefilemacosx="@eclipsefilemacos@";
 $buildBranch="@buildBranch@";
 $build="@build@";
 $type="@type@";
 $builddate="@date@";
 
+$eclipseMirrorPrefixuri="@eclipse.mirror.prefixuri@";
+$eclipsefilelinux="@eclipsefilelinux@";
+$eclipsefilewindows="@eclipsefilewindows@";
+$eclipsefilemacosx="@eclipsefilemacos@";
+
 $eclipseURL="@eclipseURL@";
 $eclipseFile="@eclipseFile@";
 $eclipseBuildURL="@eclipseBuildURL@";
+$eclipseBuildHome="@eclipseBuildHome@";
 
 $gefURL="@gefURL@";
 $gefFile="@gefFile@";
+$gefMirrorPrefixuri="@gef.mirror.prefixuri@";
+$gefBuildHome="@gefBuildHome@";
 
 $emfURL="@emfURL@";
 $emfFile="@emfFile@";
+$emfMirrorPrefixuri="@emf.mirror.prefixuri@";
+$emfBuildHome="@emfBuildHome@";
 
 $dtpURL="@dtpURL@";
 $dtpFile="@dtpFile@";
+$dtpMirrorPrefixuri="dtp.mirror.prefixuri";
+$dtpBuildHome="@dtpBuildHome@";
 
 include("miscUtil.php");
 
@@ -43,16 +51,16 @@
 $defaultMirrorScript="";
 $defaultWTPMirrorPrefix="./";
 
-$eclipseMirrorScript="http://www.eclipse.org/downloads/download.php?file=/";
+$eclipseMirrorScript="http://www.eclipse.org/downloads/download.php?file=";
 
-$eclipseWTPMirrorPrefix="webtools/committers/drops/$buildBranch/$build/";
+$eclipseWTPMirrorPrefix="/webtools/committers/drops/$buildBranch/$build/";
 
 
 $mirrorScript=$defaultMirrorScript;
 $downloadprefix=$defaultWTPMirrorPrefix;
 
 if ($debugScript) {
-    $testMirrorString=$eclipseMirrorScript . "webtools/downloads/drops/$buildBranch/$build/wtp-sdk-$build.zip";
+    $testMirrorString=$eclipseMirrorScript . "/webtools/downloads/drops/$buildBranch/$build/wtp-sdk-$build.zip";
     $isItMirrored = "false";
     if (isMirrored($testMirrorString)) {
         $isItMirrored = "true";
@@ -191,9 +199,9 @@
 		<td>
 		<table border=0 cellspacing=1 cellpadding=1 width="90%" align="center">
 			<tr valign="top">
-				<td width="10%" /><?php
-
-
+				<td width="10%"></td>
+				<td>Eclipse Platform (Platform, JDT)</td>
+				<?php
 				//customize page depending on user's browser/platform, if we can detect it
 				$usersPlatform = getPlatform();
 				// assume windows by default, since likely most frequent, even for cases where
@@ -205,50 +213,34 @@
 				    $recommendedFile=$eclipsefilemacosx;
 				}
 				?>
-				
-				
-				<td>Eclipse Platform (Platform, JDT)</td>
 				<td align="right"><?php
-				$prerequrl="$eclipseURL";
-				$prereqname="$eclipseFile";
-				echo getPrereqReferenceOrName($prerequrl, $prereqname);
-				?> or <a href=$eclipseBuildURL>compatible</a></td>
+				echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $eclipseURL, $recommendedFile);
+				?> or <a href="$eclipseBuildURL">appropriate platform</a> or <a
+					href=$eclipseBuildHome>equivalent</a></td>
 			</tr>
 			<tr valign="top">
-				<td width="10%" />
-				
-				
+				<td width="10%"></td>
 				<td>Eclipse Modeling Framework (EMF, XSD InfoSet, SDO)</td>
 				<td align="right"><?php
-				$prerequrl="$emfURL";
-				$prereqname="$emfFile";
-				echo getPrereqReferenceOrName($prerequrl, $prereqname);
-				?></td>
+				echo getPrereqReferenceOrName($eclipseMirrorScript, $gefMirrorPrefixuri, $emfURL, $emfFile);
+				?> or <a href=$emfBuildHome>equivalent</a></td>
 			</tr>
 
 			<tr valign="top">
-				<td width="10%" />
-				
-				
+				<td width="10%"></td>
 				<td>Graphical Editing Framework (GEF)</td>
 				<td align="right"><?php
-				$prerequrl="$gefURL";
-				$prereqname="$gefFile";
-				echo getPrereqReferenceOrName($prerequrl, $prereqname);
-				?></td>
+				echo getPrereqReferenceOrName($eclipseMirrorScript, $gefMirrorPrefixuri, $gefURL, $gefFile);
+				?> or <a href=$geffBuildHome>equivalent</a></td>
 			</tr>
 
-
 			<tr valign="top">
-				<td width="10%" />
-				
-				
-				<td>Data Tools Platform (DTP)</td>
+				<td width="10%"></td>
+				<td>Data Tools Platform (DTP) (required only for EJB or JPT
+				development)</td>
 				<td align="right"><?php
-				$prerequrl="$dtpURL";
-				$prereqname="$dtpFile";
-				echo getPrereqReferenceOrName($prerequrl, $prereqname);
-				?></td>
+				echo getPrereqReferenceOrName($eclipseMirrorScript, $dtpMirrorPrefixuri, $dtpURL, $dtpFile);
+				?> or <a href=$dtpBuildHome>equivalent</a></td>
 			</tr>
 
 		</table>