Volume 2 Build
Jump to navigation Jump to search
- This guide tells you how to get particular versions of the Ouroboros code from Git, and how to build and compile it. At the time of writing, this is being updated to run in Visual Studio 2019, but some components still require 2010.
- Visual Studio 2010 Express
- Visual Studio 2019, Community edition or higher
- An application for working with Git, this page will be using SourceTree as an example.
Note: Whichever Git application you choose, make sure that it supports use of tags, because that is how OuroDev marks certain versions of the code as being stable release versions. Some of the Git tools out there like GitHub Desktop do not support displaying or using tags.
- As a server owner, you need to at the very least understand the Git concepts of the develop branch, the master branch, and release tags. See the definitions of them here.
- As a programmer, if you will be submitting any new code at all, you will also need to have an understanding of the rest of that page.
Create account for OuroDev Git
- You need to register an account to access the OuroDev repositories.
- Download and install SourceTree. If you do not already have Git on your system, select to install a copy of it just for SourceTree to use.
- SourceTree will force you to create a BitBucket account and then click on BitBucket Client when you install it, but you can delete the BitBucket account from the application afterwards if you want. It isn't needed for the OuroDev project.
Clone Volume 2 repositories
- Cloning is the process of copying the files from the Git repositories onto your computer.
- In SourceTree, click on Clone at the top of the page.
- Enter the Source Path:
https://git.ourodev.com/CoX/SourceThis will prompt you for credentials, use the account you made for OuroDev Git above.
- Enter the Destination Path:
- Leave the rest as the defaults, and click on Clone. This will copy the latest files from the master branch to your destination path on your hard drive.
- Click on the + at the top of the screen next to the Source tab to create a new tab.
- Click on the Clone button at the top of the page again, and repeat the steps but this time use
C:\Git\CoX\Assetsfor the source path and destination path.
- Now you are set up with the latest versions of the Source and Assets master branches in C:\Git\CoX. You don't strictly need to have the Assets in order to build the Source files, but you do need the Assets files to run a server.
Selecting a release version
- For a server owner, while it is sometimes okay to work with the latest version of the master branch, it is a better idea to specifically select a stable released version for your server files. To do this in Git, you want to "checkout" the tag for the release you want to use.
- For a programmer, who will be working on the code instead of trying to run a server, you will instead want to be working with the develop branch as a starting point, and create your own feature branch from the develop branch.
- For a server owner, in each of the Source and Assets tabs:
- Click on the ">" twistie next to Tags to expand it, you will see the tagged final releases.
- Click on the most current release tag. It will highlight that version in the tree display.
- For a less confusing view of the tree, change the dropdown from viewing "all branches" to just viewing "current branch". This is now a view of the version changes that were made in the master branch. The tagged version you selected should still be highlighted.
- To change the files on your computer to being the tagged release version instead of the latest version of the master branch, double-click on the tag to "checkout" that version.
Checking out a tagged release will warn you that you are about to enter a "headless" state. This just means that your files will not be updated to the latest versions ("the head") if more changes are made to the master branch after the tagged version you selected. Which has implications if you are working on changing and delivering new code changes, but is just fine for if you are simply running a server and not intending to deliver new code changes to the repository.
Remember to checkout the tagged version for both the Source and the Asset tabs. To get any new updates that become available, you will need to checkout the new tag as above, and repeat the compile steps below.
Build City of Heroes from Source
- Ensure you have MSBuild included in your path. This can typically be found in locations such as
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
- Start a powershell prompt as administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachineinto the terminal and type "A" to auto accept all.
- Open a command prompt that is set up for your version of visual studio:
- If you have Visual Studio 2019 installed, then start a developer command prompt for Visual Studio (check the start menu).
- If you only have 2010 installed, then run cmd, and in the command prompt run
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat.
- From this command prompt, run:
- Navigate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1
- Begin building City of Heroes by running ".\build.ps1"
- Eventually the build will finish (It can takeover 40 minutes to build, or as little as 15 depending upon your machine).
- The Master Solution builds various 3rd party projects, the AuthServer and art tools. But these could be built individually if desired (such as the AuthServer