Skip to content

[Guide] How to succesfully compile and run on windows. #356

Open
@maksw2

Description

@maksw2

This guide will tell you how to prepare, compile and run build game.

  1. Install visual studio 2017 or 2022 with vs 2017 build tools, git or github desktop and python 3
  2. Cloning
    a. clone with git: git clone https://github.com/nillerusr/source-engine.git --recursive
    b. clone with github desktop.
  3. Go into command prompt and run these commands:
    waf.bat configure -T release --prefix=hl2 --build-games=hl2 --disable-warns
    waf.bat build -p -v
    waf.bat install
  4. now you have a directory called "hl2" with all binaries
  5. copy hl2 and platform from your hl2 install (steam) (skip overwriting files) (if you build any other game also copy it's folder)
  6. double click on hl2_launcher.exe

OTHER IMPORTANT THINGS

  1. want voice chat? add --enable-opus to configure
  2. change build game? change --prefix and --build-games in configure
    hl1 = Half-Life 1: Source
    hl2 = Half-Life 2 // Default - This will be selected if you don't specify a game
    episodic = Half-Life 2 Episode 1
    ep2 = Half-Life 2 Episode 2 // Do not build for ep2, use episodic instead.
    hl2mp = Half-Life 2: Deathmatch
    dod = Day of Defeat
    cstrike = Counter-Strike: Source
    portal = Portal
  3. black screen when starting a game? copy shaders from half-life 2 (black screen after loading #350)
  4. need 32 bit build? add --32-bits to configure
  5. need debug? change -T release to -T debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions