Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Development | Getting Started
Clone this wiki locally
These instructions will guide you through the process of setting up tools, obtaining the source code, building the suite, and provide an overview of the source code structure.
Avida is a cross platform project designed to work on most POSIX-compliant systems, such as Linux, Mac OS X, Unix-variants, and Windows. You will need a development environment for your platform, such as GCC on Linux, Microsoft Visual Studio on Windows, and Apple Xcode on Mac OS X. The cross platform build system uses CMake, version 2.6 or greater, to generate platform specific build files. In order to obtain the source code, you will need a recent copy of Git.
Getting the Source Code
The Avida project uses multiple Git repositories to manage the source code. If you are new to Git, see Using Git for an overview of basic usage. When developing in Avida, you should always work from a working copy of the Git repository to ensure that you may stay up to date with recent changes. To clone the master Avida repository, move to the directory where you want to store the clone and run the following:
$ git clone https://github.com/devosoft/avida.git
Note, however, that the Avida project uses the Apto library linked as a submodule. You must initialize the submodule following the clone command above before you will be able to build the project:
$ cd avida $ git submodule init $ git submodule update
At this point you should be able to proceed to compiling.
Unix Command Line - CMake
You will need a copy of CMake.
- At the top level of the source code run the
- To compile the avida-viewer, use the flag
- Open the Avida.xcodeworkspace file in the top level of the source code.
- Select the avida build scheme in the top left of the workspace window.
- Select menu option Product > Archive
- "Distribute..." the archive, "Save Built Products"
- The archive contents will contain the executable in /usr/local/bin/avida and the example configuration files in /usr/local/share/avida
Windows - Visual Studio
- Open the CMake GUI
- Select the top level avida source code directory for the "Where is the source code" option.
- Specify a director to build the project files and binaries. It is recommended that you create a new empty directory for this path.
- Select your desired development system (Visual Studio version), if prompted or necessary.
- Click Configure twice, then click Generate to generate the project files.
- Open the generated Visual Studio solution file that should now be in your build folder.
- Build the solution (build the install target, don't use build all).
- You should find a work directory in your build folder containing the avida.exe and default configuration files.
- In the options panel only APTO_LIB_SHARED, APTO_LIB_STATIC and AVD_CMDLINE should be 'On'. The viewer does not appear to build on Windows at the moment.
- Can't find the executable? Check the bin/DEBUG or bin/RELEASE directories.
The Avida project master repository has been organized in the structure described below. This overview should help locate where the sub-projects you are interested in may be found. See specific sub-project pages for further information.
- Applications - /apps
- Mac OS Viewer - /apps/viewer-macos
- Cocoa-based GUI application supporting Avida and Avida-ED
- Avida Core - /avida-core
- The avida-core and avida-viewer libraries. The heart of Avida.
- Libraries - /libs
- Apto - /libs/apto submodule
- Apto C++ tools library. Data structures and cross-platform support layer.
Contributing to the Repositories
There are two main ways to contribute code changes to the repositories of the Avida project. The community at large is encouraged to fork the repositories on GitHub and to submit pull requests as appropriate. More details about using GitHub is available on their site.
Core developers who have been granted direct push access will need to utilize the authenticated remote repository path. The authenticated repository is
email@example.com:devosoft/avida.git. If you are working from a standard clone of the source code, you may update your push URLs with the following commands:
$ git remote set-url --push origin firstname.lastname@example.org:devosoft/avida.git