<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Exploits of Plouj &#187; descent</title>
	<atom:link href="http://www.plouj.com/blog/tag/descent/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.plouj.com/blog</link>
	<description>A blog by Michael Ploujnikov</description>
	<lastBuildDate>Tue, 01 Feb 2011 13:55:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HOWTO build DXX-Rebirth for Windows with MSYS/MinGW</title>
		<link>http://www.plouj.com/blog/2009/03/07/howto-build-dxx-rebirth-for-windows-with-msysmingw/</link>
		<comments>http://www.plouj.com/blog/2009/03/07/howto-build-dxx-rebirth-for-windows-with-msysmingw/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:07:32 +0000</pubDate>
		<dc:creator>plouj</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[descent]]></category>
		<category><![CDATA[dxx-rebirth]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[mingw]]></category>
		<category><![CDATA[msys]]></category>
		<category><![CDATA[physfs]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scons]]></category>
		<category><![CDATA[sdl]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.plouj.com/blog/?p=243</guid>
		<description><![CDATA[Introduction In this post I&#8217;ll document the steps I had to take to build DXX-Rebirth (a modernized Descent game engine) for Windows using MSYS and MinGW. MinGW, MSYS From  Pantokrator&#8217;s blog: install MinGW choose a lowercase install path: c:\mingw choose to download and install current version enable g++ (for physfs) install MSYS install msysDTK SDL [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post I&#8217;ll document the steps I had to take to build <a href="http://www.dxx-rebirth.com/">DXX-Rebirth</a> (a modernized <a href="http://en.wikipedia.org/wiki/Descent_(computer_game)">Descent</a> game engine) for Windows using <a href="http://www.mingw.org/wiki/msys">MSYS</a> and <a href="http://www.mingw.org/">MinGW</a>.</p>
<h2>MinGW, MSYS</h2>
<p>From  <a href="http://blog.pantokrator.net/2006/08/08/setting-up-msysmingw-build-system-for-compiling-sdlopengl-applications/">Pantokrator&#8217;s blog</a>:</p>
<ul>
<li>install <a href="http://prdownloads.sf.net/mingw/MinGW-5.0.2.exe">MinGW</a>
<ul>
<li>choose a lowercase install path: c:\mingw</li>
<li>choose to download and install current version</li>
<li>enable g++ (for physfs)</li>
</ul>
</li>
<li>install <a href="http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe">MSYS</a></li>
<li>install <a href="http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe">msysDTK</a></li>
</ul>
<h2>SDL and SDL_mixer</h2>
<p>Also from  <a href="http://blog.pantokrator.net/2006/08/08/setting-up-msysmingw-build-system-for-compiling-sdlopengl-applications/">Pantokrator&#8217;s blog</a>:</p>
<ul>
<li>download the <a href="http://www.libsdl.org/release/SDL-1.2.13.tar.gz">SDL</a> source</li>
<li>in the MSYS shell, compile it with</li>
</ul>
<pre>./configure --prefix=/mingw &amp;&amp; make &amp;&amp; make install</pre>
<ul>
<li>download the <a href="http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.8.tar.gz">SDL_mixer</a> source and in a MSYS shell, build it with the same command:</li>
</ul>
<pre>./configure --prefix=/mingw &amp;&amp; make &amp;&amp; make install</pre>
<h2>PhysicsFS</h2>
<ul>
<li>Download the <a href="http://icculus.org/physfs/downloads/physfs-1.1.0.tar.gz">physfs 1.1.0</a> source.</li>
</ul>
<ul>
<li>Compile with the same command again:</li>
</ul>
<pre>./configure --prefix=/mingw &amp;&amp; make &amp;&amp; make install</pre>
<h2>SCons and Python</h2>
<p>From <a href="http://globulation2.org/wiki/Mingw_compilation">Globulation2 MinGW instructions</a>:</p>
<ul>
<li> install <a href="http://www.python.org/ftp/python/2.6/python-2.6.msi">Python 2.6</a></li>
<li> install <a href="http://prdownloads.sourceforge.net/scons/scons-1.1.0.win32.exe">SCons</a></li>
<li> add:</li>
</ul>
<pre>PATH=$PATH:/c/Python26:/c/Python26/Scripts</pre>
<ul>
<li> to the end of <em>/etc/profile</em> in MSYS so that SCons can run from the MSYS shell.</li>
</ul>
<h2>Subversion</h2>
<ul>
<li>install <a href="http://prdownloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.5.9.15518-win32-svn-1.5.6.msi">TortoiseSVN</a></li>
</ul>
<h2>DXX-Rebirth</h2>
<ul>
<li>checkout DXX-Rebirth from <em>https://dxx-rebirth.svn.sourceforge.net/svnroot/dxx-rebirth</em></li>
<li>change the SConstruct script to call sdl-config as &#8216;sh sdl-config &#8216;:</li>
</ul>
<pre>...
Flags and stuff for all platforms...
env.ParseConfig('sh sdl-config --cflags')
env.ParseConfig('sh sdl-config --libs')
env.Append(CPPFLAGS = ['-Wall', '-funsigned-char'])
...</pre>
<ul>
<li>finally, in the MSYS shell, built with:</li>
</ul>
<pre>scons sdlmixer=1</pre>
<h2>Final Remarks</h2>
<p>I had trouble with the latest version of PhysicsFS (1.1.1) because it uses cmake. For some reason it failing to find some prerequisites in MSYS. I also had trouble with version 1.0.1 of PhysicsFS (this is the version the official <a style="font-weight: normal;" href="http://downloads.sourceforge.net/dxx-rebirth/d1x-rebirth_v0.55.1-win.zip">d1x-rebirth_v0.55.1-win.zip</a> is built with) because the built failed with the following error:</p>
<pre>warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000
...
undefined reference to WinMain@16</pre>
<p>If you notice any problems or mistakes in this post, please mention them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plouj.com/blog/2009/03/07/howto-build-dxx-rebirth-for-windows-with-msysmingw/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

