Created
April 29, 2020 18:37
-
-
Save LWSS/9d2cd3205d197545d64fd27ee897fd53 to your computer and use it in GitHub Desktop.
wip cstrike building instructions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################### INSTALLING GCC 4.6.3( OPTIONAL AND NOT RECOMMENDED! SKIP THIS ) ####################### | |
mkdir -p /opt/gcc-4.6/ | |
cd /opt/gcc-4.6/ | |
wget http://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.gz | |
tar -xvf gcc* | |
cd gcc-4.6.3/ | |
# we need to make some changes to get this running on new linux | |
# I have conveniently made some patches for you | |
# https://gist.github.com/LWSS/fae2d3c34205dc0074ddd9ed767e7e99 | |
### AFTER GCC PATCHES ### | |
./contrib/download_prerequisites | |
./configure --prefix=/opt/gcc-4.6 | |
make -j8 #adjust accordingly | |
make install #dont worry the configure prefix will make sure this goes into the /opt/gcc-4.6 folder | |
####################### SETTING UP TOOLS ####################### | |
*Incomplete package list* | |
sudo dnf install openal-devel freetype-devel libtool fontconfig-devel | |
mkdir -p /valve/bin64/ | |
cd /valve/bin64/ | |
ln -s $(which ar) ar | |
ln -s $(which gcc) gcc-4.6 | |
ln -s $(which g++) g++-4.6 | |
#this part comes from cryptopp | |
mkdir -p /valve/steam-runtime/bin | |
cd /valve/steam-runtime/bin | |
ln -s $(which g++) g++ | |
ln -s $(which gcc) gcc | |
#put this bash script in /usr/local/bin as "p4" | |
#p4 is pretty useless for us, this is just to get rid of errors | |
``` | |
#!/bin/bash | |
#echo "$@" >> /tmp/p4req.txt # logs arguments passed to a file. | |
``` | |
######################## PREBUILD - cryptopp ######################## | |
You need to build cryptopp in ./external/crypto++-5.61 this is a custom fork edited by valve, you cannot use your own currently. | |
in ./external/crypto++-5.61, the makefile is called "GNUmakefile", edit the first line and add "-fpermissive -D_GLIBCXX_USE_CXX11_ABI=0" in CXXFLAGS | |
This makefile is badly written so you need a couple hacks to get it to recognize you are 64bit and not on Sun OS. | |
To build: | |
ISX64=1 IS_SUN_CC=0 make libcryptopp.a -j3 | |
``` This error is normal! The last build step of copying out is hard-coded by valve. | |
cp: cannot create regular file '../../lib/ubuntu12_64/release/libcryptopp.a': No such file or directory | |
make: *** [GNUmakefile:202: libcryptopp.a] Error 1 | |
``` | |
afterwards you should have a libcryptopp.a, copy & rename it to cstrike15_src/lib/linux64/release/libcryptopp_client.a, Create this folder if needed | |
######################## PREBUILD - libSDL2_mixer ######################## | |
This library is missing! We will need to obtain it. | |
cd ./external/ #lets put this in external. | |
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.zip | |
unzip SDL2_mixer-2.0.4.zip | |
rm SDL2_mixer-2.0.4.zip | |
cd SDL2_mixer-2.0.4/ | |
mkdir build | |
cd build | |
../configure --prefix=$(pwd) #This project is in pure C, so we don't need our cxx11_Abi changes. | |
make -j4 | |
make install # this will generate the files we need. | |
cp lib/libSDL2_mixer.a ../../../lib/common/ | |
######################## PREBUILD - libtcmalloc ######################## | |
This library is also missing! Don't worry we can build it. | |
*** No rule to make target '../thirdparty/gperftools-2.0/.libs/x86_64/libtcmalloc_minimal.so', needed by '../../game/csgo_linux64'. Stop. | |
cd ./thirdparty/ | |
wget https://github.com/gperftools/gperftools/archive/gperftools-2.7.zip | |
unzip gperftools-2.7.zip | |
rm gperftools-2.7.zip | |
mv gperftools-gperftools-2.7/ gperftools-2.0 | |
cd gperftools-2.0 | |
./autogen.sh | |
./configure --prefix=$(pwd) | |
make -j3 | |
for some reason google decides to put these in a folder called .libs | |
mkdir -p ../../../game/bin/linux64 | |
cp ./.libs/libtcmalloc_minimal.so.4.5.3 ../../../game/bin/linux64/libtcmalloc_minimal.so.4 | |
cp ../../../game/bin/linux64/libtcmalloc_minimal.so.4 ../../../game/bin/linux64/libtcmalloc_minimal.so.0 #these two are the same - checked in retail. | |
older gperftools used to make another folder... | |
mkdir -p ./.libs/x86_64 | |
cp ./.libs/libtcmalloc_minimal.so ./.libs/x86_64 | |
######################## PREBUILD - libPNG ######################## | |
This library is in ./thirdparty/ | |
cd ./thirdparty/libpng-1.5.2/ | |
make -f scripts/makefile.linux | |
cp libpng.a ../../lib/linux64/release/ | |
######################## PREBUILD - libz ######################## | |
This library is in ./thirdparty/. Valve left us a README.valve here. | |
*** No rule to make target '../../lib/public/linux64/libz.a', needed by 'obj_Client_CSGO_linux64_client/release/client_client.so'. Stop. | |
cd ./thirdparty/zlib-1.2.5/ | |
chmod +x configure | |
CC="$(which gcc) -fPIC" ./configure | |
make -j4 | |
cp libz.a ../../lib/public/linux64/ | |
######################## BUILDING cstrike15 ######################## | |
# The first time vpc is ran, it will compile from source. | |
# Keep this command in mind, anytime you make changes to a vpc file you will need to run it again. | |
./devtools/bin/vpc /csgo /f +csgo_partner /no_scaleform -dedicated_main -datamodel -stdshader_dbg -game_controls -movieobjects /mksln csgo_partner.sln /linux64 | |
chmod +x -R ./devtools/ | |
# This makefile really sucks. Basically MAKE_JOBS is how many projects it will build at once. -j is for how many threads per project. | |
# However it doesn't take into account the dependencies so you will have to do MULTIPLE BUILD SWEEPS to get this shit to build. | |
# Also it will build with 1 core sometimes no matter what. | |
MAKE_JOBS=1 make -f csgo_partner.mak -j1 # build with 1 core for now, so you can check errors | |
######################## Post Build ######################## | |
#Copy the entire 731 asset depot over | |
#We will do part of 734 for a minimal dependance on botnet bins | |
#Files that are missing from our linux64 build. (./bin/linux64/* - the other folder matches) - according to depot 734 | |
binkalnx64.asi | |
bsppack_client.so | |
filesystem_steam_client.so | |
libMiles.so | |
libphonon3d.so | |
libSDL2-2.0.so.0 #probably in system | |
libsteam_api.so | |
libtogl_client.so #probably static linked | |
matchmaking_ds_client.so #Did not build | |
mp3lnx64.asi | |
mssmp3.asi | |
scaleformui_client.so | |
shaderapidx9_client.so #Not sure. We seem to have shaderapiempty_client.so instead. | |
vaudio_celt_client.so | |
vaudio_miles_client.so | |
vphysics_client.so | |
#Files added from 734(binary) depot | |
./bin/map_publish/* - (FOLDER which seems to contain some vgui assets) | |
./csgo.sh | |
libsteam_api.so | |
libtogl_client.so #this is on github, we can probably build this | |
libphonon3d.so #proprietary HRTF 3d audio system. | |
vphysics_client.so #proprietary Havok physics system. | |
scaleformui_client.so #proprietary Scaleform flash UI, this is needed by main menu even if we build /no_scaleform | |
shaderapidx9_client.so | |
######################## Troubleshooting ######################## | |
DEBUGGER=gdb ./csgo.sh | |
DEBUGGER=lldb ./csgo.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment