pcsx2/.github/workflows/scripts/linux/install-packages.sh

64 lines
1.3 KiB
Bash
Raw Normal View History

2020-10-17 00:09:15 +00:00
#!/bin/bash
set -e
# Packages - Build Environment
declare -a BUILD_PACKAGES=(
"ccache"
"cmake"
"ninja-build"
2020-10-17 00:09:15 +00:00
)
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"libaio-dev"
"libasound2-dev"
"libbz2-dev"
2020-10-17 00:09:15 +00:00
"libegl1-mesa-dev"
"libgdk-pixbuf2.0-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
"libharfbuzz-dev"
"libjpeg-dev"
2020-10-17 00:09:15 +00:00
"liblzma-dev"
"libpcap0.8-dev"
"libpng-dev"
2020-11-02 20:53:36 +00:00
"libpulse-dev"
"librsvg2-dev"
2020-11-02 20:53:36 +00:00
"libsamplerate0-dev"
2020-10-17 00:09:15 +00:00
"libsoundtouch-dev"
"libudev-dev"
2020-10-17 00:09:15 +00:00
"libwxgtk3.0-gtk3-dev"
"libx11-xcb-dev"
"pkg-config"
2020-10-17 00:09:15 +00:00
"portaudio19-dev"
"zlib1g-dev"
)
if [ "${COMPILER}" = "gcc" ]; then
2021-09-04 21:23:47 +00:00
BUILD_PACKAGES+=("g++-10-multilib")
else
2021-10-31 05:59:35 +00:00
BUILD_PACKAGES+=("clang-9")
2021-09-04 21:23:47 +00:00
PCSX2_PACKAGES+=("libstdc++-10-dev")
fi
2020-10-17 00:09:15 +00:00
# - https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
ARCH=""
echo "${PLATFORM}"
if [ "${PLATFORM}" == "x86" ]; then
ARCH=":i386"
sudo dpkg --add-architecture i386
fi
sudo apt-get -qq update
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
#sudo apt remove gcc-9 g++-9
sudo apt-get -y install "${BUILD_PACKAGES[@]}"
2020-10-17 00:09:15 +00:00
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]/%/"${ARCH}"}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
sudo apt-get -y install "${PCSX2_PACKAGES[@]}"