I24 Server Setup: Difference between revisions
From OuroDev
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Required Software == | == Required Software == | ||
* Visual Studio 2010 Professional or Visual Studio 2019 with the 2010 toolchain configured | * [http://download.microsoft.com/download/D/B/C/DBC11267-9597-46FF-8377-E194A73970D6/vs_proweb.exe Visual Studio 2010 Professional] or Visual Studio 2019 with the 2010 toolchain configured | ||
* SQL Server 2012 or later (Express is good enough for development) | * SQL Server 2012 or later (Express is good enough for development) | ||
* | :* [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express SQL Server 2017 Express Edition] | ||
* [https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 SQL Server Management(SSMS)] | * [https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017 SQL Server Management(SSMS)] | ||
* [https://git-scm.com/download/win Git for Windows] or [https://desktop.github.com/ GitHub Desktop] | * [https://git-scm.com/download/win Git for Windows] or [https://desktop.github.com/ GitHub Desktop] | ||
* Download the [magnet:?xt=urn:btih:n642zelj2se2yn2ovmfy2z74tyyf7scs&dn=City%20of%20Heroes&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce Issue 24 client and data files] - this is ''not'' the SCORE client/data. | |||
* Download [magnet:?xt=urn:btih:CCCE574F7F89229B0FC2EF8AD898BE451864863A&dn=CoHDev_Source_Files_Current%28Updated%29.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce CoHDev_Source_Files_Current(Updated).zip]. | |||
* Download [magnet:?xt=urn:btih:8CE9DE8ECCF29B899B247512F1082F20B59DC4B2&dn=ServerData.7z&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce ServerData.7z]. | |||
* Clone the [https://git.ourodev.com/CoX/Source/ Cox/Source repository]. | |||
== Install SQL Server 2017 Express == | == Install SQL Server 2017 Express == | ||
Line 25: | Line 29: | ||
:: Eventually it will ask you to reboot the system. Might as well as do that now. | :: Eventually it will ask you to reboot the system. Might as well as do that now. | ||
::: [[File:SSMS Install - 3.png|thumb|none]] | ::: [[File:SSMS Install - 3.png|thumb|none]] | ||
== Install GitHub Desktop and Acquire Source == | == Install GitHub Desktop and Acquire Source == | ||
Line 51: | Line 40: | ||
: Start a powershell prompt as administrator | : Start a powershell prompt as administrator | ||
: Enter "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine" into the terminal and type "A" to auto accept all. | : 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, open cmd and run {{ms|C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat}}. | |||
: From this command prompt, run: {{ms|powershell}} | |||
:: [[File:CoX-Build-1.png|thumb|none]] | :: [[File:CoX-Build-1.png|thumb|none]] | ||
: Naviate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1 | : Naviate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1 | ||
Line 56: | Line 49: | ||
: Begin building City of Heroes by running ".\build.ps1" | : Begin building City of Heroes by running ".\build.ps1" | ||
:: [[File:CoX-Build-3.png|thumb|none]] | :: [[File:CoX-Build-3.png|thumb|none]] | ||
: Eventually the build will finish(On average takes at least 40 minutes to build) | |||
:: [[File:CoX-Build-4.png|thumb|none]] | |||
: Now build AuthServer(C:\GitHub\CoX\Source\AuthServer\src\AuthServer\AuthServer.sln) | |||
== Setup Server Files == | |||
: Create a directory in ''C:\GitHub\CoX\Source\bin'' called ''data''. | |||
:: Open ''ServerData.7z'' and extract all files into ''Source\bin\data'' (the newly created directory). | |||
:: Open ''CoHDev_Source_Files_Current(Updated).zip''. | |||
::: Extract "i24 Server and Client Piggs (extracted with CoHTools)" into ''Source\bin\data''. | |||
::: Copy ''maps.db'' from "map.db (modified, working on current VS2010 build)" and place it in ''Source\bin\data\server\db'', overwriting the old maps.db | |||
:: Copy the ''piggs'' folder from your i24 client directory and place them in ''Source\bin\''. You should end up with ''Source\bin\piggs\'' populated. | |||
: Create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (''C:\CoH_Data\attributes''). | |||
:: Run this in a command prompt: | |||
::: {{ms|cd Source\bin}} | |||
::: {{ms|.\mapserver.exe -productionmode -templates}} | |||
:: Copy all files from ''C:\CoH_Data\attributes'' and place them into ''Source\bin\data\server\db\templates''. | |||
: Open ''Source\DBSchemas'' and execute all the .sql files in the directory. You may need to change the file path -- anywhere works. Drop old database references before if there are any. | |||
== Server Configuration == | |||
: Follow [[I25_Server_Setup#i25_Configuration_Files]] until we come up with an i24-optimized guide. | |||
:: Adjust the configuration files in ''Source\bin\data\server\db'' to utilize the correct database connections. | |||
== Launch Client and Server == | |||
: Navigate to "C:\GitHub\CoX\Source\bin" and inside you should see "CityofHeroes.exe". | |||
:: Right click on it and towards you bottom you'll see "Create Shortcut". | |||
: A new shortcut should have appeared. Right click on it and go to properties. | |||
::: [[File:CoX-Build-5.png|thumb|none]] | |||
:: Add the follow parameter to your shortcut's target. | |||
::: <syntaxhighlight lang="text"> -db 127.0.0.1 -console -project "Ouroboros" </syntaxhighlight> | |||
::: [[File:CoX-Build-6.png|thumb|none]] | |||
: Start DBServer.exe and then Launcher.exe. This can be done simply by double clicking on them. | |||
:: Once these are both fully booted use your new shortcut to connect to the local server. | |||
; You could also use a .bat file to start everything up and in the correct order. | |||
:: The below is an example bat file to launch the DBServer, Launcher, and finally the Client. | |||
::: {| | |||
<syntaxhighlight lang="bat"> | |||
@echo off | |||
echo Starting DB Server | |||
START C:\GitHub\CoX\Source\bin\dbserver.exe | |||
TIMEOUT 2 | |||
echo Starting Launcher Server | |||
START C:\GitHub\CoX\Source\bin\launcher.exe | |||
TIMEOUT 2 | |||
echo Starting Chat Server | |||
START C:\GitHub\CoX\Source\bin\ChatServer.exe -noreserved | |||
TIMEOUT 2 | |||
echo Waiting for user input to start City of Heroes. Hit SPACE to continue. | |||
pause | |||
echo Starting City of Heroes Client | |||
START C:\GitHub\CoX\Source\bin\CityOfHeroes.exe -db 127.0.0.1 -console -project "Ouroboros" | |||
echo Everything should be launched! Go enjoy COH. | |||
</syntaxhighlight> | |||
|} | |||
: After the client starts up you'll be presented with a Login and Password screen. As auth is currently turned off you can enter anything you want in both. | |||
: There should only be one server listed. Go ahead and pick it then make a new character to test with! |
Latest revision as of 00:03, 2 June 2019
Required Software
- Visual Studio 2010 Professional or Visual Studio 2019 with the 2010 toolchain configured
- SQL Server 2012 or later (Express is good enough for development)
- SQL Server Management(SSMS)
- Git for Windows or GitHub Desktop
- Download the Issue 24 client and data files - this is not the SCORE client/data.
- Download CoHDev_Source_Files_Current(Updated).zip.
- Download ServerData.7z.
- Clone the Cox/Source repository.
Install SQL Server 2017 Express
- You can install SQL Server pretty much on the default settings.
- Select Basic under installation type:
- Agree to the EULA if you want to use SQL Server.
- Tell the server where to install files. I changed this for ease on my system.
- It should begin installing and eventually you should see "Install has completed successfully". Click close.
- Select Basic under installation type:
Install SQL Server Management(SSMS)
- You can install SQL Server Management on default settings.
- Select the location you'd like to install SSMS to. The default is fine.
- It will take awhile to install and you'll see a little progress bar letting you know whats going on
- Eventually it will ask you to reboot the system. Might as well as do that now.
- Select the location you'd like to install SSMS to. The default is fine.
Install GitHub Desktop and Acquire Source
- You need to download and install GitHub Desktop.
- Open GitHub Desktop, Select File, and Clone a Repository.
- Select the URL tab, enter "https://git.ourodev.com/CoX/Source.git" into the first blank and a path where to store the source locally such as "C:\GitHub\CoX\Source".
- Select the URL tab, enter "https://git.ourodev.com/CoX/Source.git" into the first blank and a path where to store the source locally such as "C:\GitHub\CoX\Source".
- After the download finishes you can close GitHub Desktop for now.
Build City of Heroes from Source
- 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, open cmd and run
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat
.
- From this command prompt, run:
powershell
- Naviate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1
- Begin building City of Heroes by running ".\build.ps1"
- Eventually the build will finish(On average takes at least 40 minutes to build)
- Now build AuthServer(C:\GitHub\CoX\Source\AuthServer\src\AuthServer\AuthServer.sln)
Setup Server Files
- Create a directory in C:\GitHub\CoX\Source\bin called data.
- Open ServerData.7z and extract all files into Source\bin\data (the newly created directory).
- Open CoHDev_Source_Files_Current(Updated).zip.
- Extract "i24 Server and Client Piggs (extracted with CoHTools)" into Source\bin\data.
- Copy maps.db from "map.db (modified, working on current VS2010 build)" and place it in Source\bin\data\server\db, overwriting the old maps.db
- Copy the piggs folder from your i24 client directory and place them in Source\bin\. You should end up with Source\bin\piggs\ populated.
- Create a directory in your C: drive called "CoH_Data" and another directory inside that, called "attributes" (C:\CoH_Data\attributes).
- Run this in a command prompt:
cd Source\bin
.\mapserver.exe -productionmode -templates
- Copy all files from C:\CoH_Data\attributes and place them into Source\bin\data\server\db\templates.
- Run this in a command prompt:
- Open Source\DBSchemas and execute all the .sql files in the directory. You may need to change the file path -- anywhere works. Drop old database references before if there are any.
Server Configuration
- Follow I25_Server_Setup#i25_Configuration_Files until we come up with an i24-optimized guide.
- Adjust the configuration files in Source\bin\data\server\db to utilize the correct database connections.
Launch Client and Server
- Navigate to "C:\GitHub\CoX\Source\bin" and inside you should see "CityofHeroes.exe".
- Right click on it and towards you bottom you'll see "Create Shortcut".
- A new shortcut should have appeared. Right click on it and go to properties.
- Add the follow parameter to your shortcut's target.
-db 127.0.0.1 -console -project "Ouroboros"
- Start DBServer.exe and then Launcher.exe. This can be done simply by double clicking on them.
- Once these are both fully booted use your new shortcut to connect to the local server.
- You could also use a .bat file to start everything up and in the correct order.
-
- The below is an example bat file to launch the DBServer, Launcher, and finally the Client.
@echo off echo Starting DB Server START C:\GitHub\CoX\Source\bin\dbserver.exe TIMEOUT 2 echo Starting Launcher Server START C:\GitHub\CoX\Source\bin\launcher.exe TIMEOUT 2 echo Starting Chat Server START C:\GitHub\CoX\Source\bin\ChatServer.exe -noreserved TIMEOUT 2 echo Waiting for user input to start City of Heroes. Hit SPACE to continue. pause echo Starting City of Heroes Client START C:\GitHub\CoX\Source\bin\CityOfHeroes.exe -db 127.0.0.1 -console -project "Ouroboros" echo Everything should be launched! Go enjoy COH.
- After the client starts up you'll be presented with a Login and Password screen. As auth is currently turned off you can enter anything you want in both.
- There should only be one server listed. Go ahead and pick it then make a new character to test with!