2021-11-14 00:44:24 +01:00
|
|
|
# Installing depedencies
|
2021-11-08 20:18:48 +01:00
|
|
|
sudo apt update
|
2021-11-11 23:41:25 +01:00
|
|
|
sudo apt install libsdl2-dev git pkg-config automake make autoconf libtool -y
|
2021-11-14 00:44:24 +01:00
|
|
|
# Downloading and building GL4D
|
2021-11-08 20:18:48 +01:00
|
|
|
git clone https://github.com/noalien/GL4Dummies.git
|
|
|
|
cd GL4Dummies
|
|
|
|
make -f Makefile.autotools
|
|
|
|
./configure
|
|
|
|
make
|
2021-11-14 00:44:24 +01:00
|
|
|
# Installing GL4D
|
2021-11-08 20:18:48 +01:00
|
|
|
sudo make install
|
2021-11-14 00:44:24 +01:00
|
|
|
# Removing sourcecode
|
2021-11-08 20:18:48 +01:00
|
|
|
cd ..
|
|
|
|
rm -rf GL4Dummies
|
2021-11-14 00:44:24 +01:00
|
|
|
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
|
2021-11-08 20:23:21 +01:00
|
|
|
sudo ldconfig
|
2021-11-11 22:54:07 +01:00
|
|
|
|
2021-11-14 21:13:42 +01:00
|
|
|
# changing env variables path and ld_library_path
|
|
|
|
# to correct locations to all the shell installed
|
|
|
|
|
|
|
|
# to .bashrc if exists
|
|
|
|
if [ -f $HOME/.bashrc ] ; then
|
|
|
|
echo "" >> $HOME/.bashrc
|
|
|
|
echo "# GL4Dummies" >> $HOME/.bashrc
|
|
|
|
echo "export PATH=\$PATH:\$HOME/local/bin" >> $HOME/.bashrc
|
|
|
|
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib" >> $HOME/.bashrc
|
|
|
|
echo "" >> $HOME/.bashrc
|
|
|
|
fi
|
|
|
|
|
|
|
|
# to .zshrc if exists
|
|
|
|
if [ -f $HOME/.zshrc ] ; then
|
|
|
|
echo "" >> $HOME/.zshrc
|
|
|
|
echo "# GL4Dummies" >> $HOME/.zshrc
|
|
|
|
echo "export PATH=\$PATH:\$HOME/local/bin" >> $HOME/.zshrc
|
|
|
|
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib" >> $HOME/.zshrc
|
|
|
|
echo "" >> $HOME/.zshrc
|
|
|
|
fi
|
|
|
|
|
|
|
|
# if config.fish exists
|
|
|
|
if [ -f $HOME/.config/fish/config.fish ] ; then
|
|
|
|
echo "" >> $HOME/.config/fish/config.fish
|
|
|
|
echo "# GL4Dummies" >> $HOME/.config/fish/config.fish
|
|
|
|
echo "set -gx PATH \$HOME/local/bin \$PATH" >> $HOME/.config/fish/config.fish
|
|
|
|
echo "set -gx LD_LIBRARY_PATH \$HOME/local/lib $LD_LIBRARY_PATH" >> $HOME/.config/fish/config.fish
|
|
|
|
echo "" >> $HOME/.config/fish/config.fish
|
|
|
|
fi
|
|
|
|
|
2021-12-23 15:02:27 +01:00
|
|
|
echo -e "\nGL4D library installed! 🎉"
|
2021-11-14 21:13:42 +01:00
|
|
|
echo "You may need to restart your shell to apply changes."
|