Debian Codegraph @

misc/linux/server_compile.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -e
4
5 export DBUILD_CLIENT="${DBUILD_CLIENT:-0}"
6 export DBUILD_SERVER="${DBUILD_SERVER:-1}"
7 export DUSE_HTTP="${DUSE_HTTP:-1}"
8 export DUSE_CODEC_OPUS="${DUSE_CODEC_OPUS:-1}"
9 export DUSE_VOIP="${DUSE_VOIP:-1}"
10 export DCMAKE_INSTALL_PREFIX="${DCMAKE_INSTALL_PREFIX:-~/ioquake3}"
11 IOQ3REMOTE="${IOQ3REMOTE:-https://github.com/ioquake/ioq3.git}"
12 CMAKE_OPTS="${CMAKE_OPTS:-}"
13
14 if ! [scip-shell system . . `[`. -x "$(command -v git)" ] || ! [scip-shell system . . `[`. -x "$(command -v cmake)" ]; then
15 echoscip-shell system . . echo. "This build script requires 'git' and 'cmake' to be installed." >&2
16 echoscip-shell system . . echo. "Please install them through your normal package installation system." >&2
17 exit 1
18 fi
19
20 echoscip-shell system . . echo. " This build process requires all of the ioquake3 dependencies necessary for an ioquake3 server.
21 If you do not have the necessary dependencies the build will fail.
22
23 Please post a message to https://discourse.ioquake.org/ asking for help and include whatever error messages you received during the compile phase.
24
25 We will be building from the git repo at ${IOQ3REMOTE}
26 The resulting binary will be installed to ${DCMAKE_INSTALL_PREFIX}
27
28 If you need to change these, please set variables as follows:
29
30 IOQ3REMOTE=https://github.com/something/something.git DCMAKE_INSTALL_PREFIX=~/somewhere $0"
31
32 BUILD_DIR="$(mktempscip-shell system . . mktemp. -d)"
33 trap "rm -rf $BUILD_DIR" EXIT
34
35 while truescip-shell system . . true.; do
36 read -p "Are you ready to compile ioquake3 from ${IOQ3REMOTE}, and have it installed into $DCMAKE_INSTALL_PREFIX? " yn
37 case $yn in
38 [Yy]*)
39 gitscip-shell system . . git. clone $IOQ3REMOTE $BUILD_DIR/ioq3
40 cd $BUILD_DIR/ioq3
41 cmakescip-shell system . . cmake. -S . -B build -DCMAKE_BUILD_TYPE=Release \
42 -DBUILD_CLIENT="$DBUILD_CLIENT" \
43 -DBUILD_SERVER="DBUILD_SERVER" \
44 -DUSE_HTTP="$DUSE_HTTP" \
45 -DUSE_CODEC_OPUS="$USE_CODEC_OPUS" \
46 -DUSE_VOIP="$USE_VOIP" \
47 -DCMAKE_INSTALL_PREFIX="$DCMAKE_INSTALL_PREFIX" \
48 $CMAKE_OPTS
49 cmakescip-shell system . . cmake. --build build
50 cmakescip-shell system . . cmake. --install build
51 exit
52 ;;
53 [Nn]*)
54 echoscip-shell system . . echo. "aborting installation."
55 exit
56 ;;
57 *)
58 echoscip-shell system . . echo. "Please answer yes or no."
59 ;;
60 esac
61 done