<?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=Braindead</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=Braindead"/>
		<link rel="alternate" type="text/html" href="https://te4.org/wiki/Special:Contributions/Braindead"/>
		<updated>2026-05-09T00:42:37Z</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=16692</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=16692"/>
				<updated>2020-03-13T03:30:38Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* Addons */ note about addons included in the source download from te4.org&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;
NOTE: If you download the source from [https://te4.org/download te4.org] '''the addons are included''', except for the Stone Wardens.&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;
Note, the configure command might throw errors about Freetype2. Installation instructions can be found [http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html here].&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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;
=====SDL Lua font error=====&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;
=====SDL video: No available video device=====&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;br /&gt;
&lt;br /&gt;
=====OpenAL=====&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:43:10: fatal error: AL/al.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;AL/al.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have OpenAL libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libopenal1 libopenal-dev&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:45:10: fatal error: vorbis/vorbisfile.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;vorbis/vorbisfile.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have the Vorbis libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libvorbis0a libvorbis-dev&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Source_Setup&amp;diff=16691</id>
		<title>Source Setup</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Source_Setup&amp;diff=16691"/>
				<updated>2020-03-13T03:22:50Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: slight note that source code can also be downloaded from te4.org/downloads&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can access the official ToME source code using Git.  (Note: the official source repository was in Subversion until June 7, 2013.)&lt;br /&gt;
&lt;br /&gt;
The source is also available from the downloads page at [https://te4.org/download te4.org]. '''NOTE:''' this option is useful if you want the version without music&lt;br /&gt;
&lt;br /&gt;
== Git ==&lt;br /&gt;
&lt;br /&gt;
The Git repository is available at http://git.net-core.org/groups/tome read-only to everyone.&lt;br /&gt;
&lt;br /&gt;
In Linux/Unix, after installing Git:&lt;br /&gt;
 git clone http://git.net-core.org/tome/t-engine4.git&lt;br /&gt;
&lt;br /&gt;
This will create a directory named '''t-engine4''' inside the current working directory.&lt;br /&gt;
&lt;br /&gt;
If you need a Git client for Windows, you can download [https://code.google.com/p/tortoisegit/ TortoiseGit] or [http://www.sourcetreeapp.com/ SourceTree].&lt;br /&gt;
&lt;br /&gt;
=== Git Basics ===&lt;br /&gt;
&lt;br /&gt;
A local Git repository is a complete mirror of the &amp;quot;origin&amp;quot; repository.  It includes every revision of every file, all the commit messages, and so on.&lt;br /&gt;
&lt;br /&gt;
If you're only going to retrieve changes from DarkGod's repository, and never make any changes of your own, then you can get by with the following commands:&lt;br /&gt;
&lt;br /&gt;
* Retrieve all new changes:&lt;br /&gt;
 git fetch origin&lt;br /&gt;
* Review the changes before applying them:&lt;br /&gt;
 git log -p HEAD...origin&lt;br /&gt;
* Apply the changes to your local working directory:&lt;br /&gt;
 git merge origin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Git (Mirror) ==&lt;br /&gt;
&lt;br /&gt;
The original Git repository is restored (updates every 10m) and is available from http://git.develz.org/.&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=16690</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=16690"/>
				<updated>2020-03-13T03:15:25Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* SDL Lua error */ proper proper font&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;
Note, the configure command might throw errors about Freetype2. Installation instructions can be found [http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html here].&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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;
=====SDL Lua font error=====&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;
=====SDL video: No available video device=====&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;br /&gt;
&lt;br /&gt;
=====OpenAL=====&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:43:10: fatal error: AL/al.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;AL/al.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have OpenAL libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libopenal1 libopenal-dev&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:45:10: fatal error: vorbis/vorbisfile.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;vorbis/vorbisfile.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have the Vorbis libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libvorbis0a libvorbis-dev&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=16689</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=16689"/>
				<updated>2020-03-13T03:14:50Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* Troubleshooting */ proper titles&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;
Note, the configure command might throw errors about Freetype2. Installation instructions can be found [http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html here].&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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;
=====SDL Lua error=====&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;
=====SDL video: No available video device=====&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;br /&gt;
&lt;br /&gt;
=====OpenAL=====&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:43:10: fatal error: AL/al.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;AL/al.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have OpenAL libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libopenal1 libopenal-dev&lt;br /&gt;
&lt;br /&gt;
=====Vorbis=====&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:45:10: fatal error: vorbis/vorbisfile.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;vorbis/vorbisfile.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have the Vorbis libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libvorbis0a libvorbis-dev&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=16688</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=16688"/>
				<updated>2020-03-13T03:00:09Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* Troubleshooting */ libvorbis section added&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;
Note, the configure command might throw errors about Freetype2. Installation instructions can be found [http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html here].&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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;br /&gt;
&lt;br /&gt;
=====If you get an error like this:=====&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:43:10: fatal error: AL/al.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;AL/al.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have OpenAL libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libopenal1 libopenal-dev&lt;br /&gt;
&lt;br /&gt;
=====If you get an error like this:=====&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:45:10: fatal error: vorbis/vorbisfile.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;vorbis/vorbisfile.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have the Vorbis libs and/or headers installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libvorbis0a libvorbis-dev&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=16687</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=16687"/>
				<updated>2020-03-13T02:52:34Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* SDL */ special note form Freetype2 error fixing&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;
Note, the configure command might throw errors about Freetype2. Installation instructions can be found [http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html here].&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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;br /&gt;
&lt;br /&gt;
=====If you get an error like this:=====&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:43:10: fatal error: AL/al.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;AL/al.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have OpenAL (including headers) installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libopenal1 libopenal-dev&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=16686</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=16686"/>
				<updated>2020-03-13T02:46:14Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* Troubleshooting */ Added section for OpenAL errors and reformatted&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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;br /&gt;
&lt;br /&gt;
=====If you get an error like this:=====&lt;br /&gt;
&lt;br /&gt;
 In file included from ../src/main.c:41:&lt;br /&gt;
 ../src/music.h:43:10: fatal error: AL/al.h: No such file or directory&lt;br /&gt;
  #include &amp;lt;AL/al.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means you don't have OpenAL (including headers) installed. Install both using:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install libopenal1 libopenal-dev&lt;/div&gt;</summary>
		<author><name>Braindead</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=How_to_compile&amp;diff=16685</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=16685"/>
				<updated>2020-03-13T02:37:45Z</updated>
		
		<summary type="html">&lt;p&gt;Braindead: /* Premake4 */ suggest to install using apt-get as it is way easier&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 your distro:&lt;br /&gt;
 sudo apt-get install premake4&lt;br /&gt;
&lt;br /&gt;
Another option is to install premake4 from https://premake.github.io/&lt;br /&gt;
&lt;br /&gt;
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>Braindead</name></author>	</entry>

	</feed>