-
-
Notifications
You must be signed in to change notification settings - Fork 27
Windows Build Instructions
mcoms edited this page Mar 21, 2023
·
34 revisions
DISCLAIMER: If you are not a developer, building the game from source is not what you want. Use the pre-built Releases. Also, building this on Linux, while possible, is not covered here. Please let us know if you get it to work!
- Requirements:
- Have the following set:
-
Environment variables:
Name Value PreferredToolArchitecturex64 - Registry keys:
Path Name Type Data HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}DefaultProjectExtensionstring (REG_SZ) vcproj
-
Environment variables:
- curl (included with Windows 10 build 17063 or later)
-
Visual Studio 2022. The required installation components are:
- Desktop development with C++
- C++ MFC for latest v143 build tools (x86 & x64)
- Have the following set:
- Open
Developer Command Prompt (or PowerShell) for VS 2022. - Clone the repository. For example, with git:
git clone https://github.com/mastercomfig/team-comtress-2.git --recurse-submodules- If you already cloned the project and forgot
--recurse-submodules, you can clone them by runninggit submodule update --init.
- If you already cloned the project and forgot
-
cdintoteam-comtress-2/src. - Run the following commands:
.\download_libs.bat.\creategameprojects.bat - Open
.\games.sln. - Build the VS solution.
- The executables are placed at:
Project Path Client (TF)..\game\hl2.exeServer (TF)..\game\srcds.exe
- Copy the contents of the
game_clean/copyfolder intogame/. - Copy your current TF2 installation to
..\game(relative to your repository, outside of it), skip replacing files. - To setup debugging in Visual Studio:
-
Client (TF)(hl2.exe):- Right click
Client (TF), go toProperties > Configuration Properties > Debugging, and set the following:Command$(SolutionDir)..\game\hl2.exeCommand Arguments-steam -game tf -insecure -allowdebugWorking Directory$(SolutionDir)..\game- Note: Paths here are relative to your copy of the repository (same place where
games.slnis located).
- Note: Paths here are relative to your copy of the repository (same place where
- Right click
Client (TF)and chooseSet as Startup Project.
- Right click
-
Server (TF)(srcds.exe):- Right click
Server (TF), go toProperties > Configuration Properties > Debugging, and set the following:Command$(SolutionDir)..\game\srcds.exeCommand Arguments-game tf -console -nomaster -insecure -maxplayers 32 +sv_lan 1 -allowdebugWorking DirectorySame as Client (TF).- Note: Paths here are relative to your copy of the repository (same place where
games.slnis located).
- Note: Paths here are relative to your copy of the repository (same place where
- Right click
Server (TF)and chooseSet as Startup Project.
- Right click
See the Valve Developer Wiki for another explanation of the last two steps.
| Option | Description |
|---|---|
-sw |
Force windowed mode. (Same as -startwindowed, -window, and -windowed) |
-border |
Enable window borders. |
-w WIDTH -h HEIGHT
|
Set the resolution. (Same as -width and -height) |
+map MAPNAME |
Automatically launch a map on startup. |