How to install/make Dagon on Linux.
Note: Ignore ‘$’ if you copy and paste the commands.
Step 1: Get Dagon .zip file from the github repository. If you don’t have the link -> https://github.com/Senscape/Dagon/archive/master.zip
Step 2: Unzip the file. Click on it and Archive Manager should pop up and should have a file named: Dagon-master or something like it. If it doesn’t (for whatever reason) right click and select Open with Archive Manager.
Step 3: Now you want to extract it, so click: Extract and select where you want it and click Extract (for this example, I going to put in the home folder so it will appear as: home/Dagon-master).
Step 4: Open a Terminal (remember the terminal is your friend).
Step 5: Now you want to get to where you extracted it using: $ cd “your_location_here”. So for example, I put mine right in home so it will be: $ cd Dagon-master/Linux/ .
Step 6 (optional): Make a folder called build: $ mkdir build . And now: $ cd build to go into the folder create another folder and make another folder called obj: $ mkdir obj . Now do: $ cd … to get back to the Linux/ folder. This step could also be done in the GUI instead of the terminal.
Step 7: Now comes the most difficult part and the part where it took me almost an hour. In the terminal type: $ make -f Makefile . If it compiles with no errors skip to Step 8. If it doesn’t and has an error like:
gcc -O2 -Wall -static -I …/Dagon -I otherSources -I /usr/include/freetype2 -I /usr/include/lua5.1 -c …/Dagon/DGAudio.cpp -o build/obj/DGAudio.o
In file included from …/Dagon/DGConfig.h:20:0,
…/Dagon/DGPlatform.h:61:38: fatal error: X11/extensions/xf86vmode.h: No such file or directory
make: *** [build/obj/DGAudio.o] Error 1
Don’t freak, you just don’t have the libraries. So, you need: libxxf86vm-dev, libopenal-dev, libogg-dev, libvorbis-dev, libtheora-dev, lua5.1-dev, libfreetype6-dev, libglew1.6-dev. If you don’t have any of them (or have some of them but not all) you’ll need to the ones your missing. So to cover all bases you can type:
$ sudo apt-get install libxxf86vm-dev
$ sudo apt-get install libopenal-dev
$ sudo apt-get install libogg-dev
$ sudo apt-get install libvorbis-dev
$ sudo apt-get install libtheora-dev
$ sudo apt-get install lua5.1-dev
$ sudo apt-get install libfreetype6-dev
$ sudo apt-get install libglew1.6-dev
Note: (For 64-bit computer, you need these below)
$ sudo apt-get install libglew1.6:i386 liblua5.1-0:i386 libogg0:i386 libvorbisfile3:i386 libtheora0:i386
It will ask you for your password and when it prompts for [Y/n] type: y and hit enter. If it says you already have it up to date move on. Once you have done all of these type: $ make -f Makefile again. If it still doesn’t work and gives you an error, make sure you have done everything in this tutorial and check the forums for help.
Step 8: Congrats you made it! You can close the terminal now and in your directory and open it by clicking on it (dagon) in your directory under: build/. Now if you have problems they will appear in the .log file in the same directory. Enjoy.
Note: If you getting a black screen when you start the program and the log says you have a bad config file, you are probably on a 64-bit system; to fix it redo step 7 with the 64-bit step as well.