-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_xu4.sh
More file actions
executable file
·59 lines (48 loc) · 1.52 KB
/
build_xu4.sh
File metadata and controls
executable file
·59 lines (48 loc) · 1.52 KB
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
#!/bin/bash
set -e
# cleanup old build
sudo rm -rfv /usr/local/lib/libboron* /usr/local/bin/boron /usr/lib/libfaun.* /usr/local/share/man/man1/boron.*
# Basic dependencies
sudo apt-get update
sudo apt-get install -y \
git build-essential autotools-dev libpng-dev libvorbis-dev libpulse-dev \
libxcursor-dev libsdl2-dev libxml2-dev \
libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev \
libwayland-dev libxkbcommon-dev libglfw3-dev libglfw3-wayland
# Clean cache
sudo apt-get clean
# Clone and build boron
git clone https://git.code.sf.net/p/urlan/boron/code urlan-boron-code
cd urlan-boron-code
./configure
make
sudo make install
# Link and configure Boron library
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/boron.conf
sudo ln -s /usr/local/lib/libboron.so.2.96.0 /usr/local/lib/libboron.so
sudo ldconfig
# Clone xu4 engine
cd ..
git clone https://github.com/xu4-engine/u4.git
# Move boron headers to expected place if necessary
mkdir -p u4/src/boron
cp urlan-boron-code/include/* u4/src/boron/
# Prepare faun submodule
cd u4/src/faun
git submodule update --init
./configure --no_flac
make
sudo make DESTDIR=/usr install
# build xu4
cd ../..
./configure --glfw
make download
make mod
make
sudo make install
# copy needed files
sudo install -D -m 755 src/xu4 /usr/bin/xu4
sudo install -D -m 644 render.pak /usr/share/xu4/render.pak
sudo install -m 644 u4upgrad.zip ultima4.zip Ultima-IV.mod U4-Upgrade.mod /usr/share/xu4
echo "Setup complete. Run the game with xu4"
echo "You might need to run with: MESA_GL_VERSION_OVERRIDE=3.3 xu4"