-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Compiling
If you just want to run a pre-built version of the code, see Installation.
In case you just want to run the developer version (but not do code changes), jump ahead to this section.
You will need a system that satisfies the hardware requirements for running OpenRA.
Setting up:
git config --global user.name $YOU
git config --global user.email you@example.com
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 git@github.com:$YOU/OpenRA.git
Now add upstream so you can track it:
git remote add upstream -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 upstream/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 upstream/bleed
Now test that it still works. If so publish your changes:
git push origin myfeature
Tip: It is suggested to run in windowed mode, because the debugging experience is much nicer.
Before compiling, run make.cmd in the main OpenRA directory, and then type dependencies
at the prompt. This will copy the windows-specific dlls from the thirdparty directory into the game root.
Using Visual Studio:
- Open OpenRA.sln with Visual Studio 2013/2012 (Community/Express). Then Build โ Build Solution (F6).
- Right click on the OpenRA project (Solution 'OpenRA') in Solution Explorer โ Properties. Change Single startup project into "OpenRA.Game".
- Start the game by going to Debug โ Start Without Debugging / Start Debugging. (F5)
Using the PowerShell script (make.cmd):
- Run make.cmd and choose the
all
option. - Run the created
OpenRA.exe
If you want to actually play with this self-compiled version, run make.cmd with the version
option. If you have downloaded the source tarball/.zip instead of using git, add the appropriate version string like this: make.cmd version release-yyyymmdd
.
OpenRA uses several external libraries to provide low-level functionality. Most systems will already include these, but if OpenRA fails to compile or run then you should make sure that these are available:
-
Mono framework (macOS: Do not install
mono
viabrew
. This will compile a 64bit-only version of mono but OpenRA needs 32bit mono) - SDL 2 (Linux only: OpenRA includes a custom macOS dylib)
- Lua 5.1 (Linux only: OpenRA includes a custom macOS dylib)
- NuGet (not required: OpenRA includes a custom fallback if not available)
- FreeType
- OpenAL
- curl
- unzip
- xdg-utils (Linux only)
- zenity (Linux only)
Check INSTALL.md for the exact package names on a variety of distros.
From a terminal in the OpenRA source directory:
-
make dependencies
will download and copy necessary thirdparty DLLs to the working directory and configure the paths to the system Lua library. -
Build the source:
make all
-
Run the game with:
launch-game.sh
ormono --debug OpenRA.Game.exe
-
If you want to actually play with this self-compiled version, run
make version
. If you have downloaded the source tarball/.zip instead of using git, add the appropriate version string like this:make version VERSION=release-yyyymmdd
.
Note: You can also change settings via command-line parameters like Game.Mod=ra
.
- No package for NuGet: The "NuGet" program is a relatively recent addition to the Linux world, so some older distributions may lack a package for it. In particular, the 14.04 LTS release of Ubuntu does not include it (as of February 2016). To compile OpenRA on those "older" releases, you have to use the mono packages from Xamarin's mono repository instead of the ones provided by your distro. Use the steps below as a guide. Note that if you follow them to the letter, all mono-related packages will be removed from your system without further confirmation. You have been warned!
dpkg -l mono* libmono* | awk '/^ii/{ print $2 }' | sudo xargs apt-get purge -y cli-common libgdiplus
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete nuget
mozroots --import --sync
Players ๐ฒ
- FAQ โ
- Installation ๐ฆ
- Game Content ๐ฟ
- Hotkeys and Stances ๐ฎ
- Strategies ๐
- Settings ๐ง
- Dedicated Server โพ
- RaspberryPi ๐
- Badges & Icons ๐ฅ
- Changelog ๐
Modders โ๏ธ
- Audio guide ๐
- Traits ๐
- Palettes and Remaps ๐จ
- World Coordinate System ๐
- Map scripting
- Lua-API ๐
- Conditions ๐
- Mapping ๐ง
- Pixelart ๐
Developers ๐ง
- Contributing โค๏ธ
- Compiling
- Hacking
- Coding Standard ๐
- Branches and Releases ๐
- Release Checklist โ
- Sequences
- Glossary
- Reverse engineering ๐
- License ยฉ๏ธ