Compile on linux

Here's a script, kindly written by alar_k, to make Uplighter able to compile on linux. You'll need GLFW, GLFT, FMod & FreeType2.

sed -e 's/#include <FTGL/#include <FTGL\/FTGL/' src/main.cpp > src/main.cpp.new \
    && mv src/main.cpp.new src/main.cpp
sed -e 's/#include <FTGL/#include <FTGL\/FTGL/' src/main.hpp > src/main.hpp.new \
   && mv src/main.hpp.new src/main.hpp
sed -e 's/\\/\//' -e 's/run\.exe/uplighter/' -e 's/ -mwindows//' \
  -e 's/-lmingw32 //' -e 's/-luser32 -lgdi32 -lopengl32 -lglu32/-lGL -lGLU/' \
 -e 's/objflags = /objflags = -I\/usr\/include\/freetype2\/ /' makefile > makenew \
   && mv makenew makefile
mv gfx/ARIALBD.TTF gfx/Arialbd.ttf
dos2unix lvls/levels.txt

Then just run make. If it for some reason won't work (I can't see why it wouldn't), you'll have to improvise ;)

Also, I think I'll write a postmortem some day soon. Now I have some more voting to do :)

Comments

Codexus: Mmmm, I noticed the script is not displayed properly (less-than and greater-than characters). If anyone wants to use it just copy it from a display of the HTML source.

hitman200ca: emerge is Gentoo specific as portage isn't really used by any other distro.

Jolle: I've fixed the > and < signs. Stupid of me not noticing it.

About emerge and that, I don't actually know anything about it, so thanks for the info. I'll let the script be anyway though.

Jolle: Removed the emerge line.

Source: mechanicalcat.net archive

Next postSpeed issues
Found a bug?
Tell us on Discord