Windows compilation cannot be done via cross compilation at this time, also of note, this can only be done on 64-bit windows for whatever reason in spite of all the tooling being able to run on 32-bit hardware.(no, no-one knows why it does not work.)
Legal Disclosure:
Since we are working with Leaked Source Code, you are NOT permitted to sell or redistribute any binaries you create with these instructions, also you will be required to provide a copy of your OWN LEGALLY OBTAINED GAME FILES from steam. I, James, the writer of this document bear NO responsibility for what anyone who follows these instructions does with the resulting Binaries.
PREREQUISITES(links)
Visual Studio 2017 Professional(Install the "Desktop development with C++" Preset)
Git(just use it in the Visual Studio to download the project)
Obtaining the Game Files
Currently, due to the HL2 20th Anniversary update, you need a PC to obtain the Pre-20th anniversary update game files by the following steps:
1, Buy Half-Life 2 on steam(you can skip this if you already own Half-Life 2.)
2, Buy any of the other supported games compatible with this decomp.
3, Go to your steam library and search for or locate Half-Life 2 on the side pane
4, Right click Half-Life 2 and click "Properties..."
5, Click "Game Versions & Betas" from the left pane of the new window and choose "steam_legacy" from the list
6, If HL2 was installed, let it "update", if not, install it.
7, Install all the additional games you want to add to your build, keep in mind that HL2's episodes are demoted to "Tools" in steam but if you want them, they must be installed separately.
Note: to access any game's files in steam, go to Properties...>Local Files>Browse, this is the same no matter the platform.
Compilation Steps
Note: These MUST be done in Powershell...
1, Use 'dir' and 'cd' to navigate to the project directory where the source code is.
2, Compile the Base Engine, including Half-Life 2 with this command set
> waf.bat configure -T release --prefix=out/
> waf.bat build
> waf.bat install
You should now have a base Half-Life 2 Game, but if you try running it now it will crash because it is missing critical game assets, we will deal with this later.
3, Compile additional Games, use the following skeleton and key to compile additional games:
> waf.bat configure -T release --build-games=______ --prefix=out/
Key:
HL2(Default) = hl2
Half-Life 2: Deathmatch = hl2mp
Half-Life 2: Episode 1/2 = episodic
Half-Life: Source = hl1
Day of Defeat: Source = dod
Team Fortress 2 Classic = tf2classic
Portal = portal
Counter-Strike:Source = cstrike
once you have all the newly compiled engine files for the games you wanna play, continue to the next step.
Stitching it together
for this last step, you will need to legally own all of the games you will be adding, place the files in the following folder structure for the next step:
Folder_Root
>hl2(from Half-Life 2)
>platform(from Half-Life 2)
>bin(from Half-Life 2)
if you want any additional games, add the following supported folders:
HL2E1
>episodic
HL2E2
>ep2
HL2DM
>hl2mp
Portal
>portal
Counter-Strike Source
>cstrike
Day of Defeat
>dod
TF2Classic
>tf
HL1Source
>hl1
then copy and overwrite any of the original files with the files in the 'out' folder in the final directory, at this point launching the "hl2_launcher.exe" file will crash, create a shortcut to it and modify the shortcut to add -dxlevel 91, this will resolve the crash but the game will require DirectX9 compatable hardware to run, if the target computer does not support DX9, then you are better off finding the game ISOs on sites like the internet archive.
Prettying up
the final thing to do is to find a more perminant place for these files, I prefer C:/users/(Current)/Documents/SrcEng myself, but to each their own.
if you did create that shortcut in the previous step, it will need to be redirected or recreated to/for the new folder.
in order to launch the other games, make a copy of the original shortcut you made, and add -game (GameFolder) as a launch argument where (GameFolder)'s possible options are listed in the previous step, this may also work for Source 2017 mods for the supported games although this is untested.
to make the builds feel more official, you can grab their game icons for the multitude of shortcuts you will be making from SteamGridDB, I personally place my icons in a subfolder called GameIcons, and I rename the icons for each individual game for ease of access, but it is up to you of how you sort your own filesystem.