There are several ways to install Naval Battle. You may get prebuilt binaries if there are any suitable for your distro. And of course, you may always build the game from source code for yourself - just grab the compiler and all other tools necessary.
Download the binaries Edit
Ubuntu users may get Naval Battle builds from the author's PPA, which stands for a Personal Package Archive. It is added to the list of your software sources fairly easy:
$ sudo apt-add-repository ppa:al-exquemelin/navbattle
if you wish to update only when a stable release is published or
$ sudo apt-add-repository ppa:al-exquemelin/navbattle-daily
if you prefer updating every time the source code in the actual series gets updated (once every 24 hours is the limit). See version history for more details on how the development process is organised in the Naval Battle project.
Having added the PPA, you may act just like with regular repositories:
$ sudo apt-get update $ sudo apt-get install navbattle
This will install the latest build in the chosen PPA.
Building from source Edit
Active development of Naval Battle is led in the
trunk series. To get some more or less stable code refer to numbered series (
0.2, etc.). See version history for details.
$ sudo apt-get install bzr
You might also get the
bzr-doc package if you want some more information on using
2. Now navigate to a directory of your choosing (e.g.
~/) and get the code by typing
$ bzr branch lp:navbattle/0.1
This will create a directory named
./0.1 and download the most fresh code available into it.
3. To build the game successfully you'll have to provide some dependencies. First of all, make sure that you have
make installed (which is the case often, but you'd better double-check).
Then install all the SDL related development packages:
$ sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-ttf2.0-dev
libsdl-image1.2-dev depends on
libsdl-image1.2, so you'll have both packages installed. The same is true for the rest of the packages mentioned.
4. The rest is simple. Just go to the directory you have downloaded the code into:
$ cd ./0.1
and start building the game by typing
You may specify the target needed: thus, if you want to hunt down some annoying bug, you should use
$ make debug
5. Run the game by typing
Arch Linux Edit
The installation procedure consists of quite the same steps as in Ubuntu, except that you use
pacman instead of
apt-get. Also mind the difference in package names (there are no
-dev packages in Arch repositories).
Thus, to get the dependencies needed use
$ sudo pacman -Ss make gcc sdl sdl_image sdl_ttf
then build everything normally.
Bazaar Explorer from Windows main menu.
Get project source from elsewhere button, then
From field and change the path in
To field to your liking. Click
Yes to initialize a shared repository.
OK once more and wait while
Bazaar downloads all the revisions necessary.
Close. You now have the source code and may quit
10. Run the installer and click
Install. In the following window, you may change to options to your liking or just click
Continue. Wait while the download process finishes, then click
11. Mark the packages you wish to install. For this particular task we'll need
mingw32-msys. Now select
Apply Changes from the
Installation menu. Click
Apply and wait for the packages to be downloaded and installed.
Close, then exit
MinGW Installation Manager.
13. Make sure
MSYS can find
C:\MinGW\msys\1.0\etc\fstab.sample and rename or copy it to
C:\MinGW\msys\1.0\etc\fstab (the paths may vary depending on where you installed
MinGW). Open this file with a text editor and make sure it contains, among others, the following line:
Change it corresponding to your
MinGW path or leave it unchanged in case you used the default one. Save and close the file.
C:\MinGW\msys\1.0\msys.bat and run it (the path may vary depending on where you installed
MinGW). A command shell should appear.
15. Copy the source code into your
MSYS environment, i.e. copy
al_exquemelin is your
16. Time to get
SDL itself. Go to http://libsdl.org/release/ and download
SDL-devel-1.2.15-mingw32.tar.gz. Unpack the archive (you may use
tar utilities included in
17. Now distribute the archive's contents as follows.
- Copy the
.afiles from archive's
- Copy everything from archive's
\bindirectory into the directory where our executable will be created (e.g.
18. Download https://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.12-VC.zip and unpack the archive.
SDL_image.hfrom the archive's
SDL_image.libfrom the archive's
libpng15-15.dllfrom the archive's
19. Download https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-devel-2.0.11-VC.zip and unpack the archive.
SDL_ttf.hfrom the archive's
SDL_ttf.libfrom the archive's
zlib1.dllfrom the archive's
C:\MinGW\msys\1.0\msys.bat. Navgate to
$ ~/trunkand type
$ make debugat the prompt. The resulting executable, named
navbattle.exe, must now appear in your