| 1 |
FreedroidRPG Installation |
| 2 |
========================= |
| 3 |
|
| 4 |
To build FreedroidRPG from source on a Unix-like system, you will use the "standard" GNU autotools way. |
| 5 |
|
| 6 |
Dependencies |
| 7 |
============ |
| 8 |
|
| 9 |
FreedroidRPG requires the following libraries, along with, on the Linux distributions that split them, their associated -dev package. |
| 10 |
Make sure you install them before attempting to build. |
| 11 |
|
| 12 |
SDL |
| 13 |
SDL_image |
| 14 |
SDL_gfx |
| 15 |
SDL_ttf (optional) |
| 16 |
SDL_mixer (optional) |
| 17 |
libogg (optional) |
| 18 |
libvorbis (optional) |
| 19 |
OpenGL (optional) |
| 20 |
GLEW (required for OpenGL, if OpenGL is used) |
| 21 |
lua (optional, packaged in the source tree if not available system-wide) |
| 22 |
|
| 23 |
The packages to install are listed below, depending on your distribution. |
| 24 |
|
| 25 |
1) Debian/Ubuntu |
| 26 |
|
| 27 |
sudo apt install pkg-config libsdl1.2-dev libsdl-mixer1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libogg-dev liblua5.3-dev libjpeg-dev gettext autopoint libglew-dev |
| 28 |
|
| 29 |
2) Fedora |
| 30 |
|
| 31 |
dnf install pkgconfig SDL_image-devel SDL_mixer-devel SDL_gfx-devel SDL_ttf-devel libjpeg-devel libpng-devel libvorbis-devel libGLU-devel lua-devel gettext gettext-devel |
| 32 |
|
| 33 |
3) Archlinux |
| 34 |
|
| 35 |
pacman -S base-devel libgl libvorbis lua sdl sdl_gfx sdl_image sdl_mixer gettext glew |
| 36 |
|
| 37 |
There is also a freedroidrpg-git pkgbuild at the arch user repository: https://aur.archlinux.org/packages.php?ID=57483 |
| 38 |
|
| 39 |
4) Gentoo |
| 40 |
|
| 41 |
emerge -av libsdl sdl-image sdl-gfx sdl-mixer libogg libvorbis eselect-opengl lua virtual/jpeg media-libs/libpng media-libs/glew |
| 42 |
|
| 43 |
5) FreeBSD |
| 44 |
|
| 45 |
pkg install lang/gcc devel/gmake devel/automake devel/pkgconf devel/sdl12 audio/sdl_mixer graphics/sdl_image graphics/sdl_gfx graphics/sdl_ttf graphics/glew |
| 46 |
|
| 47 |
6) Please contribute lists for your distribution! |
| 48 |
|
| 49 |
Building with autotools |
| 50 |
========================= |
| 51 |
|
| 52 |
1) Open a terminal. |
| 53 |
a) Via right click in some file browsers. |
| 54 |
|
| 55 |
b) Via main menu (usually "System" entry). |
| 56 |
Move to the FreedroidRPG source directory using "cd ./XYZ/" command. XYZ = path to the FreedroidRPG source. |
| 57 |
|
| 58 |
2) If you are running a git version of the game, you will first need to generate the |
| 59 |
configure script by running: |
| 60 |
./autogen.sh |
| 61 |
If you don't know what the git version is, you are not running it and can skip this step. |
| 62 |
|
| 63 |
3) Run the configure script: |
| 64 |
./configure |
| 65 |
You can check the options it accepts with --help. |
| 66 |
|
| 67 |
If you are running MAC OSX you will probably want to use "./configure --with-apple-opengl-framework" |
| 68 |
If you are running FreeBSD, you need to use "env MAKE=gmake ./configure" |
| 69 |
|
| 70 |
During the configure process, the terminal may notify you that some software is required. |
| 71 |
Install the required packages and restart ./configure. |
| 72 |
|
| 73 |
4) If ./configure finishes without errors or warnings, then proceed with building the game with: |
| 74 |
make (or gmake, on FreeBSD and any other OS not using GNU make by default)) |
| 75 |
|
| 76 |
5) Installation |
| 77 |
a) "make install" will install the game system-wide. You need to be root for this. The binary name is freedroidRPG. |
| 78 |
|
| 79 |
Hint: you can speed up "make" process using "make -j n". Replace "n" with number of jobs. |
| 80 |
For more information execute "make --help". |
| 81 |
|
| 82 |
b) If you are working with the source tree and want to git pull regularly we |
| 83 |
recommend the following instead: |
| 84 |
Do not issue "make install", instead, simply go to the src/ subdirectory, and run |
| 85 |
./freedroidRPG. |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
Cross compile for Windows with autotools |
| 90 |
======================================== |
| 91 |
|
| 92 |
Provided you have a cross compiler installed and set up (see |
| 93 |
below for more details), use the following configure line: |
| 94 |
|
| 95 |
$ ./configure --prefix=/path/to/the/cross/compiler --host=i686-pc-mingw32 --without-x --enable-nls LIBS="-lintl" |
| 96 |
|
| 97 |
One critical point is to make sure you have all required libraries installed. |
| 98 |
You will need to have libogg and libvorbis for sound and music, and will need libintl and its dependencies |
| 99 |
to provide translation support. |
| 100 |
|
| 101 |
The binary we ship supports all those features and is built with autotools. |
| 102 |
In special cases we may agree to sending you the complete cross-compiler archive so you can build win32 binaries |
| 103 |
easily. |
| 104 |
|
| 105 |
Building on Windows |
| 106 |
=================== |
| 107 |
|
| 108 |
Thanks to the mingw64/msys2 projects, it is now quite as easy to build FreedroidRPG |
| 109 |
on Windows than on a Linux based OS. |
| 110 |
|
| 111 |
1) Install msys2 (Use the 32b or 64b version, depending on your OS): |
| 112 |
- Follow the installation guide from https://msys2.github.io/ |
| 113 |
|
| 114 |
2) Install some additional user and build tools: |
| 115 |
- Start a "Msys2 Shell" from the Windows Start Menu and type: |
| 116 |
pacman -S make autoconf automake tar python2 git wget unzip |
| 117 |
|
| 118 |
From now on, when you start a shell, if you want to build a 32b version of |
| 119 |
the game, launch "MinGW-w64 Win32 Shell". If you want to build a 64b version, |
| 120 |
rather launch "MinGW-w64 Win64 Shell" |
| 121 |
|
| 122 |
3) Install the mingw64 toolchain (replace 'i686' by 'x86_64' if you want to |
| 123 |
build a 64b version of the game): |
| 124 |
pacman -S mingw-w64-i686-gcc mingw-w64-i686-pkg-config |
| 125 |
|
| 126 |
4) Install FDRPG dependencies (replace 'i686' by 'x86_64' for 64b version): |
| 127 |
pacman -S mingw-w64-i686-SDL mingw-w64-i686-SDL_gfx mingw-w64-i686-SDL_image mingw-w64-i686-SDL_ttf mingw-w64-i686-lua mingw-w64-i686-glew |
| 128 |
|
| 129 |
5) On Mar,19 2016, SDL_image (1.2.12-4) uses an old version of libwebp. |
| 130 |
Until it is rebuilt, just do: |
| 131 |
cp /mingw32/bin/libwebp-6.dll /mingw32/bin/libwebp-5.dll) |
| 132 |
|
| 133 |
6) The SDL_mixer package is not available. You can build the game without |
| 134 |
it (but sound will be disabled), or you can build it from source |
| 135 |
(with ogg/vorbis support only, we do not need the other input decoders): |
| 136 |
pacman -S mingw-w64-i686-libvorbis |
| 137 |
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.zip |
| 138 |
unzip SDL_mixer-1.2.12.zip |
| 139 |
cd SDL_mixer-1.2.12 |
| 140 |
./autogen.sh && ./configure --prefix=/mingw32 && make && make install |
| 141 |
|
| 142 |
From now on, you have everything installed and you are ready to build the |
| 143 |
game using the same commands than on Linux: |
| 144 |
|
| 145 |
7) Clone freedroid-src repository: |
| 146 |
git clone https://codeberg.org/freedroid/freedroid-src.git |
| 147 |
|
| 148 |
8) Build it: |
| 149 |
./autogen.sh |
| 150 |
./configure |
| 151 |
make |
| 152 |
|
| 153 |
9) Run the game from the cmdline: |
| 154 |
./src/freedroidRPG |
| 155 |
|
| 156 |
or you can just double-click on the executable's icon from the File Explorer. |
| 157 |
You will find it somewhere inside C:\mingw32\msys\home\<your_username> |
| 158 |
|
| 159 |
Enjoy the game! |
| 160 |
|
| 161 |
============================================================== |
| 162 |
If you have problems with the compilation/installation, please |
| 163 |
contact us : #freedroid on irc.libera.chat, |
| 164 |
or send a mail to [email protected]. |
| 165 |
============================================================== |