forked from 0xBADEAFFE/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-linux.txt
97 lines (88 loc) · 3.08 KB
/
build-linux.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
TITLE: X-Ray 1.6 build and setup on Linux
Required packages:
------
GLEW
FreeImage
LockFile
OpenAL
TBB
Crypto++
pugixml
Theora
OGG
SDL2
LZO
JPEG
Ubuntu 18.04 build dependencies:
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
Clone command:
```
git clone https://github.com/OpenXRay/xray-16.git --recurse-submodules
```
Build commands:
------
```
cd xray-16
mkdir bin
cd bin
cmake ..
make -jX # where X is the number of cores in your system
```
#To enable debugging:
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo # Building with Debug flag isn't supported now
#To use clang:
CC=clang CXX=clang++ cmake ..
#To enable all instruction for the local machine:
CFLAGS="-march=native" CXXFLAGS="-march=native" cmake ..
#To output log and error to different files:
make >out.log 2>error.log
Libraries (OLD LIST !!! ):
------
To build X-Ray Engine you'll need following libraries:
* BugTrap: https://github.com/Xottab-DUTY/BugTrap
* CryptoPP: https://github.com/weidai11/cryptopp
* FreeImage: http://freeimage.sourceforge.net
* FreeMagic: https://github.com/OpenXRay/FreeMagic
* GameSpy: https://github.com/nitrocaster/GameSpy
* libjpeg: https://github.com/OpenXRay/libjpeg
- Use "jpeg" as project root directory name for compatibility with CxImage
* libogg-1.1.4: http://xiph.org/downloads
* libtheora-1.1.1: http://xiph.org/downloads
* libvorbis-1.2.3: http://xiph.org/downloads
* Lightwave: https://github.com/OpenXRay/LightWave
* Luabind: https://github.com/Xottab-DUTY/luabind-deboostified
* LuaJIT: https://github.com/Xottab-DUTY/LuaJIT
* lzo: https://github.com/alexgdi/lzo
* Autodesk Maya 2008/2009 SDK: https://github.com/OpenXRay/maya
* Autodesk 3DS Max 6.0 SDK: https://github.com/OpenXRay/3dsmax
* NVAPI: https://developer.nvidia.com/nvapi
* OpenAutomate: https://developer.nvidia.com/openautomate
* pugixml: https://github.com/zeux/pugixml/
* zlib: http://zlib.net
All mentioned libraries are already in repository as submodules!
Setup:
------
- Install S.T.A.L.K.E.R Call of Pripyat using wine.
For example if you have a cd-rom you can type `wine setup.exe` to start installation.
It's recommended do not use path with spaces, for instance you can use "c:\cop" as
an installation path (it will be `~/.wine/drive_c/cop` path on your host linux machine).
- Install patch 1.6.02 (only for russian locale, worldwide release should have it included):
http://cop.stalker-game.ru/?page=patches#2
After building in the engine folder do (assuming you installed CoP in "c:\cop"):
```
mkdir ~/.wine/drive_c/cop/bin-linux-dbg # here will be installed binaries with dbg symbols
make DESTDIR=~/.wine/drive_c/cop/bin-linux-dbg install
cd ~/.wine/drive_c/cop/bin-linux-dbg
```
if you want to debug the game you need to prevent input grabbing:
```
setxkbmap -option grab:break_actions
```
now you can run the game using
```
./xr_3da.sh -fsltx ../fsgame.ltx
```
or if you want to debug using gdb:
```
DEBUGGER="gdb --ex=r --args" ./xr_3da.sh -fsltx ../fsgame.ltx
```