Compiling - UberWaffe/OpenRA GitHub Wiki

If you just want to run a pre-built version of the code, see Installation.

Setting up a Development Environment

You will need a system that satisfies the hardware requirements for running OpenRA.

Git Commands

Setting up:

	git config --global user.name $YOU
	git config --global user.email [email protected]

Fork the repo on GitHub then clone it locally and set up your pushurl.

	git clone git://github.com/$YOU/OpenRA.git
	cd OpenRA
	git config remote.origin.pushurl [email protected]:$YOU/OpenRA.git

Now add upstream so you can track it:

	git remote add openra -f git://github.com/OpenRA/OpenRA.git

Do the same for any other repos you want to track.

Now sync with upstream:

	git fetch --all
	git checkout openra/bleed

To work on something:

	git checkout -b myfeature
	... hack, add, commit ...

Before publishing your changes it's a good idea to rebase them up to the latest upstream version:

	git fetch --all
	git rebase openra/bleed

Now test that it still works. If so publish your changes:

	git push origin myfeature

Test your changes

Tip: It is suggested to run in windowed mode, because the debugging experience is much nicer.

Windows

Copy all native DLLs from thirdparty\windows and common language interface DLLs from thirdparty into the root folder or type make dependencies in the command line (cmd.exe via Start → Run).

  • Open OpenRA.sln with Visual Studio 2012 (Express). Then Build → Build Solution. (F7) Alternatively, run make all on the command line using the PowerShell script.
  • Right click on OpenRA project in Solution Explorer → Properties. Change Single startup project into "OpenRA.Game".
  • And finally you can Debug → Start Without Debugging / Start Debugging. (F5)

Linux/Mac

In order to build and package OpenRA you will need to install the following dependencies. Most Linux distributions will include packages for these - Mac users should install these manually.

The preferred method of compiling the code is using make. MonoDevelop / Xamarin Studio are useful IDEs, but the xbuild configuration leaves much to be desired.

From a terminal in the OpenRA source directory:

  • Copy the thirdparty DLLs to the working directory: make dependencies
  • Build the source: make all
  • Run the game with: mono --debug OpenRA.Game.exe

Note: You can also change settings via command-line parameters like Game.Mod=ra.

⚠️ **GitHub.com Fallback** ⚠️