-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·129 lines (118 loc) · 3.23 KB
/
install.sh
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
# RUNNER=1 ./install.sh
set -eo pipefail
[ -n "$RUNNER" ] && set -x
[ -d build ] && rm -fr build
mkdir build
cd build
if [ "$(uname)" = "Linux" ]; then
if [ -n "$RUNNER" ]; then
if grep -E "^ID=|^ID_LIKE=" /etc/os-release | grep -iq debian; then
sudo apt update
sudo apt upgrade -y
sudo apt install -y \
cmake \
build-essential \
python3-pip \
libudev-dev \
libgl-dev \
libx11-xcb-dev \
libfontenc-dev \
libxaw7-dev \
libxcomposite-dev \
libxcursor-dev \
libxdamage-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxmu-dev \
libxmuu-dev \
libxpm-dev \
libxrandr-dev \
libxres-dev \
libxss-dev \
libxtst-dev \
libxv-dev \
libxvmc-dev \
libxxf86vm-dev \
libxcb-render-util0-dev \
libxcb-xkb-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-shape0-dev \
libxcb-sync-dev \
libxcb-xfixes0-dev \
libxcb-xinerama0-dev \
libxcb-dri3-dev \
libxcb-util-dev \
libxcb-util0-dev
sudo pip3 install conan
if [ "$(dpkg --print-architecture)" = "arm64" ]; then
sudo apt install -y \
p7zip-full \
pkg-config \
libxkbfile-dev \
xkb-data \
uuid-dev
fi
elif grep "^ID=" /etc/os-release | grep -iq fedora; then
sudo dnf update -y
sudo dnf install -y \
cmake \
python3-pip \
libudev-devel \
libfontenc-devel \
libXaw-devel \
libXcomposite-devel \
libXdmcp-devel \
libXtst-devel \
libxkbfile-devel \
libXres-devel \
libXScrnSaver-devel \
libXvMC-devel \
xorg-x11-xtrans-devel \
xcb-util-wm-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
libXdamage-devel \
xcb-util-devel \
xkeyboard-config-devel \
systemd-devel \
libuuid-devel
sudo pip3 install conan
fi
fi
conan install -s compiler.libcxx=libstdc++11 \
.. --build=missing \
-c tools.system.package_manager:mode=install \
-c tools.system.package_manager:sudo=True
elif [ "$(uname)" = "Darwin" ]; then
brew install conan
conan install .. --build=missing \
-c tools.system.package_manager:mode=install \
-c tools.system.package_manager:sudo=True
else
pip3 install conan
conan install .. --build=missing \
-c tools.system.package_manager:mode=install \
-c tools.system.package_manager:sudo=True
fi
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j 4
if [ "$1" = "--installer" ]; then
[ -d Release ] && rm -fr Release
mkdir Release
mv r-type_client Release
mv r-type_server Release
cpack --config CPackConfig.cmake
cpack --config CPackSourceConfig.cmake
fi
[ -n "$RUNNER" ] && set +x
echo "__________ ________________.___._____________________"
echo "\______ \ \__ ___/\__ | |\______ \_ _____/"
echo " | _/ ______ | | / | | | ___/| __)_ "
echo " | | \ /_____/ | | \____ | | | | \\"
echo " |____|_ / |____| / ______| |____| /_______ /"
echo " \/ \/ \/ "