Build Guide: Difference between revisions
From OuroDev
Line 30: | Line 30: | ||
- Copy all files from ''C:\CoH_Data\attributes'' and place them into ''Source\bin\data\server\db\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. | - 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. | ||
- Adjust the configuration files in ''Source\bin\data\server\db''. | - Adjust the configuration files in ''Source\bin\data\server\db'' to utilize the correct database connections. | ||
- Start ''Source\1-start-servers.bat'' -- if you are using "UseFakeAuth 1" in your servers.cfg, remove or comment out the line for AuthServer. Vice versa. | - Start ''Source\1-start-servers.bat'' -- if you are using "UseFakeAuth 1" in your servers.cfg, remove or comment out the line for AuthServer. Vice versa. | ||
Revision as of 14:51, 5 May 2019
Prerequisites
Make sure to download VS 2010 Professional as well as VS 2019. We'll be switching all projects over to 2019 at some point.
You'll also need a working Microsoft SQL Server and SQL Server Management Studio.
If you downloaded VS 2010 Express then you need to change any instance of `"afxres.h"` to `<Windows.h>`, as well as define IDC_STATIC as -1 where necessary.
If you don't download VS 2019 then you need to open MasterSolution.sln as a text file and change `12.00` at the top of the file to `11.00`.
- 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.
Building
- Open "Visual Studio Command Prompt (2010)" or "Developer Command Prompt for VS 2019". - Change the directory to Source/MasterSolution. - Run "powershell .\build.ps1". - Wait for all projects to successfully compile. Expect to wait between 10-20 minutes on a complete build with no previously generated files. - Decide now if you want to run an AuthServer. If so, build Source\AuthServer\src\AuthServer\AuthServer.sln.
Running Your Build
- Create a directory in 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 - 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. - Adjust the configuration files in Source\bin\data\server\db to utilize the correct database connections. - Start Source\1-start-servers.bat -- if you are using "UseFakeAuth 1" in your servers.cfg, remove or comment out the line for AuthServer. Vice versa.
Connecting to Your Server
- Run Source\bin\cityofheroes.exe -project coh -console - If using UseFakeAuth, append -db 127.0.0.1 - If using AuthServer, append -auth 127.0.0.1