<?	// Preamble
	$pageName = "Downloads";
	$currPage = "files";				// Name of the page, for the menu
	require "parts/preamble.php";		// Load most of document

	function fileDownloadLink ($baseUrl, $extensions)
	{
		$extension = explode (' ', $extensions);
		$count = count ($extension);
		
		for ($i = 0 ; $i < $count ; $i++) {
			if ($i == 0) {
				echo '<STRONG>[ ';
			}
			echo '<A href="' . $baseUrl . '.' . $extension[$i] . '">' . $extension[$i] . '</A> ';
			if (($i+1) < $count) {
				echo '| ';
			} else {
				echo ']</STRONG>';
			}
			
		}
	}

	function fileDownloadLinkGPG ($baseUrl, $extensions, $mode)
	{
		$extension = explode (' ', $extensions);
		$count = count ($extension);

		if ($mode)
			echo '<br>PGP Signatures (to verify archive authenticity) ';
		else
			echo ' PGP ';
		for ($i = 0 ; $i < $count ; $i++) {
			if ($i == 0) {
				echo '<STRONG>[ ';
			}
			echo '<A href="' . $baseUrl . '.' . $extension[$i] . '.asc">' . $extension[$i] . '</A> ';
			if (($i+1) < $count) {
				echo '| ';
			} else {
				echo ']</STRONG>';
			}
			
		}
	}

	function fileUpdated ($file)
	{
		$ftime = filemtime ($file);
		echo " Updated " . gmdate ("d M Y g:ia", $ftime) . " UTC";
	}
?>

<P>QuakeForge and <A href="#quake2">Quake2Forge</A> are always in constant
development.  Our development versions have the latest features, but they change
rapidly as bugs are fixed and features are added.  Stable versions do not change
significantly once released, though we sometimes make revisions of the stable
branch to fix known bugs. <strong>Note: the game data is still non-free; you need either the shareware data (see below) or the registered data.</strong>

<H2>Current Releases</H2>

<H3>QuakeForge</H3>

<P>This is our new development tree (we're back to &quot;quakeforge&quot;),
where we're again in the process of merging Quake and QuakeWorld...but
this time, it's much better. This series will eventually provide the 0.6
versions of QuakeForge.

<P>While almost always in working order, it's under heavy development so
be prepared to encounter some issues <STRONG>(Wear your hard hat!)</STRONG>.
Please check the <a href="documentation.php">docs</a>.
<!--
<P><STRONG>UNIX users:</STRONG> because of the diversity of machines QuakeForge
runs on, we do not provide UNIX binaries. You need to compile QuakeForge
yourself. However, QuakeForge is very easy to compile once you have the
following packages installed:
<UL>
	<LI>GNU <TT>autoconf</TT> 2.50 or later
	<LI>GNU <TT>automake</TT> 1.6 or later
	<LI>GNU <TT>libtool</TT> 1.4 or later
	<LI>GNU <TT>bison</TT>
	<LI>GNU <TT>flex</TT>
	<LI>GNU <TT>make</TT> (BSD <TT>make</TT> doesn't like some constructs used)
</UL>
The following are recommended:
<UL>
	<LI>zlib devel (<em>highly</em> recommended for compressed file and download support)
	<LI>Ogg Vorbis libs (for compressed sound effects support)
	<LI>X11 devel (for X11-based clients: software and OpenGL)
	<LI>SVGAlib (for console-based clients: software and 3dfx)
	<LI>Glide and Mesa, or another OpenGL-compatible library.
</UL>

<P><STRONG>Note:</STRONG> The main reason we have Win32 downloads is that it's
hard to compile the Win32 version, and unless we built Win32 versions ourselves,
very few people on Windows would be able to play. <STRONG>:)</STRONG>
-->
<H4>QuakeForge, Version 0.5.5 (released 2 May 2004)</H4>
<UL>
	<LI>Source code
	<?
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.5", "tar.bz2 tar.gz zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.5", "tar.bz2 tar.gz zip", 1);
	?>
	</LI>
	<LI>Win32 binaries (Made with <A href="http://www.mingw.org/">MinGW</A> (GCC) in Linux)
	<?
		echo '<BR>SDL (sw) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-sdl-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client-sdl-0.5.5-win32", "zip", 0);
		echo '<BR>SDL32 (32bpp sw) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-sdl32-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client32-sdl-0.5.5-win32", "zip", 0);
		echo '<BR>SGL (SDL OpenGL) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-sgl-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client-sgl-0.5.5-win32", "zip", 0);
		echo '<BR>WGL (Native OpenGL) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-wgl-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client-wgl-0.5.5-win32", "zip", 0);
		echo '<BR>Servers (NQ, QW, QW Master) ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-server-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-server-0.5.5-win32", "zip", 0);
		echo '<BR>Tools ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-tools-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-tools-0.5.5-win32", "zip", 0);
		echo '<BR>Libraries and header files (for developers) ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-devel-0.5.5-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-devel-0.5.5-win32", "zip", 0);
	?>
	</LI>
	<?
#	<LI><A href="http://www.debian.org/">Debian GNU/Linux</A> packages for the
#	i386 architecture are available by using APT. Use the following
#	<TT>/etc/apt/sources.list</TT> recipe:
#		<PRE>deb http://www.quakeforge.net/packages/debian unstable contrib non-free</PRE>
#	</LI>
#	<LI>RPM packages are available <A href="/packages/RPM/">here</A>.</LI>
	?>
</UL>
<H4>QuakeForge, Version 0.5.4 (released 18 Jul 2003)</H4>
<UL>
	<LI>Source code
	<?
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.4", "tar.bz2 tar.gz zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.4", "tar.bz2 tar.gz zip", 1);
	?>
	</LI>
	<LI>Win32 binaries (Made with <A href="http://www.mingw.org/">MinGW</A> (GCC) in Linux)
	<?
		echo '<BR>SDL (sw) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-sdl-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client-sdl-0.5.4-win32", "zip", 0);
		echo '<BR>SDL32 (32bpp sw) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-sdl32-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client32-sdl-0.5.4-win32", "zip", 0);
		echo '<BR>SGL (SDL OpenGL) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-sgl-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client-sgl-0.5.4-win32", "zip", 0);
		echo '<BR>WGL (Native OpenGL) client ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-client-wgl-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-client-wgl-0.5.4-win32", "zip", 0);
		echo '<BR>Servers (NQ, QW, QW Master) ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-server-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-server-0.5.4-win32", "zip", 0);
		echo '<BR>Tools ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-tools-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-tools-0.5.4-win32", "zip", 0);
		echo '<BR>Libraries and header files (for developers) ';
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-devel-0.5.4-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-devel-0.5.4-win32", "zip", 0);
	?>
	</LI>
	<LI><A href="http://www.debian.org/">Debian GNU/Linux</A> packages for the
	i386 architecture are available by using APT. Use the following
	<TT>/etc/apt/sources.list</TT> recipe:
		<PRE>deb http://www.quakeforge.net/packages/debian unstable contrib non-free</PRE>
	</LI>
	<LI>Due to an error in the release process, the menu.dat file got missed
	from the debian packages. This will be fixed in 0.5.5. If you want menus,
	you will have to download <TT>menu.dat</TT> for 0.5.4
	<?
		fileDownloadLink("files/menu.0.5.4/menu.dat", "gz");
		fileDownloadLinkGPG("files/menu.0.5.4/menu.dat", "gz", 0);
	?>
	<BR>This goes into your <TT>id1</TT> directory. However, this will override
	the <TT>menu.dat</TT> that will be in 0.5.5 which will cause problems.
	</LI>
	<LI>RPM packages are available <A href="/packages/RPM/">here</A>.</LI>
</UL>
<H4>QuakeForge, Version 0.5.2 (released 01 Oct 2002)</H4>
<UL>
	<LI>Source code
	<?
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.2", "tar.bz2 tar.gz zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.2", "tar.bz2 tar.gz zip", 1);
	?>
	</LI>
	<LI>Win32 binaries (Made with <A href="http://www.mingw.org/">MinGW</A> (GCC) in Linux)
	<?
		fileDownloadLink("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.2-win32", "zip");
		fileDownloadLinkGPG("http://prdownloads.sourceforge.net/quake/quakeforge-0.5.2-win32", "zip", 0);
	?>
	<LI>The packages do not contain the menu file because it would seriously
	screw up future upgrades. This will be fixed in 0.5.3. If you want menus,
	you will have to download <TT>menu.dat</TT> for 0.5.2
	<?
		fileDownloadLink("files/menu.0.5.2/menu.dat", "gz");
		fileDownloadLinkGPG("files/menu.0.5.2/menu.dat", "gz", 0);
	?>
	<BR>This goes into your <TT>id1</TT> directory. However, this will override
	any	<TT>menu.dat</TT> we supply in the future which will possibly cause
	problems.
	</LI>
	</LI>
	<LI>Patch to fix a bug in 0.5.2 that causes <CODE>pak</CODE> to generate broken pak
	files on BSD systems (seen as linking errors in the ruamoko directory).
	<?
		fileDownloadLink("files/Qseek", "diff");
		fileDownloadLinkGPG("files/Qseek", "diff", 0);
	?>
	</LI>
</UL>
<H4>Development snapshots (updated daily)</H4>
<UL>
	<LI>Source code
		<? fileDownloadLink("files/quakeforge-current", "tar.gz tar.bz2 zip"); ?>
		<BR>
		<STRONG>Note:</STRONG> this is an anonymous CVS-ready tree. To update, all you need to do is the following:
		<BLOCKQUOTE>
		<CODE>cvs login&nbsp;&nbsp;&nbsp;&nbsp;</CODE>(only need this once, press enter for the password)<br>
		<CODE>cvs up&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</CODE>(creating <a href="cvsrc.txt">~/.cvsrc</a> is <STRONG>highly</STRONG> recommended)
		</BLOCKQUOTE>
	</LI>
	<LI>Win32 binaries (Made with <A href="http://www.mingw.org/">MinGW</A> (GCC) in Linux)
	<?
		fileUpdated ("files/qf-win32-server.zip");
		echo "		<UL>";
		echo "			<LI>SDL (software) client ";
		fileDownloadLink("files/qf-win32-client-sdl", "zip");
		echo "			</LI>";
		echo "			<LI>SDL-32 (32bpp software) client ";
		fileDownloadLink("files/qf-win32-client-sdl32", "zip");
		echo "			</LI>";
		echo "			<LI>SGL (SDL OpenGL) client ";
		fileDownloadLink("files/qf-win32-client-sgl", "zip");
		echo "			</LI>";
		echo "			<LI>WGL (OpenGL) client ";
		fileDownloadLink("files/qf-win32-client-wgl", "zip");
		echo "			</LI>";
		echo "			<LI>developement stuff (libs, headers etc) ";
		fileDownloadLink("files/qf-win32-devel", "zip");
		echo "			</LI>";
		echo "			<LI>servers ";
		fileDownloadLink("files/qf-win32-server", "zip");
		echo "			</LI>";
		echo "			<LI>tools (qfcc, qfbsp ...) ";
		fileDownloadLink("files/qf-win32-tools", "zip");
		echo "			</LI>";
		echo "		</UL>";
	?>
	</LI>
	<LI>Source code and prebuilt .dat files for various mods.
		<?fileDownloadLink("files/game-source", "tar.gz tar.bz2 zip");?>
		<?fileUpdated ("files/game-source.zip");?><BR>
		Includes qwprogs.dat needed for standard quakeworld) using QuakeForge
		features.  Prebuilt files require current cvs/snapshot server. For
		0.5.4, edit the Makefile to remove --advanced and rebuild. The modified
		frikbot code <strong>requires</strong> current server code.
	</LI>
</UL>

<A name="quake2"></A><H3>Quake2Forge</H3>

<P><STRONG>Are you ready to rail?</STRONG> Good, 'cause we sure are.

<P>Quake2Forge is the Quake II engine, with a blast of yummy QuakeForge
flavor. Undergoing slow but steady development, it aims to be a
portable, stable code base maintaining backward-compatibility with Id
Software's version.

<h4>Version 0.2.1 (released 06/02/03)</h4>
<ul>
<li>Source code
<?fileDownloadLink("http://prdownloads.sourceforge.net/quake/quake2-0.2.1", "tar.gz tar.bz2");?>
</li>
</ul>
<h4>Version 0.2 (released 01/02/03)</h4>
<ul>
<li>Source code
<?fileDownloadLink("http://prdownloads.sourceforge.net/quake/quake2-0.2", "tar.gz tar.bz2");?>
</li>
</ul>
<H4>Version 0.1 (released 17 Sep 2002)</H4>
<UL>
<LI>Source code
<?fileDownloadLink ("http://prdownloads.sourceforge.net/quake/quake2-0.1", "tar.gz tar.bz2");?>
</LI>
</UL>

<P>The latest code can be retreived from our server, with the following commands:
<BLOCKQUOTE>
	<TT>
		cvs -d :pserver:anonymous@cvs.quakeforge.net:/project/cvs login<BR>
		cvs -d :pserver:anonymous@cvs.quakeforge.net:/project/cvs -z3 co quake2
	</TT>
</BLOCKQUOTE>

<P>The anonymous password is empty, just hit Enter when prompted for one.
</P>
<HR>

<H2>Old Releases</H2>

<H3>QuakeForge: Newtree</H3>

<P>Newtree is our sta^H^H^H<EM>dead</EM> tree.  If we work on it again, it will
provide the 0.3 and 0.4 series of QuakeForge releases.  Most activity has moved
to the development tree, though.

<H4>QuakeForge: Newtree, Version 0.3.0 (released 11 Feb 2001)</H4>
<UL>
	<LI>Source code
	<? fileDownloadLink ("http://prdownloads.sourceforge.net/quake/quakeforge-0.3.0", "tar.gz tar.bz2 zip"); ?>
	<LI>Win32 binaries (Made with Microsoft Developer Studio)
	<? fileDownloadLink ("http://prdownloads.sourceforge.net/quake/quakeforge-0.3.0-win32", "zip"); ?>
	<LI>Win32 binaries (Made with <A href="http://www.mingw.org/">MinGW</A> (GCC)) (experimental)
	<? fileDownloadLink ("http://prdownloads.sourceforge.net/quake/quakeforge-0.3.0-mingw-i386", "zip"); ?>
	<LI>Win32 binaries (Made with <A href="http://www.mingw.org/">MinGW</A> (GCC), i686 optimised) (experimental)
	<? fileDownloadLink ("http://prdownloads.sourceforge.net/quake/quakeforge-0.3.0-mingw-i686", "zip"); ?>
</UL>

<H3>QuakeForge: NUQ</H3>

<P>QuakeForge: NUQ (pronounced &quot;Nuke&quot;) is, basically, the Classic
Quake version of Newtree. NUQ is based on the WinQuake engine, but with lots of
enhancements from the merged tree and Newtree. Being the inverse Newtree, there
is no support for QuakeWorld multiplayer protocols.

<P>The NUQ tree is also dead.  Our quakeforge tree has the netquake and
quakeworld code together with the bulk of the code merged, so it's now
redundant.  And since nobody works on it anyway, that's a good thing.

<P>Even though it's dead, NUQ is here anyway. If you want single player, grab
quakeforge-current instead, it's <STRONG>much</STRONG> better.
<UL>
	<LI>Source code
	<? fileDownloadLink("files/nuq-current", "tar.gz tar.bz2 zip"); ?>
</UL>

<H3>QuakeForge Original Tree</H3>

<P>Since current work is based on the <STRONG>new</STRONG> merged tree, the old
merged tree snapshots are no longer being made. You can still get it directly
out of CVS, however.

<H4>QuakeForge, Version <EM>Really Freakin' Old</EM> (released 27 Feb 2000)</H4>

<P>QuakeForge 0.1 is our initial offering to the public. It's not really for
end-users, but served as a proof of concept that the Quake and QuakeWorld
trees are more closely related than initial look would indicate.

<UL>
	<LI>Source code
	<? fileDownloadLink ("http://prdownloads.sourceforge.net/quake/quakeforge-0.1.1", "tar.gz tar.bz2 zip"); ?>
</UL>

<HR>

<H2>Miscellaneous Files</H2>
<UL>
	<LI>QuakeForge pack (currently only has conback.lmp)
		<? fileDownloadLink ("files/pakQF", "pak"); ?>
	</LI>
	<LI>Skybox pack (internally-compressed)
		<? fileDownloadLink ("files/skyboxes", "pak"); ?>
	</LI>
	<LI>Quake Shareware
		<? fileDownloadLink ("files/quake-shareware-1.06", "tar.gz tar.bz2 zip"); ?>
	</LI>
	<LI>Original Quake source release
		<? fileDownloadLink ("files/q1source", "zip"); ?>
	</LI>
	<LI>zlib home page. Needed for compressed pak support.
		<A href="http://www.info-zip.org/pub/infozip/zlib/">http://www.info-zip.org/pub/infozip/zlib/</a>
	</LI>
</UL>
