2021-01-20 02:25:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
print_help() {
|
|
|
|
echo "usage: $0 [group]..."
|
|
|
|
echo
|
|
|
|
echo " available groups: "${!GROUPED_DEPS[@]}""
|
|
|
|
}
|
|
|
|
|
|
|
|
declare -rA GROUPED_DEPS=(
|
2022-07-31 18:02:32 +00:00
|
|
|
[gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config mold"
|
|
|
|
[clang]="binutils clang make cmake ccache curl unzip git pkg-config mold"
|
2023-04-15 20:41:29 +00:00
|
|
|
[coverity]="binutils clang-12 make cmake ccache curl unzip git pkg-config"
|
2023-04-15 17:09:57 +00:00
|
|
|
[gcc_preprocess]="
|
|
|
|
binutils
|
|
|
|
build-essential
|
|
|
|
clang
|
|
|
|
cmake
|
|
|
|
curl
|
|
|
|
gcc
|
|
|
|
git
|
|
|
|
libclang-dev
|
|
|
|
ninja-build
|
|
|
|
python3-clang
|
|
|
|
python3-pip
|
|
|
|
unzip
|
|
|
|
"
|
2021-01-20 02:25:46 +00:00
|
|
|
|
|
|
|
# Common dependencies for building OpenMW.
|
|
|
|
[openmw-deps]="
|
2023-04-25 19:27:17 +00:00
|
|
|
libboost-program-options-dev
|
2021-01-20 02:25:46 +00:00
|
|
|
libboost-system-dev libboost-iostreams-dev
|
2020-11-25 04:55:20 +00:00
|
|
|
|
2021-01-20 02:25:46 +00:00
|
|
|
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev
|
2023-12-24 14:44:50 +00:00
|
|
|
libsdl2-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools libopenal-dev
|
|
|
|
libunshield-dev libtinyxml-dev libbullet-dev liblz4-dev libpng-dev libjpeg-dev
|
|
|
|
libluajit-5.1-dev librecast-dev libsqlite3-dev ca-certificates libicu-dev
|
2024-04-14 04:17:10 +00:00
|
|
|
libyaml-cpp-dev libqt5svg5 libqt5svg5-dev
|
2021-01-20 02:25:46 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
# These dependencies can alternatively be built and linked statically.
|
2022-11-20 13:22:03 +00:00
|
|
|
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev libsqlite3-dev libcollada-dom-dev"
|
2021-05-21 15:07:55 +00:00
|
|
|
[clang-tidy]="clang-tidy"
|
2021-01-20 02:25:46 +00:00
|
|
|
|
|
|
|
# Pre-requisites for building MyGUI and OSG for static linking.
|
|
|
|
#
|
|
|
|
# * MyGUI and OSG: libsdl2-dev liblz4-dev libfreetype6-dev
|
|
|
|
# * OSG: libgl-dev
|
|
|
|
#
|
|
|
|
# Plugins:
|
|
|
|
# * DAE: libcollada-dom-dev libboost-system-dev libboost-filesystem-dev
|
|
|
|
# * JPEG: libjpeg-dev
|
|
|
|
# * PNG: libpng-dev
|
|
|
|
[openmw-deps-static]="
|
2022-01-31 07:57:08 +00:00
|
|
|
libcollada-dom-dev libfreetype6-dev libjpeg-dev libpng-dev
|
2021-01-20 02:25:46 +00:00
|
|
|
libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev
|
|
|
|
"
|
2022-02-19 00:06:04 +00:00
|
|
|
|
|
|
|
[openmw-coverage]="gcovr"
|
2022-06-05 23:10:33 +00:00
|
|
|
|
|
|
|
[openmw-integration-tests]="
|
|
|
|
ca-certificates
|
2023-01-29 20:43:30 +00:00
|
|
|
gdb
|
2022-06-05 23:10:33 +00:00
|
|
|
git
|
|
|
|
git-lfs
|
|
|
|
libavcodec58
|
|
|
|
libavformat58
|
|
|
|
libavutil56
|
2022-07-28 21:03:50 +00:00
|
|
|
libboost-iostreams1.74.0
|
|
|
|
libboost-program-options1.74.0
|
|
|
|
libboost-system1.74.0
|
2023-03-28 10:03:50 +00:00
|
|
|
libbullet3.24
|
2022-07-28 21:03:50 +00:00
|
|
|
libcollada-dom2.5-dp0
|
|
|
|
libicu70
|
2022-06-05 23:10:33 +00:00
|
|
|
libjpeg8
|
|
|
|
libluajit-5.1-2
|
|
|
|
liblz4-1
|
|
|
|
libmyguiengine3debian1v5
|
|
|
|
libopenal1
|
|
|
|
libopenscenegraph161
|
|
|
|
libpng16-16
|
|
|
|
libqt5opengl5
|
|
|
|
librecast1
|
|
|
|
libsdl2-2.0-0
|
|
|
|
libsqlite3-0
|
|
|
|
libswresample3
|
|
|
|
libswscale5
|
|
|
|
libtinyxml2.6.2v5
|
2023-11-10 17:37:07 +00:00
|
|
|
libyaml-cpp0.8
|
2022-06-05 23:10:33 +00:00
|
|
|
python3-pip
|
|
|
|
xvfb
|
|
|
|
"
|
2022-07-31 18:02:32 +00:00
|
|
|
|
2023-05-22 20:57:38 +00:00
|
|
|
[libasan6]="libasan6"
|
|
|
|
|
2022-07-31 18:02:32 +00:00
|
|
|
[android]="binutils build-essential cmake ccache curl unzip git pkg-config"
|
2022-09-20 19:03:44 +00:00
|
|
|
|
|
|
|
[openmw-clang-format]="
|
|
|
|
clang-format-14
|
|
|
|
git-core
|
|
|
|
"
|
2024-01-02 07:16:26 +00:00
|
|
|
|
|
|
|
[openmw-qt-translations]="
|
|
|
|
qttools5-dev
|
|
|
|
qttools5-dev-tools
|
|
|
|
git-core
|
|
|
|
"
|
2021-01-20 02:25:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
|
|
>&2 print_help
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
deps=()
|
|
|
|
for group in "$@"; do
|
|
|
|
if [[ ! -v GROUPED_DEPS[$group] ]]; then
|
|
|
|
>&2 echo "error: unknown group ${group}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
deps+=(${GROUPED_DEPS[$group]})
|
|
|
|
done
|
|
|
|
|
|
|
|
export APT_CACHE_DIR="${PWD}/apt-cache"
|
2022-07-31 11:44:36 +00:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2021-01-20 02:25:46 +00:00
|
|
|
set -x
|
|
|
|
mkdir -pv "$APT_CACHE_DIR"
|
2021-12-09 19:05:33 +00:00
|
|
|
apt-get update -yqq
|
2022-07-28 21:03:50 +00:00
|
|
|
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y --no-install-recommends software-properties-common gnupg >/dev/null
|
2021-12-21 14:53:31 +00:00
|
|
|
add-apt-repository -y ppa:openmw/openmw
|
2023-08-07 19:47:45 +00:00
|
|
|
add-apt-repository -y ppa:openmw/openmw-daily
|
|
|
|
add-apt-repository -y ppa:openmw/staging
|
2021-12-22 22:43:23 +00:00
|
|
|
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y --no-install-recommends "${deps[@]}" >/dev/null
|
2023-11-10 17:36:39 +00:00
|
|
|
apt list --installed
|