Difference between revisions of "Compiling Mudlet"
Blackice89 (talk | contribs) |
Blackice89 (talk | contribs) |
||
Line 62: | Line 62: | ||
'''1. Install required packages''' | '''1. Install required packages''' | ||
+ | |||
Mudlet has a bunch of dependencies that you'll need to compile the source. You can get an updated list of packages [http://packages.debian.org/sid/mudlet here], it's just a matter of figuring out what they're called in pacman. As for the lua dependencies, I recommend you get luarocks, and use it to install them. You'll also need git to download the source. | Mudlet has a bunch of dependencies that you'll need to compile the source. You can get an updated list of packages [http://packages.debian.org/sid/mudlet here], it's just a matter of figuring out what they're called in pacman. As for the lua dependencies, I recommend you get luarocks, and use it to install them. You'll also need git to download the source. | ||
'''2. Get the source through Git''' | '''2. Get the source through Git''' | ||
+ | |||
Run the following in a terminal to get the source: | Run the following in a terminal to get the source: | ||
Line 72: | Line 74: | ||
'''3. Address yajl issue''' | '''3. Address yajl issue''' | ||
+ | |||
There are two versions of yajl: 1 and 2. If you installed yajl via pacman, you probably have 2. If you do have two, then you'll have to download [http://vrac.kadarniad.fr/lua_yajl2.c this file] and add it into the src directory. If you do not want to do this, then download and install yajl1 from AUR. | There are two versions of yajl: 1 and 2. If you installed yajl via pacman, you probably have 2. If you do have two, then you'll have to download [http://vrac.kadarniad.fr/lua_yajl2.c this file] and add it into the src directory. If you do not want to do this, then download and install yajl1 from AUR. | ||
'''3. Edit src.pro''' | '''3. Edit src.pro''' | ||
+ | |||
Run the following in a terminal from the src directory: | Run the following in a terminal from the src directory: | ||
for i in *.{cpp,h} ; do sed -i 's/#include <phonon>/#include <phonon\/MediaObject>\n#include <phonon\/AudioOutput>/' $i ; done | for i in *.{cpp,h} ; do sed -i 's/#include <phonon>/#include <phonon\/MediaObject>\n#include <phonon\/AudioOutput>/' $i ; done | ||
Line 84: | Line 88: | ||
'''4. Compile the source''' | '''4. Compile the source''' | ||
+ | |||
qmake | qmake | ||
make | make | ||
'''5. Run Mudlet''' | '''5. Run Mudlet''' | ||
+ | |||
./mudlet | ./mudlet |
Revision as of 03:21, 21 May 2012
Compiling on Ubuntu 11.10
1. Install GIT
sudo apt-get install git
2. Installing the needed packages
sudo apt-get install build-essential qt4-dev-tools lua5.1 liblua5.1-0-dev libpcre3-dev libboost1.46-dev zlib1g-dbg zlib1g-dev libyajl1 libyajl-dev libyajl1-dbg liblua5.1-rex-pcre0 liblua5.1-sql-sqlite3-2 libphonon-dev libhunspell-dev libzzip-dev liblua5.1-zip0 liblua5.1-filesystem0
3. get mudlet source
git clone git://mudlet.git.sourceforge.net/gitroot/mudlet/mudlet
4. goto the mudlet src folder
cd mudlet/src
5.a edit src.pro like so (for 32bit):
replace the corresponding part near the beginning of the file with this:
LIBLUA = -llua5.1 !exists(/usr/lib/i386-linux-gnu/liblua5.1.a):LIBLUA = -llua # automatically link to LuaJIT if it exists exists(/usr/lib/i386-linux-gnu/libluajit-5.1.a):LIBLUA = -L/usr/lib/i386-linux-gnu/ -lluajit-5.1
5.b edit src.pro like so (for 64bit):
replace the corresponding part near the beginning of the file with this:
LIBLUA = -llua5.1 !exists(/usr/lib/x86_64-linux-gnu/liblua5.1.a):LIBLUA = -llua # automatically link to LuaJIT if it exists exists(/usr/lib/x86_64-linux-gnu/libluajit-5.1.a):LIBLUA = -L/usr/lib/x86_64-linux-gnu/ -lluajit-5.1
6. run the following commands
qmake-qt4 make ./mudlet
7. enjoy
Compiling in ArchLinux
The best way to do this would be to use the PKGBUILD found here. You'll just download the PKGBUILD into a directory, run
makepkg sudo pacman -U [name of the generated pkg file]
and you'll be done. For more info on what this does, visit this site. If you really want to compile it by hand, please note that it won't be as simple due to ArchLinux' aggressive update philosophy. The instructions provided here might be outdated due to said philosophy, so you will have to know how to use Google, and you'll need to be willing to read through C++ compilation errors. If you're still willing to go through this, then read on.
1. Install required packages
Mudlet has a bunch of dependencies that you'll need to compile the source. You can get an updated list of packages here, it's just a matter of figuring out what they're called in pacman. As for the lua dependencies, I recommend you get luarocks, and use it to install them. You'll also need git to download the source.
2. Get the source through Git
Run the following in a terminal to get the source:
git clone git://mudlet.git.sourceforge.net/gitroot/mudlet/mudlet
it should download the source automatically.
3. Address yajl issue
There are two versions of yajl: 1 and 2. If you installed yajl via pacman, you probably have 2. If you do have two, then you'll have to download this file and add it into the src directory. If you do not want to do this, then download and install yajl1 from AUR.
3. Edit src.pro
Run the following in a terminal from the src directory:
for i in *.{cpp,h} ; do sed -i 's/#include <phonon>/#include <phonon\/MediaObject>\n#include <phonon\/AudioOutput>/' $i ; done sed -i 's/lua_yajl1.c/lua_yajl2.c/' TLuaInterpreter.cpp sed -i 's/-lhunspell/-lhunspell-1.3/' src.pro sed -i 's/lua_yajl1.c/lua_yajl2.c/' src.pro sed -i '/MOC_DIR.*/i QMAKE_MOC += -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED' src.pro sed -i '/.*unix:LIBS.*/a -lz \\' src.prosed -i 's#QString path = \"mudlet-lua/lua/LuaGlobal.lua\";#QString path = \"/usr/local/share/mudlet/LuaGlobal.lua\";#' TLuaInterpreter.cpp
4. Compile the source
qmake make
5. Run Mudlet
./mudlet