Skip to content

Instantly share code, notes, and snippets.

@rabbl
Forked from tifasoftware/build.sh
Created November 24, 2023 08:26
Show Gist options
  • Save rabbl/c026a593b2ab0cc8e9e8bdd23b657a33 to your computer and use it in GitHub Desktop.
Save rabbl/c026a593b2ab0cc8e9e8bdd23b657a33 to your computer and use it in GitHub Desktop.
Building Source Engine for Apple Silicon
#!/bin/zsh
brew install sdl2 freetype2 fontconfig pkg-config opus libpng libedit
cd ~
mkdir ~/Documents/Gaming/
mkdir ~/Documents/Gaming/Half\ Life\ 2
mkdir ~/Documents/Gaming/Half\ Life\ 2\ Episodes
mkdir ~/Documents/Gaming/Portal
mkdir ~/Documents/Gaming/Half\ Life\ Source
export user=$(whoami)
git clone --recursive --depth=1 https://github.com/nillerusr/source-engine.git
cd source-engine
python3 waf configure -T release --64bits --prefix='' --build-games=hl2
python3 waf build
python3 waf install --destdir='../Documents/Gaming/Half Life 2'
python3 waf configure -T release --64bits --prefix='' --build-games=episodic
python3 waf build
python3 waf install --destdir='../Documents/Gaming/Half Life 2 Episodes'
python3 waf configure -T release --64bits --prefix='' --build-games=hl1
python3 waf build
python3 waf install --destdir='../Documents/Gaming/Half Life Source'
python3 waf configure -T release --64bits --prefix='' --build-games=portal
python3 waf build
python3 waf install --destdir='../Documents/Gaming/Portal'
cd ~/Documents/Gaming/Half\ Life\ 2
cd bin
yes | cp * /Users/$user/Library/Application\ Support/Steam/steamapps/common/Half-Life\ 2/bin/
cd ../hl2/bin
yes | cp * /Users/$user/Library/Application\ Support/Steam/steamapps/common/Half-Life\ 2/hl2/bin/
cd ../../../Half\ Life\ 2\ Episodes
yes | cp hl2_launcher /Users/$user/Library/Application\ Support/Steam/steamapps/common/Half-Life\ 2/hl2_osx
cd ./episodic/bin
yes | cp * /Users/$user/Library/Application\ Support/Steam/steamapps/common/Half-Life\ 2/episodic/bin/
cd ../../../Half\ Life\ Source
cd ./hl1/bin
yes | cp * /Users/$user/Library/Application\ Support/Steam/steamapps/common/Half-Life\ 2/hl1/bin/
cd ../../../Portal
yes | cp hl2_launcher /Users/$user/Library/Application\ Support/Steam/steamapps/common/Portal/hl2_osx
cd bin
yes | cp * /Users/$user/Library/Application\ Support/Steam/steamapps/common/Portal/bin/
cd ../portal/bin
yes | cp * /Users/$user/Library/Application\ Support/Steam/steamapps/common/Portal/portal/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment