Installing FreeCiv from Linux repository

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
cazfi
Elite
Posts: 1700
Joined: Tue Jan 29, 2013 6:54 pm

Re: Installing FreeCiv from Linux repository

Postby cazfi » Tue Jun 20, 2017 9:29 am

Corbeau wrote:I assume it's just because it's a "build", not an installation?

Whether you run it from the build directory or have done the installation shouldn't affect stability. But it can be that something bad happens because the 2.5.7 build finds some files from your installed 2.5.1 version.

cazfi
Elite
Posts: 1700
Joined: Tue Jan 29, 2013 6:54 pm

Re: Installing FreeCiv from Linux repository

Postby cazfi » Tue Jun 20, 2017 9:35 am

About the optional dependencies; to get sound working in freeciv-2.5 install libsdl-mixer1.2-dev and rerun configure (and 'make'). To get it working in freeciv-2.6 and later, libsdl2-mixer-dev is needed.

User avatar
Corbeau
Elite
Posts: 984
Joined: Mon Jan 13, 2014 11:13 pm

Re: Installing FreeCiv from Linux repository

Postby Corbeau » Tue Jun 20, 2017 9:55 am

I don't use sounds.

Also, I uninstalled 2.5.1. together with the server, and still couldn't load it. I'll try starting another game.

(Not that it matters, that load is old, not planning to continue with it.)

cazfi
Elite
Posts: 1700
Joined: Tue Jan 29, 2013 6:54 pm

Re: Installing FreeCiv from Linux repository

Postby cazfi » Tue Jun 20, 2017 3:07 pm

Lesson 3: Building sdl2-client of S2_6. It's a new client in S2_6. Both S2_5 and S2_6 have older sdl-client.

Code: Select all

 > sudo apt-get install libsdl2-gfx-dev libsdl2-image-dev libsdl2-ttf-dev
 > mkdir sdl2
 > cd sdl2
 > ../freeciv-2.6.0-beta0/configure --enable-debug --enable-client=sdl2
 > make
 > ./fcgui

User avatar
Corbeau
Elite
Posts: 984
Joined: Mon Jan 13, 2014 11:13 pm

Re: Installing FreeCiv from Linux repository

Postby Corbeau » Wed Jun 21, 2017 8:54 am

Ok, what exactly is the difference between a "build" and an "installation"?

louis94
Hardened
Posts: 211
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Installing FreeCiv from Linux repository

Postby louis94 » Wed Jun 21, 2017 10:14 am

Corbeau wrote:Ok, what exactly is the difference between a "build" and an "installation"?

The location of the files. "Installing" software is just putting files in specific locations (often under /usr on Linux). If you can't start your build from the application menu, that's because you didn't install it. That's the most important difference I can think of (except that Freeciv needs to find all of its files, but making everything work fine is the job of the developers).

Louis

User avatar
Corbeau
Elite
Posts: 984
Joined: Mon Jan 13, 2014 11:13 pm

Re: Installing FreeCiv from Linux repository

Postby Corbeau » Wed Jun 21, 2017 12:26 pm

...so, if I simply move the "build" to /usr it will be "installed"?

cazfi
Elite
Posts: 1700
Joined: Tue Jan 29, 2013 6:54 pm

Re: Installing FreeCiv from Linux repository

Postby cazfi » Wed Jun 21, 2017 2:41 pm

Corbeau wrote:...so, if I simply move the "build" to /usr it will be "installed"?

No, the directory structure is different. You can install the build with 'sudo make install', but I don't recommend that since it installs files to your system directories outside your package manager's knowledge, which may cause problems when you try to install or uninstall (other) software the usual way, and there's no easy way to get them cleaned out again.

The main differences between running from the build directory and install directories are all related to how files are found. When installed:
- Client finds server to run even when not configured with --enable-debug
- Translations are found (-> localization works)
- If support for loadable AI modules is built in (not by default), the modules are found even when not configured with --enable-debug

Of these, localization support is one that matters. To get it working without messing system directories you can install to location other than system directories. Configure with --prefix=/path/to/installation/root/

Code: Select all

> ../freeciv-2.5.7/configure --prefix=/home/cazfi/freeciv/install --enable-client=gtk3
> make
> make install
> /home/cazfi/freeciv/install/bin/freeciv-gtk3

cazfi
Elite
Posts: 1700
Joined: Tue Jan 29, 2013 6:54 pm

Re: Installing FreeCiv from Linux repository

Postby cazfi » Sun Jun 25, 2017 2:49 pm

Now that freeciv git repository is online; let's setup build environment from git.
Unfortunately Linux Mint 17 git is so old it does not have 'worktree' feature, which is used in my usual setups. So this is a bit restricted setup:

Code: Select all

> sudo apt-get install git
> cd freeciv
> git clone https://github.com/freeciv/freeciv.git git
> cd git
> git checkout S2_5
> ./autogen.sh --no-configure-run
> cd ..
> mkdir build-gtk3
> cd build-gtk3
> ../git/configure --enable-debug --enable-client=gtk3
> make
> ./fcgui

cazfi
Elite
Posts: 1700
Joined: Tue Jan 29, 2013 6:54 pm

Re: Installing FreeCiv from Linux repository

Postby cazfi » Sun Jun 25, 2017 2:53 pm

To get the latest changes and to rebuild with them:

Code: Select all

> cd freeciv/git
> git pull
> cd ../build-gtk3
> make