Skip to content

C7 Development VM

Yegor Budylin edited this page Jan 26, 2025 · 6 revisions

NOTE: After the migration to Godot 4, the virtual machine was not kept up to date. The information on this page is preserved for historical reference.

This page describes how to set up and use c7dev-jammy, a virtual machine image created in VMWare to allow new C7 contributors to jump right into the development environment. This Ubuntu 22.04 VM contains all of the tools you need to build and run C7, except for Civ3 files.

To use the VM:

Download c7dev-jammy-v2.ova (10 Gb, sha256sum 2583881b57a97b8f454fe626d00dfe11da3a8c37fb12ab50c848d9c560c4b0b2) and import it into VMWare Workstation or other virtualization software that supports OVA appliances. Some additional configuration may be required with VirtualBox or other software.

Before starting up, adjust virtual hardware settings as needed for your system. The appliance is set to allocate 8Gb of RAM and 4 CPU cores, with 20Gb of virtual storage.

Log in as user c7dev "C7 Developer" with password c7dev.

Follow the steps below, also included in the file README on the desktop, to complete setup:

  1. Use 'passwd' to change the password for user c7dev.

  2. Install pending updates in Ubuntu. This is important as .NET may have pending updates.

  3. Log in to GitKraken by linking the GitHub account you use to contribue to C7, and open '~/workspace/Prototype' in GitKraken.

OR:

If you prefer to use git via the command line or another tool, create a new SSH key, add it to your GitHub account, and configure git with the name and email address you use on GitHub. Clone the Prototype repo using SSH to a new location.

  1. Copy Civ3 files onto this VM, mount a drive or folder where Civ3 is installed, or install Steam and Civ3 Complete. To share a folder with VMware, open Virtual Machine Settings > Options tab > Shared folders. Choose "Always enabled", and then follow the "Add..." wizard to select your Civ3 installation. This directory will be mounted under /mnt/hgfs/. Shared folders are space efficient but not the most reliable option (they tend to stop working forever as soon as you restart), so installing or copying Civ3 into the VM is recommended.

You may also use a network share to access Civ3. With a Windows host for your Civ3 install, this involves sharing the Civ3 folder on your local network, and then using the "Connect to Server" option in Ubuntu's file manager:

image

Where the connection always start with smb://, "Alpha15" is replaced with the name of your Windows computer, and "Civ3" is the name of the network file share on your Windows PC. When you click Connect, enter your Windows credentials to authenticate yourself to the network file share (this seems to be necessary even if you're given "everyone" read access in Windows), and if prompted about a keyring, enter the C7 VM password to give Ubuntu the okay to save your credentials for connecting.

Once this is connected, you may use the "..." menu to the left of the magnifying class to bookmark the location so it always shows up, and like with the less-reliable shared folders, may copy your Civ3 files to the VM.

  1. Edit '~/.profile' (not '.bashrc') to add the path to Civ3 to CIV3_HOME on the last line. This should be the top-level game directory, e.g. 'Sid Meier's Civilization III Complete'. Just open the file from the file explorer or run Text Editor from the applications menu. After saving the file, log out and back in to refresh your user profile.

  2. Open the Prototype directory in Visual Studio Code or your IDE of choice. If using VS Code, follow the instructions on the wiki to set up debugging. If you checked out Prototype to a new location, copy the directory '~/workspace/Prototype/.vscode' into your location.

  3. Run the Godot Editor and open C7. If you checked out Prototype to a new location, import 'Prototype/C7/project.godot' and remove the other one from the project manager. With the project open, go to Editor menu > Editor Settings... > Mono > Build Tool and make sure that Build Tool is set to 'dotnet CLI'.

  4. C7 should build and run as-is from Godot. If you are using the provided copy of Prototype, it is checked out to Carthage Preview 2. There may be additional steps required to run/debug from VS Code or other IDE. For the latest debug setup instructions, see the wiki: https://github.com/C7-Game/Prototype/wiki/Developing-and-Setting-Up-IDEs

  5. Post a screenshot in Discord to show that you successfully built C7 from source :)

Clone this wiki locally