-
Notifications
You must be signed in to change notification settings - Fork 227
Source Engine (EN)
nillerusr edited this page Jan 25, 2023
·
4 revisions
Welcome to the Source Engine wiki!
- Install
git
and clone this repository withgit clone --recursive --depth 1
command.--recursive
key for init and update submodules on clone, and--depth 1
key for clone only one last commit from branch. - Add
i386
architecture to dpkg withdpkg --add-architecture i386
command. - Install
build-essential gcc-multilib g++-multilib pkg-config ccache
packages.
-
libsdl2-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libopenal-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libcurl4-gnutls-dev:i386 libbz2-dev:i386 libedit-dev:i386
for 64bit system. - You can use
libcurl4-openssl-dev
orlibcurl4-nss-dev
instead oflibcurl4-gnutls-dev
.
- If you want a voice chat support, add
--enable-opus
argument to WAF and follow this instructions. -
DO NOT INSTALL DEFAULT
libopus-dev
PACKAGE! This build of opus doesnt contains a custom modes support!! - Clone latest opus sources with
git clone --recursive --depth 1 https://github.com/xiph/opus
command andcd
to it. - Run
sudo apt update; sudo apt install automake autoconf libtool
. -
export CFLAGS="-m32" CPPFLAGS="-m32"
for 64bit system, required for 32bit engine build. - After basic configure script dependencies installation run
./autogen.sh && ./configure --enable-custom-modes && make -j$(nproc) && sudo make install
. - Now you can continue build engine.
- Install
git python gcc gcc-multilib sdl2 freetype2 fontconfig zlib bzip2 libjpeg libpng curl openal opus
. - For 32 bit install
lib32-gcc-libs lib32-sdl2 lib32-freetype2 lib32-fontconfig lib32-zlib lib32-bzip2 lib32-libjpeg lib32-libpng lib32-curl lib32-openal lib32-opus
- Follow common build instructions.
- Install MSVC 15.9 and Windows SDK from Visual Studio Installer. Or you can install full version of Visual Studio 2017 and use his MSVC 15.9.
- Install Python 3 and add it to Path.
- Build works for some reason only in PowerShell.
- Follow common build instructions.
- Install Xcode frop AppStore.
- Install Xcode build tools with
xcode-select --install
command. - Install HomeBrew.
- Run
brew install sdl2 freetype2 fontconfig pkg-config opus libpng libedit
- Follow common build instructions.
- Use
pkg ins python sdl2 freetype2 fontconfig curl pkgconf openal-soft jpeg-turbo png
. - Follow common build instructions.
- Using a WAF build system you need to install python. I've recommend to use Python 3.
- Run
./waf configure -T BUILDMODE
, whereBUILDMODE
isrelease
ordebug
. - On Windows you need to use
.\waf.bat
or run WAF script withpython3 waf
. - If waf says something like
/usr/bin/env: 'python': No such file or directory
usepython3
prefix before./waf
. - If you need a 64 bit build add
-8
or--64bits
argument to WAF.
- Just add
-d
option on project configure state. lol
- Download and extract Android NDK r10e from here.
- Download and extract CLANG 11 or use CLANG from LLVM repository for APT-based distros.
- Run
export ANDROID_NDK_HOME="PATH/TO/NDK/android-ndk-r10e"
andexport PATH="PATH/TO/CLANG/bin:$PATH"
orexport PATH="/usr/lib/llvm-11/bin:$PATH"
if you're use llvm.sh script. - Add to WAF args
--togles --android=armeabi-v7a-hard,host,21
.armeabi-v7a-hard
can be replaced withaarch64
for arm64 build, but you need to add-8
or--64bits
argument