<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://te4.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sloslo</id>
		<title>Tales of Maj'Eyal - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://te4.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sloslo"/>
		<link rel="alternate" type="text/html" href="https://te4.org/wiki/Special:Contributions/Sloslo"/>
		<updated>2026-05-11T05:40:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=14510</id>
		<title>How to compile</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=How_to_compile&amp;diff=14510"/>
				<updated>2017-12-26T22:03:56Z</updated>
		
		<summary type="html">&lt;p&gt;Sloslo: Links to 1.0.0 version were broken; folder with name 1.0 exists at the time of writing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are instructions for compiling ToME4 on Debian Linux.  If you haven't done so already, see [[Source Setup]] for obtaining the source code.&lt;br /&gt;
&lt;br /&gt;
Building ToME4 beta 43 or higher requires snapshots of the currently unreleased [http://www.libsdl.org/hg.php SDL 2.0] library (also referred to as '''SDL HG'''). Most operating systems only supply the latest stable release, SDL 1.2, which '''will not work''' for ToME4.&lt;br /&gt;
&lt;br /&gt;
In addition, you will need SDL2-compatible versions of the SDL_image and SDL_ttf libraries. Again, these are typically not available from your operating system distributor, because they are in a prerelease state. The instructions on this page will guide you through the process of building these from source.&lt;br /&gt;
&lt;br /&gt;
==Addons==&lt;br /&gt;
The ToME 1.0.0RC1 (and later) source code in Git/SVN is incomplete. You must install &amp;quot;addons&amp;quot; which are not part of the Git/SVN tree in order to get all the game features. The procedure recommended by DarkGod is to download one of the official releases, extract the addon files from it, and copy them into the tree.&lt;br /&gt;
&lt;br /&gt;
If you prefer to avoid doing that, the addons are available from a third-party site:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Game Version !! Addons&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot;|1.1.3&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.1.3/tome-addon-dev.teaa tome-addon-dev.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.1.3/tome-items-vault.teaa tome-items-vault.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.1.3/tome-stone-wardens.teaa tome-stone-wardens.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;|1.0.1&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.0.1/tome-items-vault.teaa tome-items-vault.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.0.1/tome-stone-wardens.teaa tome-stone-wardens.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;|1.0.0&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.0/tome-items-vault.teaa tome-items-vault.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/1.0/tome-stone-wardens.teaa tome-stone-wardens.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;|RC4&lt;br /&gt;
| [http://wooledge.org/~greg/tome/RC4/tome-items-vault.teaa tome-items-vault.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/RC4/tome-stone-wardens.teaa tome-stone-wardens.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;|RC2&lt;br /&gt;
| [http://wooledge.org/~greg/tome/RC2/tome-items-vault.teaa tome-items-vault.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/RC2/tome-stone-wardens.teaa tome-stone-wardens.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot;|RC1&lt;br /&gt;
| [http://wooledge.org/~greg/tome/RC1/tome-items-vault.teaa tome-items-vault.teaa]&lt;br /&gt;
|-&lt;br /&gt;
| [http://wooledge.org/~greg/tome/RC1/tome-stone-wardens.teaa tome-stone-wardens.teaa]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Copy these into the '''game/addons/''' subdirectory once you've followed the rest of the instructions below.&lt;br /&gt;
&lt;br /&gt;
Addons are version-locked to the specific ToME version for which they are bundled, ''except'' ToME versions above 1.0.1, which can use the 1.0.1 addons.&lt;br /&gt;
&lt;br /&gt;
==SDL==&lt;br /&gt;
ToME beta 43 was built with the prerelease versions of SDL2, SDL2_image and SDL2_ttf available on November 25, 2012. Later versions may also work, depending on the stability of the library's interface. For reference, the following hg revision numbers are known to work:&lt;br /&gt;
*SDL revision 6687&lt;br /&gt;
*SDL_image revision 339&lt;br /&gt;
*SDL_ttf revision 222&lt;br /&gt;
(You should try the current SDL2 first, and only fall back to these older versions if necessary.)&lt;br /&gt;
&lt;br /&gt;
Install prerequisite development packages for your operating system.  You'll need mercurial (hg), C and C++ compilers, make, autoconf and friends, and the development packages for X, libopenal, libogg, libvorbis, libpng, libglu1-mesa, libfreetype, libasound, and libaudiofile.&lt;br /&gt;
&lt;br /&gt;
For Debian, this might work:&lt;br /&gt;
 sudo apt-get build-dep libsdl1.2debian&lt;br /&gt;
 sudo apt-get install subversion mercurial autoconf automake libtool&lt;br /&gt;
&lt;br /&gt;
If that doesn't work, then this may get you close:&lt;br /&gt;
 sudo apt-get install build-essential subversion mercurial&lt;br /&gt;
 sudo apt-get install autoconf automake libtool&lt;br /&gt;
 sudo apt-get install libopenal-dev libogg-dev libpng12-dev libvorbis-dev&lt;br /&gt;
 sudo apt-get install libglu1-mesa-dev libfreetype6-dev xorg-dev&lt;br /&gt;
 sudo apt-get install libasound2-dev libaudiofile-dev&lt;br /&gt;
&lt;br /&gt;
Install the prerelease version of SDL2:&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 hg clone http://hg.libsdl.org/SDL&lt;br /&gt;
 cd SDL&lt;br /&gt;
 # OPTIONAL: hg update 6687&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 cd ..&lt;br /&gt;
 mkdir SDL-build&lt;br /&gt;
 cd SDL-build&lt;br /&gt;
 ../SDL/configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
Install the prerelease version of SDL_image:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 hg clone http://hg.libsdl.org/SDL_image&lt;br /&gt;
 cd SDL_image&lt;br /&gt;
 # OPTIONAL: hg update 339&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 cd ..&lt;br /&gt;
 mkdir SDL_image-build&lt;br /&gt;
 cd SDL_image-build&lt;br /&gt;
 ../SDL_image/configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the prerelease version of SDL_ttf:&lt;br /&gt;
&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 hg clone http://hg.libsdl.org/SDL_ttf&lt;br /&gt;
 cd SDL_ttf&lt;br /&gt;
 # OPTIONAL: hg update 222&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 cd ..&lt;br /&gt;
 mkdir SDL_ttf-build&lt;br /&gt;
 cd SDL_ttf-build&lt;br /&gt;
 ../SDL_ttf/configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
At this point you should have headers in '''/usr/local/include/SDL2/''' and libraries in '''/usr/local/lib/'''. The libraries should be named libSDL2, libSDL2_image and libSDL2_ttf (with appropriate version numbers and extensions). If any of the SDL libraries fail to build, check the [http://www.libsdl.org SDL website] for assistance.&lt;br /&gt;
&lt;br /&gt;
==Premake4==&lt;br /&gt;
Install premake4 from http://industriousone.com/premake/download (Note: if your OS has a &amp;quot;premake&amp;quot; version 3 package, that ''will not'' work.)&lt;br /&gt;
&lt;br /&gt;
==ToME4==&lt;br /&gt;
Decide where you'll keep the ToME source code. You'll need about 1 gigabyte of space. Let's assume you're going to use /usr/local/src/t-engine4. Make this directory and make sure you have write permission.&lt;br /&gt;
&lt;br /&gt;
Fetch the ToME sources:&lt;br /&gt;
 cd /usr/local/src&lt;br /&gt;
 git clone http://git.net-core.org/tome/t-engine4.git&lt;br /&gt;
&lt;br /&gt;
Your local copy of the Git repository will contain ''every version'' of ToME source code up to the time you did the clone, and you will be &amp;quot;checked out&amp;quot; in the bleeding edge master branch by default.  So, if you want to build a stable version of ToME, you need to specify which one:&lt;br /&gt;
 cd t-engine4&lt;br /&gt;
 git checkout tome-1.1.3       # or whichever remote tag you wish to &amp;quot;check out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check, and possibly edit, '''premake4.lua''' and '''build/te4core.lua''' to reflect the location of your SDL installation.&lt;br /&gt;
* In premake4.lua, make sure &amp;quot;/usr/local/include/SDL2&amp;quot; appears before any other SDL directory in the includedirs section.&lt;br /&gt;
* In build/te4core.lua, under the configuration &amp;quot;linux&amp;quot; section, make sure &amp;quot;/usr/local/lib/&amp;quot; appears on the libdirs line, and make sure &amp;quot;SDL2&amp;quot;, &amp;quot;SDL2_ttf&amp;quot;, &amp;quot;SDL2_image&amp;quot; appear on the links line.&lt;br /&gt;
&lt;br /&gt;
Now to compile, you just do:&lt;br /&gt;
 cd /usr/local/src/t-engine4&lt;br /&gt;
 make clean; premake4 clean     # Don't worry if these fail.&lt;br /&gt;
 premake4 gmake&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
To upgrade to a new version:&lt;br /&gt;
 cd /usr/local/src/t-engine4&lt;br /&gt;
 make clean; premake4 clean     # Don't worry if these fail.&lt;br /&gt;
 git fetch origin&lt;br /&gt;
 git merge origin&lt;br /&gt;
 git checkout tome-x.y.z        # Fill in the appropriate remote tag name&lt;br /&gt;
&lt;br /&gt;
Then you need to check/edit '''premake4.lua''' and '''build/te4core.lua''' again (every time, ''sigh''), and then finally:&lt;br /&gt;
 premake4 gmake&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 Lua Error: /engine/utils.lua:666: could not load font: /data/font/Vera.ttf (12)&lt;br /&gt;
&lt;br /&gt;
It means you've linked against the wrong versions of SDL_image and/or SDL_ttf. Make sure ToME is linked against the ''new'' versions, which have &amp;quot;SDL2&amp;quot; in their names.&lt;br /&gt;
&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 Error initializing SDL video:  No available video device&lt;br /&gt;
&lt;br /&gt;
It probably means you didn't have all the development packages installed when you built SDL.&lt;/div&gt;</summary>
		<author><name>Sloslo</name></author>	</entry>

	</feed>