<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.tt-wiki.net/index.php?action=history&amp;feed=atom&amp;title=CompilingTTDPatchOnLinux</id>
	<title>CompilingTTDPatchOnLinux - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.tt-wiki.net/index.php?action=history&amp;feed=atom&amp;title=CompilingTTDPatchOnLinux"/>
	<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;action=history"/>
	<updated>2026-05-17T04:31:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;diff=7296&amp;oldid=prev</id>
		<title>Orudge: Reformat and update</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;diff=7296&amp;oldid=prev"/>
		<updated>2011-07-31T12:49:28Z</updated>

		<summary type="html">&lt;p&gt;Reformat and update&lt;/p&gt;
&lt;a href=&quot;https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;amp;diff=7296&amp;amp;oldid=5462&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Orudge</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;diff=5462&amp;oldid=prev</id>
		<title>Hgnmu128: Style edits</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;diff=5462&amp;oldid=prev"/>
		<updated>2011-06-13T23:30:24Z</updated>

		<summary type="html">&lt;p&gt;Style edits&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:30, 13 June 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;&#039;&#039;How to compile TTDPatch on Linux&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;&#039;&#039;How to compile TTDPatch on Linux&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Compiling TTDPatch on Linux=&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page tells you what you need to do to compile TTDPatch on Linux. This won&#039;t make actual Linux binaries, so you still need to run it through Wine or VMWare or similar. However, it makes it possible to do all the development work without having to boot Windows.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page tells you what you need to do to compile TTDPatch on Linux. This won&#039;t make actual Linux binaries, so you still need to run it through Wine or VMWare or similar. However, it makes it possible to do all the development work without having to boot Windows.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===If your distribution has a mingw32 gcc cross compiler===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===If your distribution has a mingw32 gcc cross compiler===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Install the mingw32 gcc cross compiler together with the corresponding binutils and runtime. E.g. on debian-based distros, try &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;apt-get install mingw32 mingw32-binutils mingw32-runtime&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Install the mingw32 gcc cross compiler together with the corresponding binutils and runtime. E.g. on debian-based distros, try &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;apt-get install mingw32 mingw32-binutils mingw32-runtime&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#The patch Makefile assumes that this compiler is called i686-pc-mingw32-gcc. If it has a different name (try &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;-+find /usr -name \*mingw32\*gcc+-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; to find out), you need to edit the Makefile&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#The patch Makefile assumes that this compiler is called i686-pc-mingw32-gcc. If it has a different name (try &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;-+find /usr -name \*mingw32\*gcc+-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; to find out), you need to edit the Makefile&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**For patch sources 2.5 beta 2 or higher, define the compiler prefix in Makefile.local. This should be the filename you found above minus the -gcc part. The following example works for Ubuntu:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**For patch sources 2.5 beta 2 or higher, define the compiler prefix in Makefile.local. This should be the filename you found above minus the -gcc part. The following example works for Ubuntu:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;++&amp;lt;pre&amp;gt;-+CROSS-PREFIX = i586-mingw32msvc+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;++&amp;lt;pre&amp;gt;-+CROSS-PREFIX = i586-mingw32msvc+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**For patch sources before 2.5 beta 2, you need to change Makefile.setup: modify all occurences of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;i686-pc-mingw32&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; to match your compiler prefix.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**For patch sources before 2.5 beta 2, you need to change Makefile.setup: modify all occurences of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;i686-pc-mingw32&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; to match your compiler prefix.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===If you don&#039;t have a mingw32 gcc cross compiler===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===If you don&#039;t have a mingw32 gcc cross compiler===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If your distribution doesn&#039;t comes with one, the following instructions tell you how to make one. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;nbsp;&lt;/del&gt;They assume that you already have a working mingw32 compiler from the cygwin suite, or at least the mingw32 headers and runtime libraries.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If your distribution doesn&#039;t comes with one, the following instructions tell you how to make one. They assume that you already have a working mingw32 compiler from the cygwin suite, or at least the mingw32 headers and runtime libraries.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you don&#039;t have Cygwin installed, you can just download the packages &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;w32api&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;mingw-runtime&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; from a Cygwin mirror and install them manually. In that case, use these packages instead of files from /mnt/d/cygwin below. (This is just a shortcut to avoid having to compile the runtime and libraries as well.)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you don&#039;t have Cygwin installed, you can just download the packages &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;w32api&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;mingw-runtime&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; from a Cygwin mirror and install them manually. In that case, use these packages instead of files from /mnt/d/cygwin below. (This is just a shortcut to avoid having to compile the runtime and libraries as well.)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# this assumes you have cygwin installed in /mnt/d/cygwin and the TTDPatch source tree in /mnt/d/ttdpatch, and that the cross compiler will be installed in /usr/i686-pc-mingw32 with executables in /usr/bin having an i686-pc-mingw32 prefix. Modify as appropriate.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# this assumes you have cygwin installed in /mnt/d/cygwin and the TTDPatch source tree in /mnt/d/ttdpatch, and that the cross compiler will be installed in /usr/i686-pc-mingw32 with executables in /usr/bin having an i686-pc-mingw32 prefix. Modify as appropriate.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# get the GNU binutils source, unpack, change to source dir; it needs to be a version no older than 2005 for correct linking of the Windows executables&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# get the GNU binutils source, unpack, change to source dir; it needs to be a version no older than 2005 for correct linking of the Windows executables&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 80:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ &amp;lt;pre&amp;gt;-+make allw+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ &amp;lt;pre&amp;gt;-+make allw+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# please&lt;/del&gt; [http://www.ttdpatch.net/email.php?Compiling%20on%20Linux&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/del&gt;report] any problems, errors or other difficulties so I may update and improve these instructions&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Please&lt;/ins&gt; [http://www.ttdpatch.net/email.php?Compiling%20on%20Linux&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;report] any problems, errors or other difficulties so I may update and improve these instructions&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Part 2 - Compiling the DOS version of TTDPatch==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Part 2 - Compiling the DOS version of TTDPatch==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This can be done by building the ))OpenWatcom[[]]OpenWatcom[[ compiler for Linux. ))OpenWatcom[[]]OpenWatcom[[ automatically supports all targets, so you just build it as a regular compiler. Here are the steps that worked for compiling ))OpenWatcom[[]]OpenWatcom[[ 1.4 on Linux.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This can be done by building the ))OpenWatcom[[]]OpenWatcom[[ compiler for Linux. ))OpenWatcom[[]]OpenWatcom[[ automatically supports all targets, so you just build it as a regular compiler. Here are the steps that worked for compiling ))OpenWatcom[[]]OpenWatcom[[ 1.4 on Linux.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# get the .tar.bz2 version of the latest [http://www.openwatcom.org/ftp/source/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/del&gt;OpenWatcom source], and unpack it. (note, you&#039;ll need about 400-500 MB space to compile it)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# get the .tar.bz2 version of the latest [http://www.openwatcom.org/ftp/source/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;OpenWatcom source], and unpack it. (note, you&#039;ll need about 400-500 MB space to compile it)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# run the compiler bootstrap&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# run the compiler bootstrap&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 146:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 144:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ to clean up everything you don&#039;t need, which saves about 200-250 MB.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ to clean up everything you don&#039;t need, which saves about 200-250 MB.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# please&lt;/del&gt; [http://www.ttdpatch.net/email.php?Compiling%20on%20Linux&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/del&gt;report] any problems, errors or other difficulties so I may update and improve these instructions&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Please&lt;/ins&gt; [http://www.ttdpatch.net/email.php?Compiling%20on%20Linux&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;report] any problems, errors or other difficulties so I may update and improve these instructions&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now that you can compile the DOS patch, you also need to actually be able to run it, in order to generate memsize.h. This file needs to be correct when distributing the DOS patch, so that the patch knows when it needs to swap out, and when not memory is available to run TTD safely.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now that you can compile the DOS patch, you also need to actually be able to run it, in order to generate memsize.h. This file needs to be correct when distributing the DOS patch, so that the patch knows when it needs to swap out, and when not memory is available to run TTD safely.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 153:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 151:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It&#039;s easy to manually do this every time by getting ttdpatch.exe to run in VMWare, dosemu or dosbox, and manually enter the required commands to recreate memsize.h:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It&#039;s easy to manually do this every time by getting ttdpatch.exe to run in VMWare, dosemu or dosbox, and manually enter the required commands to recreate memsize.h:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* within DOS: &amp;lt;pre&amp;gt;-+ttdpatch -!t-m-f-s-c mem.exe /c &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt; mem.out+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* within DOS: &amp;lt;pre&amp;gt;-+ttdpatch -!t-m-f-s-c mem.exe /c &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt; mem.out+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* within your development environment: &amp;lt;pre&amp;gt;-+perl perl/memsize.pl &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/del&gt; mem.out &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt; memsize.h+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* within your development environment: &amp;lt;pre&amp;gt;-+perl perl/memsize.pl &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt; mem.out &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt; memsize.h+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;However, it&#039;s also quite possible to automate this using dosemu. This is probably a good idea if you have dosemu working anyway, and are going to compile the DOS version more than once. Here&#039;s what you do:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;However, it&#039;s also quite possible to automate this using dosemu. This is probably a good idea if you have dosemu working anyway, and are going to compile the DOS version more than once. Here&#039;s what you do:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* to get this working, you first need a working installation of [http://www.dosemu.org/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|&lt;/del&gt;dosemu]. Make sure it is able to run mem.exe, and that a drive where ttdpatch.exe can be found is mounted within dosemu.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* to get this working, you first need a working installation of [http://www.dosemu.org/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;dosemu]. Make sure it is able to run mem.exe, and that a drive where ttdpatch.exe can be found is mounted within dosemu.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* get dosemu to run the commands given on the dosemu command line. I did it by adding the following at the end of autoexec.bat:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* get dosemu to run the commands given on the dosemu command line. I did it by adding the following at the end of autoexec.bat:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 175:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 173:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;shift&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;shift&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ttdpatch %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt; ttdpatch.out&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ttdpatch %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt; ttdpatch.out&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;~/pp~&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;~/pp~&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ this assumes that your patch development directory is accessible as &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;d:\ttdpatch&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; in dosemu&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ this assumes that your patch development directory is accessible as &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;d:\ttdpatch&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; in dosemu&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* now try running it, to test that everything works&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* now try running it, to test that everything works&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ &amp;lt;pre&amp;gt;-+dosemu -E &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;ttdpatch -h&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ &amp;lt;pre&amp;gt;-+dosemu -E &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;ttdpatch -h&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;+-&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ this should put the TTDPatch help output in /mnt/d/ttdpatch/ttdpatch.out; if it does not, fix whatever is wrong&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ this should put the TTDPatch help output in /mnt/d/ttdpatch/ttdpatch.out; if it does not, fix whatever is wrong&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* now create a shell script called &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;dos&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;, and put in it the following lines:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* now create a shell script called &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;dos&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;, and put in it the following lines:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ &amp;lt;pre&amp;gt;~pp~&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ &amp;lt;pre&amp;gt;~pp~&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/bin/sh&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/bin/sh&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;dosemu -dumb -E &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;$*&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/del&gt; /dev/null &amp;amp;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt; /dev/null&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;dosemu -dumb -E &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;$*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt; /dev/null &amp;amp;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt; /dev/null&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cat /mnt/d/ttdpatch/ttdpatch.out&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cat /mnt/d/ttdpatch/ttdpatch.out&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 199:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ this calls dosemu, has it execute the command line given to it, discards all output from dosemu but replays the output of the command that was put in /mnt/d/ttdpatch/ttdpatch.out&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+ this calls dosemu, has it execute the command line given to it, discards all output from dosemu but replays the output of the command that was put in /mnt/d/ttdpatch/ttdpatch.out&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* make sure the WINDIR environment variable (for make) is set such that $WINDIR/command/mem.exe points to mem.exe in dosemu, for example set it to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;d:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; and put mem.exe in d:/command/.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* make sure the WINDIR environment variable (for make) is set such that $WINDIR/command/mem.exe points to mem.exe in dosemu, for example set it to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;d:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; and put mem.exe in d:/command/.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, after making a DOS executable for distribution (e.g. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;make DEBUG=0 remake dos&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;), delete memsize.h and run &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;make memsize.h&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;. This should, hopefully, invoke the above script, thus calling ttdpatch.exe within dosemu and capturing its output, which is then parsed by a Perl script to produce memsize.h. Then make a final pass of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt;make DEBUG=0 dos&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;quot;&lt;/del&gt; to recompile dos.c with this new size information.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, after making a DOS executable for distribution (e.g. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;make DEBUG=0 remake dos&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;), delete memsize.h and run &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;make memsize.h&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;. This should, hopefully, invoke the above script, thus calling ttdpatch.exe within dosemu and capturing its output, which is then parsed by a Perl script to produce memsize.h. Then make a final pass of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;make DEBUG=0 dos&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt; to recompile dos.c with this new size information.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hgnmu128</name></author>
	</entry>
	<entry>
		<id>https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;diff=708&amp;oldid=prev</id>
		<title>Orudge: 12 revisions</title>
		<link rel="alternate" type="text/html" href="https://www.tt-wiki.net/index.php?title=CompilingTTDPatchOnLinux&amp;diff=708&amp;oldid=prev"/>
		<updated>2011-06-12T19:03:29Z</updated>

		<summary type="html">&lt;p&gt;12 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;How to compile TTDPatch on Linux&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=Compiling TTDPatch on Linux=&lt;br /&gt;
&lt;br /&gt;
This page tells you what you need to do to compile TTDPatch on Linux. This won&amp;#039;t make actual Linux binaries, so you still need to run it through Wine or VMWare or similar. However, it makes it possible to do all the development work without having to boot Windows.&lt;br /&gt;
&lt;br /&gt;
First of all, get the sources for TTDPatch 2.0.1 alpha 49 or higher. The Makefile included with older versions isn&amp;#039;t set up to support cross compiliation on Linux.&lt;br /&gt;
&lt;br /&gt;
When you&amp;#039;re ready, edit Makefile.local (make will create it on first run if you don&amp;#039;t have one yet) to use the following definitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-+WINCC = CROSS+-&lt;br /&gt;
&lt;br /&gt;
-+HOST = INTEL+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, it should automatically use the right compiler and settings. If your mingw32 is not 3.4.0 or higher, you&amp;#039;ll also have to uncomment the last line that changes -mtune to -mcpu (but make sure it changes CFLAGS-CROSS not CFLAGS-CYGWIN). Finally, if you don&amp;#039;t have the upx executable packer, uncomment the NOUPX line.&lt;br /&gt;
&lt;br /&gt;
==Part 1 - Compiling the Windows version of TTDPatch==&lt;br /&gt;
&lt;br /&gt;
===If your distribution has a mingw32 gcc cross compiler===&lt;br /&gt;
#Install the mingw32 gcc cross compiler together with the corresponding binutils and runtime. E.g. on debian-based distros, try &amp;amp;quot;apt-get install mingw32 mingw32-binutils mingw32-runtime&amp;amp;quot;.&lt;br /&gt;
#The patch Makefile assumes that this compiler is called i686-pc-mingw32-gcc. If it has a different name (try &amp;amp;quot;-+find /usr -name \*mingw32\*gcc+-&amp;amp;quot; to find out), you need to edit the Makefile&lt;br /&gt;
**For patch sources 2.5 beta 2 or higher, define the compiler prefix in Makefile.local. This should be the filename you found above minus the -gcc part. The following example works for Ubuntu:&lt;br /&gt;
&lt;br /&gt;
++&amp;lt;pre&amp;gt;-+CROSS-PREFIX = i586-mingw32msvc+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
**For patch sources before 2.5 beta 2, you need to change Makefile.setup: modify all occurences of &amp;amp;quot;i686-pc-mingw32&amp;amp;quot; to match your compiler prefix.&lt;br /&gt;
&lt;br /&gt;
===If you don&amp;#039;t have a mingw32 gcc cross compiler===&lt;br /&gt;
&lt;br /&gt;
If your distribution doesn&amp;#039;t comes with one, the following instructions tell you how to make one. &amp;amp;nbsp;They assume that you already have a working mingw32 compiler from the cygwin suite, or at least the mingw32 headers and runtime libraries.&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t have Cygwin installed, you can just download the packages &amp;amp;quot;w32api&amp;amp;quot; and &amp;amp;quot;mingw-runtime&amp;amp;quot; from a Cygwin mirror and install them manually. In that case, use these packages instead of files from /mnt/d/cygwin below. (This is just a shortcut to avoid having to compile the runtime and libraries as well.)&lt;br /&gt;
# this assumes you have cygwin installed in /mnt/d/cygwin and the TTDPatch source tree in /mnt/d/ttdpatch, and that the cross compiler will be installed in /usr/i686-pc-mingw32 with executables in /usr/bin having an i686-pc-mingw32 prefix. Modify as appropriate.&lt;br /&gt;
# get the GNU binutils source, unpack, change to source dir; it needs to be a version no older than 2005 for correct linking of the Windows executables&lt;br /&gt;
# configure, compile and install (for the latter you probably need to be root or use sudo):&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~./configure --prefix=/usr --target=i686-pc-mingw32&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
# setup the includes and libraries for mingw32 from your cygwin installation&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~cd /usr/i686-pc-mingw32&lt;br /&gt;
&lt;br /&gt;
mkdir -p include sys-include lib&lt;br /&gt;
&lt;br /&gt;
cp -a /mnt/d/cygwin/usr/include/mingw/* include&lt;br /&gt;
&lt;br /&gt;
cp -a /mnt/d/cygwin/usr/include/w32api/* sys-include&lt;br /&gt;
&lt;br /&gt;
cp -a /mnt/d/cygwin/lib/mingw/* lib&lt;br /&gt;
&lt;br /&gt;
cp -a /mnt/d/cygwin/lib/w32api/* lib&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
# get the gcc-core source, unpack, change to source dir. (I used gcc-core-3.4.1-1-src.tar.bz2 from the cygwin archives, untared it, untared the gcc-core-3.4.1.tar.bz2 contained but didn&amp;#039;t apply the patch)&lt;br /&gt;
# compile it, pick the same prefix as above obviously:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~./configure --prefix=/usr --target=i686-pc-mingw32&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
# put the nasm executable distributed with alpha 50 or higher in your path before any other nasm executables (or overwrite any existing ones in /usr/bin or wherever it is). If this doesn&amp;#039;t work for you e.g. due to library incompatibilities, get the nasm sources (0.98.39 or higher), unpack, change to the source dir&lt;br /&gt;
** install the TTDPatch nasm patches&lt;br /&gt;
&lt;br /&gt;
++ &amp;lt;pre&amp;gt;-+zcat /mnt/d/ttdpatch/nasm/*.gz|patch -p1+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
** compile nasm:&lt;br /&gt;
&lt;br /&gt;
++ &amp;lt;pre&amp;gt;~pp~./configure --prefix=/usr&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
# make sure the patch Makefile.local has WINCC set to LINUX (default is CYGWIN) and set the HOST as appropriate to INTEL or PPC depending on the CPU of the computer you&amp;#039;re compiling on&lt;br /&gt;
# now try compiling the patch with&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;-+make allw+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
# please [http://www.ttdpatch.net/email.php?Compiling%20on%20Linux|report] any problems, errors or other difficulties so I may update and improve these instructions&lt;br /&gt;
&lt;br /&gt;
==Part 2 - Compiling the DOS version of TTDPatch==&lt;br /&gt;
&lt;br /&gt;
This can be done by building the ))OpenWatcom[[]]OpenWatcom[[ compiler for Linux. ))OpenWatcom[[]]OpenWatcom[[ automatically supports all targets, so you just build it as a regular compiler. Here are the steps that worked for compiling ))OpenWatcom[[]]OpenWatcom[[ 1.4 on Linux.&lt;br /&gt;
# get the .tar.bz2 version of the latest [http://www.openwatcom.org/ftp/source/|OpenWatcom source], and unpack it. (note, you&amp;#039;ll need about 400-500 MB space to compile it)&lt;br /&gt;
# run the compiler bootstrap&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;-+. build.sh+- &amp;lt;span style=&amp;#039;color:grey&amp;#039;&amp;gt;(if that doesn&amp;#039;t work, try -+./build.sh+-)&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# build the rest of the stuff we need and copy to rel2:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~. setvars.sh&lt;br /&gt;
&lt;br /&gt;
cd clib&lt;br /&gt;
&lt;br /&gt;
builder rel2&lt;br /&gt;
&lt;br /&gt;
cd ../mathlib&lt;br /&gt;
&lt;br /&gt;
builder rel2&lt;br /&gt;
&lt;br /&gt;
cd ../emu86&lt;br /&gt;
&lt;br /&gt;
builder rel2&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ building the clib takes a while, there should be a way to make only the libs for a certain target system but I couldn&amp;#039;t figure it out&lt;br /&gt;
# copy the binaries, headers and libraries:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~cd rel2&lt;br /&gt;
&lt;br /&gt;
cp -a binl binw h lh lib286 /usr/local/openwatcom&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
# copy setvars.sh to /usr/local/openwatcom/setvars and edit these:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~export OWROOT=/usr/local/openwatcom&lt;br /&gt;
&lt;br /&gt;
export WATCOM=$OWROOT&lt;br /&gt;
&lt;br /&gt;
export LIB=$OWROOT/lib286&lt;br /&gt;
&lt;br /&gt;
export INCLUDE=$OWROOT/h&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ leave the rest as they are&lt;br /&gt;
# test that you can compile TTDPatch now&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~. /usr/local/openwatcom/setvars&lt;br /&gt;
&lt;br /&gt;
make alld&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
# if everything works you can remove the ))OpenWatcom[[]]OpenWatcom[[ source directory, or run&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~cd bld&lt;br /&gt;
&lt;br /&gt;
builder clean&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ to clean up everything you don&amp;#039;t need, which saves about 200-250 MB.&lt;br /&gt;
# please [http://www.ttdpatch.net/email.php?Compiling%20on%20Linux|report] any problems, errors or other difficulties so I may update and improve these instructions&lt;br /&gt;
&lt;br /&gt;
Now that you can compile the DOS patch, you also need to actually be able to run it, in order to generate memsize.h. This file needs to be correct when distributing the DOS patch, so that the patch knows when it needs to swap out, and when not memory is available to run TTD safely.&lt;br /&gt;
&lt;br /&gt;
It does this by running the patch, and then the patch itself runs the DOS command mem.exe to display the size of ttdpatch.exe in memory.&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s easy to manually do this every time by getting ttdpatch.exe to run in VMWare, dosemu or dosbox, and manually enter the required commands to recreate memsize.h:&lt;br /&gt;
* within DOS: &amp;lt;pre&amp;gt;-+ttdpatch -!t-m-f-s-c mem.exe /c &amp;amp;gt; mem.out+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
* within your development environment: &amp;lt;pre&amp;gt;-+perl perl/memsize.pl &amp;amp;lt; mem.out &amp;amp;gt; memsize.h+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it&amp;#039;s also quite possible to automate this using dosemu. This is probably a good idea if you have dosemu working anyway, and are going to compile the DOS version more than once. Here&amp;#039;s what you do:&lt;br /&gt;
* to get this working, you first need a working installation of [http://www.dosemu.org/|dosemu]. Make sure it is able to run mem.exe, and that a drive where ttdpatch.exe can be found is mounted within dosemu.&lt;br /&gt;
* get dosemu to run the commands given on the dosemu command line. I did it by adding the following at the end of autoexec.bat:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~unix -e&lt;br /&gt;
&lt;br /&gt;
if not errorlevel 1 exitemu&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ (if no -E commands are given, this will display an error message and return to the DOS prompt, else the emulator will exit after running the command)&lt;br /&gt;
* create a batch file called ttdpatch.bat somewhere in the DOS PATH, with the following contents:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~d:&lt;br /&gt;
&lt;br /&gt;
cd \ttdpatch&lt;br /&gt;
&lt;br /&gt;
shift&lt;br /&gt;
&lt;br /&gt;
ttdpatch %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 &amp;amp;gt; ttdpatch.out&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ this assumes that your patch development directory is accessible as &amp;amp;quot;d:\ttdpatch&amp;amp;quot; in dosemu&lt;br /&gt;
* now try running it, to test that everything works&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;-+dosemu -E &amp;amp;quot;ttdpatch -h&amp;amp;quot;+-&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ this should put the TTDPatch help output in /mnt/d/ttdpatch/ttdpatch.out; if it does not, fix whatever is wrong&lt;br /&gt;
* now create a shell script called &amp;amp;quot;dos&amp;amp;quot;, and put in it the following lines:&lt;br /&gt;
&lt;br /&gt;
+ &amp;lt;pre&amp;gt;~pp~&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
dosemu -dumb -E &amp;amp;quot;$*&amp;amp;quot; &amp;amp;lt; /dev/null &amp;amp;&amp;amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
cat /mnt/d/ttdpatch/ttdpatch.out&lt;br /&gt;
&lt;br /&gt;
rm /mnt/d/ttdpatch/ttdpatch.out&lt;br /&gt;
&lt;br /&gt;
~/pp~&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
+ this calls dosemu, has it execute the command line given to it, discards all output from dosemu but replays the output of the command that was put in /mnt/d/ttdpatch/ttdpatch.out&lt;br /&gt;
* make sure the WINDIR environment variable (for make) is set such that $WINDIR/command/mem.exe points to mem.exe in dosemu, for example set it to &amp;amp;quot;d:&amp;amp;quot; and put mem.exe in d:/command/.&lt;br /&gt;
&lt;br /&gt;
Now, after making a DOS executable for distribution (e.g. &amp;amp;quot;make DEBUG=0 remake dos&amp;amp;quot;), delete memsize.h and run &amp;amp;quot;make memsize.h&amp;amp;quot;. This should, hopefully, invoke the above script, thus calling ttdpatch.exe within dosemu and capturing its output, which is then parsed by a Perl script to produce memsize.h. Then make a final pass of &amp;amp;quot;make DEBUG=0 dos&amp;amp;quot; to recompile dos.c with this new size information.&lt;/div&gt;</summary>
		<author><name>Orudge</name></author>
	</entry>
</feed>