Last active
August 23, 2022 17:15
-
-
Save paullaffitte/85f0d24d93408ab90b9e0600df8db4ac to your computer and use it in GitHub Desktop.
It takes the version as first argument, if not provided it will use 2.5.1 - Warning : Tested on Ubuntu 20.04 only, it may not work on your distribution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
VERSION=2.5.1 | |
if [[ -n "$1" ]]; then | |
VERSION="$1" | |
fi | |
sudo apt-get install -y libxrandr-dev \ | |
libudev-dev \ | |
libglew-dev \ | |
libjpeg-dev \ | |
libfreetype6-dev \ | |
libsndfile-dev \ | |
libalut-dev | |
if ! [[ -d SFML-"$VERSION" ]]; then | |
if ! [[ -f SFML-"$VERSION"-sources.zip ]]; then | |
wget https://www.sfml-dev.org/files/SFML-"$VERSION"-sources.zip | |
fi | |
yes A | unzip SFML-"$VERSION"-sources.zip | |
fi | |
cd SFML-"$VERSION" | |
cmake . | |
cmake --build . | |
sudo make install | |
rm -f ../SFML-"$VERSION"-sources.zip | |
echo "SFML $VERSION has been compiled" | |
echo "Provided by Paul Laffitte - 2018 - Epitech Montpellier Promo 2021" |
Thanks for the note. Indeed I wrote this script on Ubuntu, it may not work everywhere.
I added a note about this in the description and updated the script so it will work on PopOS 20.04 also and is still working on Ubuntu 20.04. I don't plan to support older versions of Ubuntu, but it should still work under 18.04 and even 16.04.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
For fellow googlers:
I'm on PopOS 20.04 and had the "Cannot find OpenAL" cmake error, in order to fix it I had to install
libalut-dev
.