Volume 2 Build: Difference between revisions
From OuroDev
Created page with "== Required Software == * [http://download.microsoft.com/download/D/B/C/DBC11267-9597-46FF-8377-E194A73970D6/vs_proweb.exe Visual Studio 2010 Professional] or Visual Studio 20..." |
m Renamed a heading |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Required | == Summary == | ||
* [http://download.microsoft.com/download/D/ | :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. | ||
== Required software == | |||
* [https:// | * [http://download.microsoft.com/download/1/D/9/1D9A6C0E-FC89-43EE-9658-B9F0E3A76983/vc_web.exe Visual Studio 2010 Express] | ||
* [https://visualstudio.microsoft.com/downloads/ Visual Studio 2019], Community edition or higher | |||
* An application for working with Git, this page will be using [https://www.sourcetreeapp.com/ 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. | |||
== | == Important concepts == | ||
: You need to | * 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 [[OuroDev_Git_Workflow|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. | ||
::: [[File: | |||
: | == Create account for OuroDev Git == | ||
:You need to [https://git.ourodev.com/user/sign_up register] an account to access the OuroDev repositories. | |||
== Install SourceTree == | |||
#Download and install [https://www.sourcetreeapp.com/ 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. | |||
#: [[File:Sourcetree1.jpg|thumb|none]] | |||
#Enter the Source Path: {{ms|<nowiki>https://git.ourodev.com/CoX/Source</nowiki>}} This will prompt you for credentials, use the account you made for OuroDev Git above. | |||
#Enter the Destination Path: {{ms|<nowiki>C:\Git\CoX\Source</nowiki>}} | |||
#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. | |||
#: [[File:Sourcetree2.jpg|thumb|none]] | |||
#Click on the + at the top of the screen next to the Source tab to create a new tab. | |||
#: [[File:Sourcetree3.jpg|thumb|none]] | |||
#Click on the Clone button at the top of the page again, and repeat the steps but this time use {{ms|<nowiki>https://git.ourodev.com/CoX/Assets</nowiki>}} and {{ms|<nowiki>C:\Git\CoX\Assets</nowiki>}} for 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. | |||
#: [[File:Sourcetree4.jpg|thumb|none]] | |||
#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. | |||
#: [[File:Sourcetree5.jpg|thumb|none]] | |||
#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. | |||
#: [[File:Sourcetree6.jpg|thumb|none]] | |||
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 == | == Build City of Heroes from Source == | ||
: Start a powershell prompt as administrator | # Ensure you have MSBuild included in your path. This can typically be found in locations such as {{ms|C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin}} | ||
# Start a powershell prompt as administrator | |||
# Enter {{ms|Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine}} into 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 {{ms|C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat}}. | |||
# From this command prompt, run: {{ms|powershell}} | |||
# Navigate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1 | |||
#: [[File:CoX-Build-1.png|thumb|none]] | |||
# Begin building City of Heroes by running ".\build.ps1" | |||
#: [[File:CoX-Build-2.png|thumb|none]] | |||
# Eventually the build will finish (It can takeover 40 minutes to build, or as little as 15 depending upon your machine). | |||
: | #: [[File:CoX-Build-3.png|thumb|none]] | ||
#: [[File:CoX-Build-4.png|thumb|none]] | |||
# 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 {{ms|C:\GitHub\CoX\Source\AuthServer\src\AuthServer\AuthServer.sln}}). |
Latest revision as of 13:00, 1 July 2019
Summary
- 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.
Required software
- 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.
Important concepts
- 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.
Install SourceTree
- 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/Source
This will prompt you for credentials, use the account you made for OuroDev Git above. - Enter the Destination Path:
C:\Git\CoX\Source
- 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
https://git.ourodev.com/CoX/Assets
andC:\Git\CoX\Assets
for 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
- Enter
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
into 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:
powershell
- 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
C:\GitHub\CoX\Source\AuthServer\src\AuthServer\AuthServer.sln
).