2016-10-15 17:59:23 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2017-05-26 17:03:46 +02:00
|
|
|
# Linux build only
|
|
|
|
install_linux_deps() {
|
2022-07-30 11:58:47 +02:00
|
|
|
local pkgs=(
|
2022-10-19 23:58:36 +02:00
|
|
|
cmake gettext postgresql
|
2022-07-30 11:58:47 +02:00
|
|
|
libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev
|
|
|
|
libsqlite3-dev libhiredis-dev libogg-dev libgmp-dev libvorbis-dev
|
|
|
|
libopenal-dev libpq-dev libleveldb-dev libcurl4-openssl-dev libzstd-dev
|
|
|
|
)
|
2020-04-08 21:05:27 +02:00
|
|
|
|
2022-05-06 22:17:16 +02:00
|
|
|
if [[ "$1" == "--no-irr" ]]; then
|
|
|
|
shift
|
2021-03-07 13:58:27 +01:00
|
|
|
else
|
2022-07-21 20:51:02 +02:00
|
|
|
local ver=$(cat misc/irrlichtmt_tag.txt)
|
|
|
|
wget "https://github.com/minetest/irrlicht/releases/download/$ver/ubuntu-bionic.tar.gz"
|
2021-03-07 13:58:27 +01:00
|
|
|
sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local
|
|
|
|
fi
|
|
|
|
|
2020-04-08 21:05:27 +02:00
|
|
|
sudo apt-get update
|
2022-07-30 11:58:47 +02:00
|
|
|
sudo apt-get install -y --no-install-recommends "${pkgs[@]}" "$@"
|
2022-10-19 23:58:36 +02:00
|
|
|
|
|
|
|
sudo systemctl start postgresql.service
|
|
|
|
sudo -u postgres psql <<<"
|
|
|
|
CREATE USER minetest WITH PASSWORD 'minetest';
|
|
|
|
CREATE DATABASE minetest;
|
|
|
|
"
|
2017-05-26 17:03:46 +02:00
|
|
|
}
|
|
|
|
|
2022-07-30 11:58:47 +02:00
|
|
|
# macOS build only
|
|
|
|
install_macos_deps() {
|
|
|
|
local pkgs=(
|
|
|
|
cmake gettext freetype gmp jpeg-turbo jsoncpp leveldb
|
|
|
|
libogg libpng libvorbis luajit zstd
|
|
|
|
)
|
2017-05-26 17:03:46 +02:00
|
|
|
brew update
|
2022-07-30 11:58:47 +02:00
|
|
|
brew install "${pkgs[@]}"
|
|
|
|
brew unlink $(brew ls --formula)
|
|
|
|
brew link "${pkgs[@]}"
|
2017-05-26 17:03:46 +02:00
|
|
|
}
|