2022-07-02 04:00:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-01-13 07:47:41 +00:00
|
|
|
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
|
|
|
source "$SCRIPTDIR/functions.sh"
|
|
|
|
|
2022-07-02 04:00:56 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
# Packages - Build and Qt
|
|
|
|
declare -a BUILD_PACKAGES=(
|
|
|
|
"build-essential"
|
|
|
|
"git"
|
|
|
|
"cmake"
|
|
|
|
"ccache"
|
|
|
|
"ninja-build"
|
|
|
|
"libclang-dev" # Qt goes hunting for libclang-11 specifically.
|
|
|
|
"libclang-11-dev"
|
|
|
|
"libclang-12-dev"
|
|
|
|
"patchelf"
|
|
|
|
"libglib2.0-dev"
|
|
|
|
"libfontconfig1-dev"
|
|
|
|
"libharfbuzz-dev"
|
|
|
|
"libjpeg-dev"
|
|
|
|
"libpng-dev"
|
|
|
|
"libfreetype-dev"
|
|
|
|
"libinput-dev"
|
|
|
|
"libxcb-*-dev"
|
|
|
|
"libxkbcommon-dev"
|
|
|
|
"libxkbcommon-x11-dev"
|
|
|
|
"libxrender-dev"
|
|
|
|
"libwayland-dev"
|
|
|
|
"libgl1-mesa-dev"
|
|
|
|
"libegl-dev"
|
|
|
|
"libegl1-mesa-dev"
|
|
|
|
"libgl1-mesa-dev"
|
|
|
|
"libssl-dev"
|
|
|
|
)
|
|
|
|
|
|
|
|
# Packages - PCSX2
|
|
|
|
declare -a PCSX2_PACKAGES=(
|
2023-07-05 09:33:44 +00:00
|
|
|
"extra-cmake-modules"
|
2022-07-02 04:00:56 +00:00
|
|
|
"libaio-dev"
|
2022-09-29 14:26:36 +00:00
|
|
|
"libasound2-dev"
|
2022-07-02 04:00:56 +00:00
|
|
|
"libbz2-dev"
|
2022-10-07 10:05:49 +00:00
|
|
|
"libcurl4-openssl-dev"
|
2022-07-02 04:00:56 +00:00
|
|
|
"libegl1-mesa-dev"
|
|
|
|
"libgl1-mesa-dev"
|
|
|
|
"libgtk-3-dev"
|
|
|
|
"libharfbuzz-dev"
|
|
|
|
"libjpeg-dev"
|
|
|
|
"liblzma-dev"
|
|
|
|
"libpcap0.8-dev"
|
|
|
|
"libpng-dev"
|
|
|
|
"libpulse-dev"
|
|
|
|
"librsvg2-dev"
|
|
|
|
"libsamplerate0-dev"
|
|
|
|
"libudev-dev"
|
|
|
|
"libx11-xcb-dev"
|
2023-06-16 09:48:30 +00:00
|
|
|
"libavcodec-dev"
|
|
|
|
"libavformat-dev"
|
|
|
|
"libavutil-dev"
|
|
|
|
"libswresample-dev"
|
|
|
|
"libswscale-dev"
|
2022-07-02 04:00:56 +00:00
|
|
|
"pkg-config"
|
|
|
|
"zlib1g-dev"
|
|
|
|
)
|
|
|
|
|
|
|
|
if [ "${COMPILER}" = "gcc" ]; then
|
2023-01-13 07:47:41 +00:00
|
|
|
BUILD_PACKAGES+=("g++-10")
|
2022-07-02 04:00:56 +00:00
|
|
|
else
|
2023-06-23 15:37:39 +00:00
|
|
|
BUILD_PACKAGES+=("llvm-16" "lld-16" "clang-16")
|
|
|
|
|
|
|
|
# Ubuntu 20.04 doesn't ship with LLVM 16, so we need to pull it from the llvm.org repos.
|
|
|
|
retry_command wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
|
|
sudo apt-add-repository -n 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main'
|
|
|
|
retry_command sudo apt-get update
|
|
|
|
retry_command sudo apt-get install clang-16 lld-16
|
2022-07-02 04:00:56 +00:00
|
|
|
fi
|
|
|
|
|
2023-01-13 07:47:41 +00:00
|
|
|
retry_command sudo apt-get -qq update && break
|
2022-07-02 04:00:56 +00:00
|
|
|
|
|
|
|
# Install packages needed for building
|
|
|
|
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
|
2023-01-13 07:47:41 +00:00
|
|
|
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
|
2022-07-02 04:00:56 +00:00
|
|
|
|
|
|
|
# Install packages needed by pcsx2
|
|
|
|
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]}")
|
|
|
|
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
|
2023-01-13 07:47:41 +00:00
|
|
|
retry_command sudo apt-get -y install "${PCSX2_PACKAGES[@]}"
|