Generic build scripts

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: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

I ported script to Ubuntu-20.04 LTS (focal): http://files.freeciv.org/tools/freeciv- ... tu20.04.sh

It's based on Ubuntu-18.04 script, with support for building freeciv-3.0 series added.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

cazfi wrote:I ported the script to Manjaro Linux: http://files.freeciv.org/tools/freeciv- ... manjaro.sh
New version (1.05):
- Dropped support for freeciv-2.5
- Added support for building freeciv-3.1 alphas

Notable thing about the 3.1 support is that when one builds Qt-client with this script, it gets built in Qt6 mode (it uses Qt6, not Qt5). While you still need to wait for S3_1-alpha2 for some time, I tested this script with a snapshot tarball generated from current S3_1 HEAD (commit 'dd0e0d1903'). That tarball is available for anyone for the time being (I may take it down any time).

To build Qt-client from that tarball:

Code: Select all

./freeciv-manjaro.sh 3.0.93.10-alpha1+ qt "" http://storage.cazfi.net/freeciv_snapshot/freeciv-3.0.93.10-alpha1+.tar.xz
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Version for Linux Mint-20: http://files.freeciv.org/tools/freeciv- ... -mint20.sh

Supported are freeciv-2.6 and freeciv-3.0 releases.

Assuming that you have downloaded the script to your home directory (under "/home/<your username>/"), to use it:
1) Open terminal program
2) Give yourself rights to execute the script

Code: Select all

> chmod +x freeciv-mint20.sh
3) Execute it. To see what parameters are supported, execute it once with '--help' parameter:

Code: Select all

> ./freeciv-mint20.sh --help
The build likely takes something around ten minutes.

I've tested all of:

Code: Select all

> ./freeciv-mint20.sh 3.0.0 gtk3.22
> ./freeciv-mint20.sh 3.0.0 qt
> ./freeciv-mint20.sh 3.0.0 sdl2
> ./freeciv-mint20.sh 3.0.0 gtk2
To run freeciv you've built, e.g.

Code: Select all

> ./freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22 &

Compared to Mint-19 script that I used as a base for this:
- The default main directory is now 'freeciv-genbuild', to avoid messing with more generially named 'freeciv' directory that user might have for some other reason
- Instead of always installing the requirements, script now asks from user if that should be done
- Output a bit more instructions, e.g., list of executables built
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

cazfi wrote:I ported the script to Manjaro Linux: http://files.freeciv.org/tools/freeciv- ... manjaro.sh
New version (1.06) of the manjaro script with some changes ported from the Mint-20 version:

- The default main directory is now 'freeciv-genbuild', to avoid messing with more generially named 'freeciv' directory that user might have for some other reason
- Instead of always installing the requirements, script now asks from user if that should be done
- Output a bit more instructions, e.g., list of executables built
Mikail2006
Posts: 13
Joined: Sat Feb 12, 2022 5:22 pm

Re: Generic build scripts

Post by Mikail2006 »

cazfi wrote:Version for Linux Mint-20: http://files.freeciv.org/tools/freeciv- ... -mint20.sh
How to open the downloaded game? Through the terminal, your code was opened once, then it stopped working)
How to start the server, the application "server" opens the server 2.6.2 version((
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Mikail2006 wrote:
cazfi wrote:Version for Linux Mint-20: http://files.freeciv.org/tools/freeciv- ... -mint20.sh
Thanks, how is it possible to open the game other than using your code?
How to start the server, the application "server" opens the server 2.6.2 version((
Server is the 'freeciv-server' -program. e.g. if you built 3.0.0 gtk3.22 gui with default paths, you can run it as:

Code: Select all

> ./freeciv-genbuilds/install-3.0.0/gtk3.22/bin/freeciv-server
Unfortunately I don't know how to make that more accessible in Mint-20 (that's likely something Mint specific, not generic linux stuff)
Mikail2006
Posts: 13
Joined: Sat Feb 12, 2022 5:22 pm

Re: Generic build scripts

Post by Mikail2006 »

cazfi wrote:

Code: Select all

> ./freeciv-genbuilds/install-3.0.0/gtk3.22/bin/freeciv-server
Thanks, the server opens, but I can’t open the game itself, your code gives:

Code: Select all

./freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22 &
[1] 90970
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Mikail2006 wrote:I can’t open the game itself, your code gives:

Code: Select all

./freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22 &
[1] 90970
Does it give any useful information with a higher logging level, with "-d verbose" -parameter:

Code: Select all

./freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22 -d verbose
Mikail2006
Posts: 13
Joined: Sat Feb 12, 2022 5:22 pm

Re: Generic build scripts

Post by Mikail2006 »

cazfi wrote:
Mikail2006 wrote:I can’t open the game itself, your code gives:

Code: Select all

./freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22 &
[1] 90970
Does it give any useful information with a higher logging level, with "-d verbose" -parameter:

Code: Select all

./freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22 -d verbose
No, it does not give anything at all, I tried to open programs by double-clicking and "open in terminal" does not work either.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Uh, then next step would be running it in an actual debugger.

1) Make sure you have 'gdb' (gnu debugger) installed
2) Try this:

Code: Select all

> gdb freeciv-genbuild/install-3.0.0/gtk3.22/bin/freeciv-gtk3.22
(gdb) run
3) If the output indicates that the client crashed (i.e. didn't make clean shutdown for some reason):

Code: Select all

(gdb) bt full
4) Once you've finished with the debugger:

Code: Select all

(gdb) quit
Post Reply