Skip to content

Commit 392d1b0

Browse files
committed
Update build-linux.txt.
1 parent fcea4a1 commit 392d1b0

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

doc/howto/build-linux.txt

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,24 @@ JPEG
1919
Ubuntu 18.04 build dependencies:
2020
sudo apt install git cmake libglew-dev libfreeimage-dev liblockfile-dev libopenal-dev libtbb-dev libcrypto++-dev libpugixml-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libncurses5-dev libreadline-dev
2121

22+
Clone command:
23+
```
24+
git clone https://github.com/OpenXRay/xray-16.git --recurse-submodules
25+
```
26+
2227
Build commands:
2328
------
29+
```
2430
cd xray-16
2531
git submodule update --init --recursive
26-
mkdir bin && cd bin
32+
mkdir build
33+
cd build
2734
cmake ..
28-
make
35+
make -jX # where X is the number of cores in your system
36+
```
2937

3038
#To enable debugging:
31-
cmake .. -DCMAKE_BUILD_TYPE=Debug
39+
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo # Building with Debug flag isn't supported now
3240
#To use clang:
3341
CC=clang CXX=clang++ cmake ..
3442
#To enable all instruction for the local machine:
@@ -63,13 +71,28 @@ All mentioned libraries are already in repository as submodules!
6371

6472
Setup:
6573
------
66-
- Install S.T.A.L.K.E.R Call of Pripyat
74+
- Install S.T.A.L.K.E.R Call of Pripyat using wine.
75+
For example if you have a cd-rom you can type `wine setup.exe` to start installation.
76+
It's recommended do not use path with spaces, for instance you can use "c:\cop" as
77+
an installation path (it will be `~/.wine/drive_c/cop` path on your host linux machine).
6778
- Install patch 1.6.02 (only for russian locale, worldwide release should have it included):
6879
http://cop.stalker-game.ru/?page=patches#2
69-
- Clone the repository (you should not download it as an archive)
70-
You can just push `Open in Desktop` if you are using Github Desktop.
71-
If you are using Git console, here's the command:
72-
`git clone https://github.com/OpenXRay/xray-16.git --recurse-submodules`
73-
- If you are using git client, make sure all submodules are initialized.
74-
Type this command in the Git console `git submodule update --init --recursive`
75-
- Now you can build the engine!
80+
81+
After building in the engine folder do (assuming you installed CoP in "c:\cop"):
82+
```
83+
mkdir ~/.wine/drive_c/cop/bin-linux-dbg # here will be installed binaries with dbg symbols
84+
make DESTDIR=~/.wine/drive_c/cop/bin-linux-dbg install
85+
cd ~/.wine/drive_c/cop/bin-linux-dbg
86+
```
87+
if you want to debug the game you need to prevent input grabbing:
88+
```
89+
setxkbmap -option grab:break_actions
90+
```
91+
now you can run the game using
92+
```
93+
./xr_3da.sh -fsltx ../fsgame.ltx
94+
```
95+
or if you want to debug using gdb:
96+
```
97+
DEBUGGER="gdb --ex=r --args" ./xr_3da.sh -fsltx ../fsgame.ltx
98+
```

0 commit comments

Comments
 (0)