-
-
Notifications
You must be signed in to change notification settings - Fork 27
Windows Build Instructions
lnx00 edited this page Nov 14, 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 PreferredToolArchitecture
x64
- Registry keys:
Path Name Type Data HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
DefaultProjectExtension
string (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/tf2-patches.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
-
cd
intoteam-comtress-2/src
. - Run the following commands:
.\download_libs.bat
.\createprojects.bat
- Open
.\everything.sln
. - Build the VS solution.
- The executables are placed at:
Project Path Client (TF)
..\game\hl2.exe
Server (TF)
..\game\srcds.exe
- Copy the contents of the
game_clean/copy
folder 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.exe
Command Arguments
-steam -game tf -insecure -allowdebug
Working Directory
$(SolutionDir)..\game
- Note: Paths here are relative to your copy of the repository (same place where
games.sln
is 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.exe
Command Arguments
-game tf -console -nomaster -insecure -maxplayers 32 +sv_lan 1 -allowdebug
Working Directory
Same as Client (TF)
.- Note: Paths here are relative to your copy of the repository (same place where
games.sln
is 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. |