Page 2 of 6

Re: Generic build scripts

Posted: Mon Oct 01, 2018 4:11 am
by cazfi
I ported script to Ubuntu-18.04 LTS (bionic): http://files.freeciv.org/tools/freeciv- ... tu18.04.sh
and Linux Mint19: http://files.freeciv.org/tools/freeciv- ... -mint19.sh

These scripts are identical short of the output they give when run with --version parameter.

They are based on Mint18 script, version 1.01. Versions of the new scripts are 1.00.

Compared to Mint18 script:
- Support for gtk3.22 gui added as ubuntu-18.04 and mint19 have sufficiently new gtk+-3

Re: Generic build scripts

Posted: Tue Oct 02, 2018 9:19 am
by cazfi
cazfi wrote:I ported the script to Manjaro Linux: http://files.freeciv.org/tools/freeciv- ... manjaro.sh
New version (1.01) of the Manjaro script.
- Build freeciv with sound support enabled

Re: Generic build scripts

Posted: Mon Nov 12, 2018 7:24 pm
by Corbeau
Hello.

I got this:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 27, in <module>
    from CommandNotFound.util import crash_guard
ModuleNotFoundError: No module named 'CommandNotFound'

Re: Generic build scripts

Posted: Tue Nov 13, 2018 3:26 am
by cazfi
Corbeau wrote:Hello.

I got this:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 27, in <module>
    from CommandNotFound.util import crash_guard
ModuleNotFoundError: No module named 'CommandNotFound'
Uh. Is that all the output the script gives?

From the name "command-not-found" I guess there's two problems; 1) some command is not found, and 2) handling of that error case fails in your shell.

We don't know what is the command that is not found since problem (2) causes its name not to be shown. So we need to resolve (2) first.

Does similar error occur when you give an arbitrary non-existing command in your shell?

https://forums.linuxmint.com/viewtopic.php?t=219943
https://unix.stackexchange.com/question ... se-command

Some other hits suggest uninstalling 'command-not-found' package as a workaround ('sudo apt-get remove command-not-found')

Re: Generic build scripts

Posted: Tue Nov 13, 2018 4:25 pm
by cazfi
cazfi wrote:From the name "command-not-found" I guess there's two problems; 1) some command is not found, and 2) handling of that error case fails in your shell.

We don't know what is the command that is not found since problem (2) causes its name not to be shown. So we need to resolve (2) first.
Just occurred to me that it might be the script itself that is not found if you are not used to running scripts in unix/linux. Unlike in Windows, commands are not looked from the current directory by default, so trying to run "freeciv-mint19.sh" does not work. You need to explicitly give path, i.e.,current directory: "./freeciv-mint19.sh". And before that you have to give yourself permissions to run the script (it most likely isn't executable after you downloaded it): "chmod +x freeciv-mint19.sh"

Re: Generic build scripts

Posted: Tue Nov 13, 2018 10:35 pm
by Corbeau
I did make it executable immediately and yeah, the ./ thing occurred to me afterwards, but it didn't help.

And I just checked, permissions are -rwer-er-e, so it's definitely executable.

However, a weird thing - at least to me: TAB is usually used to finish the command or a file name I'm typing. But it isn't catching this one. Once I get enough letters, TAB inserts some other file. Any clues?

Re: Generic build scripts

Posted: Sun Nov 18, 2018 10:40 am
by nutzer
Why not do the more obvious before the more difficult? I see build scripts as vulnerable entities for the many environmental implications they normally bear (and which can fail). I would suggest rather to update the "install" documentation with useful information about the required packages which need to be loaded for particular client versions. I'm lacking experience for cross-Unix identity of such libraries but it may be worth an investigation. For instance, "libgtk2.0-dev" is the name of a required library, is this name then identical on all platforms? This would make things easier, but the general path is to supply correct library names and the corresponding install calls in the documents.

Re: Generic build scripts

Posted: Sat Oct 19, 2019 12:43 pm
by cazfi
Build of freeciv-3.0.0-alpha3 tested with the Manjaro script and found working. I tested build of gtk3.22- and Qt-clients

Code: Select all

> ./freeciv-manjaro.sh 3.0.0-alpha3 gtk3.22 freeciv http://files.freeciv.org/packages/windows/testing/cazfi/tarballs/S3_0-alpha3/freeciv-3.0.0-alpha3.tar.xz
> ./freeciv-manjaro.sh 3.0.0-alpha3 qt freeciv http://files.freeciv.org/packages/windows/testing/cazfi/tarballs/S3_0-alpha3/freeciv-3.0.0-alpha3.tar.xz

Re: Generic build scripts

Posted: Fri Dec 20, 2019 2:06 pm
by Lachu
I haven't tested or download your script, but I created some nice tool, called cli2gui. You could integrate it with your script, so users don't have to open terminal window.

If I found time, I would help you.
Clone sources from sourceforge.
Open cli2gui.c and change backends directory to ./backends
Build main directory items and backend_sources items.
Copy backends, each library from main project dir, cli2gui-exec binary into your's script directory

Integration is quite simple. Just check special env variable is set. If not, set this varia przez and perform image change to cli2gui-exec, passing each parameter (without first) to it. If var isn't set, do normal execution.

I just forgot: you must set PATH to PATH and script directory. You must also set LD_LIBRARY_PATH to LD_LIBRARY_PATH, script dir and backends dir.

Re: Generic build scripts

Posted: Thu Mar 25, 2021 12:59 am
by cazfi
cazfi wrote:I ported the script to Manjaro Linux: http://files.freeciv.org/tools/freeciv- ... manjaro.sh
Latest version (1.04) support building freeciv-3.0 series.
So, to download source for the 3.0.0-beta1 and build gtk3.22-client:

Code: Select all

./freeciv-manjaro.sh 3.0.0-beta1 gtk3.22
or to build qt-client:

Code: Select all

./freeciv-manjaro.sh 3.0.0-beta1 qt