Source Compile
(Previously, SourceOnArm)
(Previously, SourceOnArm)
Note for New Installs:
The following prerequisites need to be installed for Debian/Ubuntu-based Linux.
sudo apt install -y libsdl2-dev libfreetype6-dev libfontconfig1-dev libopenal-dev libjpeg-dev libpng-dev libcurl4-gnutls-dev libbz2-dev libedit-dev python3
The following are for Windows 7+ based machines(they are links, just click on them!)
Python 3.8.10
Visual Studio 2017 Professional(Install the "Desktop development with C++" Preset)
Git(just use it in the Visual Studio to download the project)
NOTE:IN MY(the writer's) PERSONAL EXPERIENCE, this project CANNOT be compiled on an x86 machine and must be cross compiled for x86 from an x64 machine to get a 32-bit build.
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 games listed below that you wanna play with this decomp.
3, go to your steam library and 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
My deepest apologies for this inconvenience but unfortunately this is how it has to be done.
then obtain the source source code using this command on linux
git clone https://github.com/nillerusr/source-engine.git --recursive --depth 1;cd source-engine
on windows just use Visual Studio's Git implementation to fetch the github link above.
To compile Source engine and HL2 64bit
./waf configure -T release --prefix=out/;./waf build;./waf install
NOTE: On Windows this MUST BE DONE IN POWERSHELL. no-one know why it doesn't work in CMD.
Note: Once again, on windows, you may need to seperate each command, also, use .\waf.bat instead of just ./waf in windows
To compile only certian game's libs (doesn't required nuking directory)
./waf configure -T release --build-games=(GameNameHere) --prefix=out/;./waf build --target=client,server;./waf install
Valid Games are as follows
HL2(Default) = hl2
Half-Life 2: Deathmatch = hl2mp
Half-Life 2: Episode 1 = episodic
Half-Life 2: Episode 2 = ep2
Half-Life: Source = hl1
Day of Defeat: Source = dod
Team Fortress 2 Classic = tf2classic
Portal = portal
Counter-Strike:Source = cstrike
An example of a one line install for HL2, portal, and CS:S would be as follows
./waf configure -T release --prefix=out/;./waf build;./waf install;./waf configure -T release --build-games=portal --prefix=out/;./waf build --target=client,server;./waf install;./waf configure -T release --build-games=cstrike --prefix=out/;./waf build --target=client,server;./waf install
Create a folder in Documents to store the finished game files for use and call it whatever you want to, for this though, I prefer SRCENG.
then copy the following from the other machine with steam to the folder in documents you just named.
SRCENG:
>hl2
>platform
>bin
if you are installing other games, copy the following additional folders per game
HL2E1
>episodic
HL2E2
>ep2
HL2DM
>hl2mp
Portal
>portal
Counter-Strike Source
>cstrike
Day of Defeat
>dod
TF2Classic
>tf
HL1Source
>hl1
then copy and overwrite ant of the original files with the files in the out folder in the source directory.
Download a the game Icon of your choice or from SteamGridDB and save it to /Documents/SRCENG/GameIcons(rename them for your convenience.)
IMPORTANT: In order to play any of the games at this point, you NEED to use the -game launch option with the internal folder name to select your game, I may release a superscript for both Linux and Windows that handles game launching, but if you are on Mac, you're SOL and for the time being, you should just create shortcuts with the launch options pre-set in them.
(Optional)Finally, create a Desktop shortcut by naming a file on the Desktop [Name].desktop and putting the following contents in it
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=[path-to-executable-with-flags]
Name=[game-name]
Comment=Play [game-name]
Icon=[path-to-image-file]
Now you're ready to play! just make sure to play at 640x480 and lowest graphics settings on pi4, on Pi5, you can max the settings except HDR and Anti-aliasing, both must be set to off.
RPi4 Overclock Settings(put on /boot/config.txt):
#OverclockSettings
over_voltage=6
arm_freq=2000
#DisplaySettings
hdmi_group=1
hdmi_mode=1
NOTE: the Pi5 does not need an overclock
NOTE: Overclocking above this point Will Void any warranty you have
Useful Software for Arm Linux
piKiss:
curl -sSL https://git.io/JfAPE | bash
Pi-Apps:
wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash
Last page update date: Mar 3rd 2026