Kisak-Strike: Gentoo Offensive – LWSS Blog – Basement Dweller
Kisak-Strike: Gentoo Offensive
100% Open Source CS:GO
Preface
Back in late April of 2020, the source code of CSGO and TF2 were leaked. Since then, I’ve been working with the CSGO source code personally on a project that I call Kisak-Strike: Gentoo Offensive.
The Goal of Kisak-Strike is 100% open source CS:GO from the 2017-era for perservation, enthusiast use, and long term maintenance.
This blog post tells a rough historical story of the project up to today - in chronological order.
The Leak
(Some may know about this part already, and can safely skip to the next section)
April 22nd, 2020 - Rumor of a CSGO source code leak spreads around various groups. At first this was hard to believe, but as the day progressed, a mega.nz link materialized and it was obviously true.
The leaks come from a Valve fanatic youtuber known as the Valve News Network(VNN). I don’t really care for his videos much, but apparently his relationship with Valve is closer than he portrays in his videos.<br>VNN and his group of goons had gotten buddy-buddy enough with Valve to secure a Source Engine Partner relationship, something quite rare and normally only given to professional developers for games like: Titanfall, Insurgency, Vampire: The Masquerade, and a few others.
Anyone can use the Source Engine 2013 SDK, but it only contains headers for precompiled libraries. It isn’t possible (without binary hacks) to modify the behavior/code of the engine because the Source Code is not included.<br>A Partner relationship is more advanced and grants access to the Source Engine Source.
The partner build isn’t complete however. Valve thought that leaks were a possibility so they made sure to cut out sensitive bits of information. There are also 3rd party libraries, like Scaleform Flash UI, where Valve cannot give out the Source Code and instead give out precompiled-blobs.
Opening the Leak
What exactly did we get in the leak? Let’s see…
There’s 2 folders to focus on - (which are initially contained in full.7z)
cstrike15_src - CSGO
hl2_src - TF2
There’s also a concept game here called FStop. Can’t say I was too interested in it, but while eyeballing it again for this post, I noticed it has some deferred rendering stuff in it that could be cool.
There’s some boring chat logs and a Dota Merchandise concept, and lastly a note from the leaker himself.
full.zip is the entire Counter Strike: Global Offensive source code as of Operation Hydra and the TF2 source code as of Jungle Inferno.<br>These were willingly held onto by a select few of people, (VNN, etc) and kept in a very small circle. It was some kind of medium for them to jerk off about having secret shit<br>Some weird schizoid managed to grab both these codebases during his work on some 900th attempt of a HL2 VR project and his major goal was to have this circle leak it to the public and fly to his girlfriends house (also involved in the valve community) and kill himself and her. Absolutely fucking insane, and it's something to have a beer over and laugh about with your source modding friends<br>Ended up getting arrested after she fleed and cops had been called.<br>A lot of interesting knowledge can be gained from these two codebases alone and a lot of resourceful information can come of it. Go wild!
Neat!
Building CSGO - Act I: VPC Hijinks
For Windows users, this part was probably pretty easy, there’s a .bat file to make it nice and easy to import into Visual Studio. But unfortunately for Linux gamers like myself, things were a bit rigged.
First off, let’s check out CreateSolution.bat
devtools\bin\vpc.exe /csgo +csgo_partner /mksln csgo_partner.sln<br>pause
This is where the first “villain” of the story is encountered.
VPC, the Valve Project Creator, is what’s used to build this project.<br>Basically, this is a custom build-system made by Valve in the Early 2000s back before CMake or Meson were popular. It has a high-level syntax that is translated into makefiles for each supported platform.
On Windows, this means it will create Visual Studio .vcproj files for you.
However on Linux, it will create a makefile for each project in their respective folders, and a master makefile csgo_partner.mak in the main directory.
As of this post, I count 73 build targets. A target is a static library, dynamic library, or executable file.
First, I had to recreate the hardcoded build tools path.
/** I created a full guide back when the leak was new and exiting (https://gist.github.com/LWSS/9d2cd3205d197545d64fd27ee897fd53) that I will be referring to. **/
mkdir -p /valve/bin64/<br>cd /valve/bin64/<br>ln -s $(which ar) ar<br>ln -s $(which gcc) gcc-4.6<br>ln -s $(which g++) g++-4.6<br>#this part comes from cryptopp<br>mkdir -p /valve/steam-runtime/bin<br>cd /valve/steam-runtime/bin<br>ln -s $(which g++) g++<br>ln -s $(which gcc) gcc
The Valve Cookbook explicitly calls for GCC 4.6.3, I believe this is because of the CXX11 String ABI changes that happened that year, but...