| 1 | = Introduction = |
| 2 | In wiki, we will compile the game on a FreeBSD system. This wiki is highly inspired from this [http://forum.smokin-guns.org/viewtopic.php?f=22&t=3318 forum post]. We will use the latest release of [http://www.freebsd.org/ FreeBSD] which is the 9.1 today with the bootonly CD on a amd64 system. |
| 3 | |
| 4 | = Content = |
| 5 | * Why |
| 6 | * Getting the tools |
| 7 | * Getting the code |
| 8 | * Compilation |
| 9 | * Update |
| 10 | * Troubles |
| 11 | |
| 12 | == Why == |
| 13 | There are few reasons that may motivate you from compiling SG from source: |
| 14 | * You want to do some beta testing on this not so well known platform |
| 15 | * You want to discover the new changes in the game code because you are a bsd user. |
| 16 | * Or you want to get the game working without the linux-compatible mode on your server/own machine |
| 17 | |
| 18 | == Getting the tools == |
| 19 | 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 |
| 20 | |
| 21 | So, log in root and type: |
| 22 | {{{ |
| 23 | pw user mod <yourname> -G wheel # being able to become root from your usual user |
| 24 | }}} |
| 25 | Logout from root. Then in your user account (may need a reload), type: |
| 26 | {{{ |
| 27 | su |
| 28 | pkg_add -r xorg vim xfce4 # at least having something proper to use and having the GL libs |
| 29 | Xorg -configure && mv ~/xorg.conf.new /etc/X11/xorg.conf |
| 30 | }}} |
| 31 | Then add in {{{/etc/rc.conf}}} those lines: |
| 32 | {{{ |
| 33 | hald_enable="YES" |
| 34 | dbus_enable="YES" |
| 35 | }}} |
| 36 | Then you can exit the su mode and then type: |
| 37 | {{{ |
| 38 | echo "/usr/local/bin/startxfce4" > ~/.xinitrc |
| 39 | }}} |
| 40 | Now you need to reboot for applying the changes to {{{rc.conf}}}. When done, log in as a your usual user and then type: |
| 41 | {{{ |
| 42 | startx |
| 43 | }}} |
| 44 | Set via the interface your keymap, then open the terminal and type: |
| 45 | {{{ |
| 46 | su |
| 47 | pkg_add -r sudo firefox scite # well... |
| 48 | cd /usr/ports/game/ioquake-devel/ |
| 49 | make build-depends-list |
| 50 | pkg_add -r libvorbis openal-soft gmake pkgconf sdl12 curl fpc-sdl git zip |
| 51 | }}} |
| 52 | Then add yourself to the sudoers, for that matter launch: |
| 53 | {{{ |
| 54 | visudo |
| 55 | }}} |
| 56 | and and this line: |
| 57 | {{{ |
| 58 | <yourname> ALL=(ALL) ALL |
| 59 | }}} |
| 60 | And you are done! |
| 61 | |
| 62 | == Getting the code == |
| 63 | Open the terminal and type: |
| 64 | {{{ |
| 65 | git clone https://github.com/smokin-guns/SmokinGuns.git |
| 66 | }}} |
| 67 | |
| 68 | == Compilation == |
| 69 | Open the terminal and type: |
| 70 | {{{ |
| 71 | cd SmokinGuns/ |
| 72 | gmake # don't confuse with the BSD make that is totally different, you need to use GNU Make |
| 73 | cd build/release-freebsd-amd64/ |
| 74 | cp *.amd64 /where/you/installed/the/game/ |
| 75 | cp *.so /where/you/installed/the/game/ |
| 76 | cd smokinguns/ |
| 77 | zip -r z_vm.pk3 vm/ |
| 78 | mv z_vm.pk3 /where/you/installed/the/game/smokinguns/ |
| 79 | }}} |
| 80 | |
| 81 | == Update == |
| 82 | If you want to update the code, open the console and type: |
| 83 | {{{ |
| 84 | cd SmokinGuns/ |
| 85 | git pull |
| 86 | }}} |
| 87 | and redo the compilation process. |
| 88 | |
| 89 | == Troubles == |
| 90 | * 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. |
| 91 | * If you spot any bug while testing, just contact the developers via the forum or make a [http://trac.smokin-guns.org/report/ bug report] (you will still need a forum account to log in here, in small caps). |
| 92 | * If you want to play with the sources, I suggest you to learn git (especially the checkout command), there are plenty of tutorials around. |
| 93 | * For some other problems, don't be scared to contact any developer or me (#smokinguns on freenode, this forum, email, etc.) |