I24 Server Setup: Difference between revisions

From OuroDev
Asuffield (talk | contribs)
No edit summary
Line 29: 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]]
== Configure MSBuild Environmental Variable ==
: Click the start button and type "environmental variable". It should be the first entry saying "edit environmental variables for your account"
:: Click "Environment Variables" at the bottom of the new window.
::: [[File:Enviro-Variable-1.png|thumb|none]]
:: Click "New" under "User variables for YOURUSERNAME"
::: [[File:Enviro-Variable-2.png|thumb|none]]
:: Click "New" on the "Edit environmental variable" window and add the location to your MSBuild.
::: For me MSBuild was location: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
::: [[File:Enviro-Variable-3.png|thumb|none]]
:: Click Ok on both windows to close them out.
: Hit the start button and type "CMD". Command Prompt should be the first thing listed.
: Type "MSBuild" into the command prompt and you should receive an error letting you know its setup.
:: [[File:Enviro-Variable-4.png|thumb|none]]


== Install GitHub Desktop and Acquire Source ==
== Install GitHub Desktop and Acquire Source ==
Line 55: 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.
: If you have Visual Studio 2019 installed, then start a developer command prompt for Visual Studio (check the start menu). For 2010, open cmd and run C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat. This will set up all the environment variables to run the build.
: From this command prompt, run 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

Revision as of 10:50, 27 May 2019

Required Software

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.

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.

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".
Error creating thumbnail: File missing
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.
If you have Visual Studio 2019 installed, then start a developer command prompt for Visual Studio (check the start menu). For 2010, open cmd and run C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat. This will set up all the environment variables to run the build.
From this command prompt, run powershell
Error creating thumbnail: File missing
Naviate to "C:\GitHub\CoX\Source\MasterSolution" and run build.ps1
Error creating thumbnail: File missing
Begin building City of Heroes by running ".\build.ps1"
Error creating thumbnail: File missing
Eventually the build will finish(On average takes at least 40 minutes to build)
Error creating thumbnail: File missing
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 Source/bin/mapserver.exe -productionmode -templates in a command prompt.
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.
Error creating thumbnail: File missing
Add the follow parameter to your shortcut's target.
 -db 127.0.0.1 -console -project "Ouroboros"
Error creating thumbnail: File missing
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!