Freeciv
Register
Advertisement

This page describes how to setup and install Freeciv-web (FCW) on your own computer. Freeciv-web can be setup using Vagrant on VirtualBox to quickly create a local developer image running Freeciv-web on Ubuntu on your host operating system such as Windows, OSX or Linux. This guide uses Windows, and will be similar on Linux.

System requirements:[]

Note that running Freeciv-web using Vagrant requires about 4Gb of memory and 3 Gb of harddisk space.

Two Freeciv-web Github repos:[]


1. Enable Virtualization in your BIOS.

Link with how-to

1. Power off your computer.
2. Then press the specific hotkey to enter BIOS. The hotkeys may vary due to different brands. It usually is Esc, F2 or Del, etc.
3. Then navigate to the Advanced tab, press Enter to continue.
4. Select Virtualization and enable it.
5. After that, save the changes and reboot your computer. (source)


2. Install VirtualBox: https://www.virtualbox.org/


3. Install Vagrant: http://www.vagrantup.com/


4. Install Git:

http://git-scm.com/ (Git console)

or: https://desktop.github.com/ (or: GitHub Desktop)

5. Check out Freeciv-web from git

Checkout to a directory on your computer, by running these two git commands. For example to C:\git\.

This will checkout the active FCW version:

git config --global core.autocrlf false
git clone https://github.com/Lexxie9952/fcw.org-server.git

Git clone

or, this for Freeciv-web:

git clone https://github.com/freeciv/freeciv-web.git


6. Run Vagrant up with the following commands in your Freeciv-web directory from step 5:

vagrant plugin install vagrant-vbguest
vagrant up

It will look like this:

Vagrant up

This will build, compile, install and run Freeciv-web on the virtual server image. Wait for the installation process to complete, watching for any error messages in the logs.

If you get errors related to Symlinks in Windows, see step 12 below.

The result will look like this is successful:

Vagrant-success


7. (Skip this step if you run Windows) For Linux or OS X, then you need to setup a SSH tunnel to port 80 like this:

sudo ssh -p 2222 -gNfL 80:localhost:80 vagrant@localhost -i ~/.vagrant.d/insecure_private_key


8. Then test Freeciv-web by pointing your web-browser to http://localhost/ on your host operating system.

9. To login to your Vagrant server, run the command:

vagrant ssh

The Freeciv-web code can then be browsed under the /vagrant directory.

10. Making code changes

Making changes to the Freeciv-web webapp:

Rebuild the Freeciv-web webapp here: /vagrant/freeciv-web

Then rebuild with the ./build.sh command.


Making changes to the Freeciv C server: (TODO)

11. Further work suggestions:

Start and Stop of FCW:

/vagrant/scripts/start-freeciv-web.sh

/vagrant/scripts/stop-freeciv-web.sh


12. Workaround on Windows: Running a Administrator console:

Windows: You must run Vagrant in a Command Prompt as administrator in Windows, for the install to get access to create SymLinks on Windows.

Link with how-to.

It is also possible to build FCW with Docker instead of Vagrant, which is documented in the README.


Finally, you will have a running FCW version which looks like this:

Fcw-2021b


Advertisement