-
Notifications
You must be signed in to change notification settings - Fork 50
How to build and run CivOne?
SWY1985 edited this page May 13, 2015
·
20 revisions
CivOne is being developed for .NET 4.0/Mono and it is intended to run on Windows, MacOS X and Linux. To build/run CivOne, you need the following:
- Visual Studio Code: https://code.visualstudio.com/
- .NET Framework 4.0 (Windows only): https://www.microsoft.com/en-us/download/details.aspx?id=17851
- Mono (Linux, MacOS, optional on Windows): http://www.mono-project.com/
After you've downloaded and installed the proper tools you can download or clone CivOne. In Visual Studio Code, choose File > Open Folder... Choose the folder where you downloaded CivOne. Now follow the platform specific instructions.
- Debugging is not yet supported in Windows.
- I have not tested this project in Visual Studio, only in Visual Studio Code, but it will probably work in Visual Studio without any issues.
- You can change the compiler by editing the "args" setting in ~/.settings/tasks.json. You can choose msbuild (.NET) or xbuild (Mono).
- You should have a PATH reference to msbuild (for .NET) or xbuild (for Mono). Open Computer Properties > Advanced system settings > Enviromental variables.
- msbuild: Add "C:\Program Files (x86)\MSBuild\12.0\Bin" (or similar, try to find MSBuild.exe in explorer) to the PATH variable
- xbuild: Add "C:\Program Files (x86)\Mono\bin" (or similar, try to find xbuild.bat in explorer) to the PATH variable You need to restart Visual Studio Code for the PATH settings to work.
- To build, press Ctrl+Shift+B
- To run, press Ctrl+Shift+T
- Alternatively, you can run build.bat from the command-line:
- To compile: build [msbuild|xbuild] build
- To run: build [msbuild|xbuild] run
- Visual Studio Code is currently only available for 64-bit Linux on Intel processors.
- You need to change the file ~/.settings/tasks.json to this:
{
"version": "0.1.0",
"command": "xbuild,
"args": ["CivOne.csproj"]
}
- To compile the project, press Ctrl+Shift+B.
- You can run and debug, the project by pressing F5, or by clicking the Debug icon in the toolbar (left) and pressing the Play button.
I do not own a Mac so I can not test this at the moment. If you've managed to get the project running on MacOS, please let me know how you did it so I can add instructions to the website.