wiki:SmokinGuns/Building/freebsd

Introduction

In wiki, we will compile the game on a FreeBSD system. This wiki is highly inspired from this forum post. We will use the latest release of FreeBSD which is the 9.1 today with the bootonly CD on a amd64 system.

Content

  • Why
  • Getting the tools
  • Getting the code
  • Compilation
  • Update
  • Troubles

Why

There are few reasons that may motivate you from compiling SG from source:

  • You want to do some beta testing on this not so well known platform
  • You want to discover the new changes in the game code because you are a bsd user.
  • Or you want to get the game working without the linux-compatible mode on your server/own machine

Getting the tools

For being sure I haven't missed anything, I'll start with a really empty FreeBSD installation and I will be quite fast in the explanations since those users do know how to type a console command and may have done those steps already

So, log in root and type:

pw user mod <yourname> -G wheel # being able to become root from your usual user

Logout from root. Then in your user account (may need a reload), type:

su
pkg_add -r xorg vim xfce4 # at least having something proper to use and having the GL libs
Xorg -configure && mv ~/xorg.conf.new /etc/X11/xorg.conf

Then add in /etc/rc.conf those lines:

hald_enable="YES"
dbus_enable="YES"

Then you can exit the su mode and then type:

echo "/usr/local/bin/startxfce4" > ~/.xinitrc

Now you need to reboot for applying the changes to rc.conf. When done, log in as a your usual user and then type:

startx

Set via the interface your keymap, then open the terminal and type:

su
pkg_add -r sudo firefox scite # well...
cd /usr/ports/game/ioquake-devel/
make build-depends-list
pkg_add -r libvorbis openal-soft gmake pkgconf sdl12 curl fpc-sdl git zip

Then add yourself to the sudoers, for that matter launch:

visudo

and and this line:

<yourname> ALL=(ALL) ALL

And you are done!

Getting the code

Open the terminal and type:

git clone https://github.com/smokin-guns/SmokinGuns.git

Compilation

Open the terminal and type:

cd SmokinGuns/
gmake # don't confuse with the BSD make that is totally different, you need to use GNU Make
cd build/release-freebsd-amd64/
cp *.amd64 /where/you/installed/the/game/
cp *.so /where/you/installed/the/game/
cd smokinguns/
zip -r z_vm.pk3 vm/
mv z_vm.pk3 /where/you/installed/the/game/smokinguns/

Update

If you want to update the code, open the console and type:

cd SmokinGuns/
git pull

and redo the compilation process.

Troubles

  • If it doesn't compile for some reason when you just updated the code, try to remove the build folder and try to compile again. If it doesn't make the trick, contact the developers via the forum.
  • If you spot any bug while testing, just contact the developers via the forum or make a bug report (you will still need a forum account to log in here, in small caps).
  • If you want to play with the sources, I suggest you to learn git (especially the checkout command), there are plenty of tutorials around.
  • For some other problems, don't be scared to contact any developer or me (#smokinguns on freenode, this forum, email, etc.)
Last modified 10 years ago Last modified on Dec 24, 2013, 5:03:11 PM