minecraft-pi-docker/scripts/install-dependencies.sh

46 lines
996 B
Bash
Raw Normal View History

2021-06-17 21:32:24 +00:00
#!/bin/sh
set -e
# This Script Assumes An x86_64 Host
if [ "$(uname -m)" != "x86_64" ]; then
echo 'Invalid Build Architecture'
exit 1
fi
# Add ARM Repository
if [ ! -z "${ARM_PACKAGES_SUPPORTED}" ]; then
sudo dpkg --add-architecture armhf
2021-06-24 16:40:34 +00:00
sudo dpkg --add-architecture arm64
2021-06-17 21:32:24 +00:00
fi
# Update APT
sudo apt-get update
sudo apt-get dist-upgrade -y
# Install
sudo apt-get install --no-install-recommends -y \
2021-11-12 03:52:47 +00:00
dpkg-dev \
2021-06-17 21:32:24 +00:00
git \
cmake \
2022-03-07 01:13:41 +00:00
ninja-build \
2021-06-17 21:32:24 +00:00
libglfw3 libglfw3-dev \
libfreeimage3 libfreeimage-dev \
crossbuild-essential-armhf \
2021-11-12 03:27:10 +00:00
gcc g++ \
2021-09-12 03:18:12 +00:00
libopenal-dev \
2021-12-18 21:29:35 +00:00
qemu-user
2021-06-17 21:32:24 +00:00
# Install ARM Dependencies
if [ ! -z "${ARM_PACKAGES_SUPPORTED}" ]; then
sudo apt-get install --no-install-recommends -y \
libglfw3:armhf libglfw3-dev:armhf \
2021-06-24 16:40:34 +00:00
libfreeimage3:armhf \
2021-09-12 03:18:12 +00:00
libopenal-dev:armhf \
2021-06-24 16:40:34 +00:00
libglfw3:arm64 libglfw3-dev:arm64 \
2021-09-12 03:18:12 +00:00
libfreeimage3:arm64 \
2021-11-12 03:27:10 +00:00
libopenal-dev:arm64 \
crossbuild-essential-arm64
2021-06-17 21:32:24 +00:00
fi