Last active
February 12, 2023 22:46
-
-
Save jezek/1074f8c14dffbf72dec1ed3aa9f0b443 to your computer and use it in GitHub Desktop.
Build electricsheep screensaver on ubuntu 22.10
This file contains hidden or 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 | |
# Builds and installs Electricsheep screensaver on Ubuntu 22.10. | |
# Needs sudo for "apt install" and "make install" commands. | |
# Operates in /tmp and downloads stuff from internet (~ 100MB). | |
# Tested on Ubuntu 22.10 minimal install with 3rd party packages enabled. | |
# Inspired by https://gist.github.com/adrianwebb/f6a1c3a0393e5482a0add00b63ac49cf gist. | |
# Any subsequent(*) commands which fail will cause the shell script to exit immediately. | |
set -e | |
# Print executed commans in this script and prepend them with yellow colored "$ ". | |
PS4="\n\033[1;33m\$\033[0m "; set -x | |
# Install all needed dependencies. | |
sudo apt install autoconf libtool build-essential git \ | |
libpng-dev libxml2-dev libjpeg-dev \ | |
pkg-config wx-common wx3.0-headers libwxgtk3.2-dev \ | |
libavcodec-dev libavformat-dev libswscale-dev \ | |
liblua5.1-0-dev libcurl4-openssl-dev libxrender-dev \ | |
libgtop2-dev libboost-dev libboost-thread-dev \ | |
libboost-filesystem-dev libtinyxml-dev freeglut3-dev | |
# Install common dependencies (is commented out, installs all at once above). | |
#sudo apt install autoconf libtool build-essential git | |
# Install Flam3 dependencies (is commented out, installs all at once above). | |
#sudo apt install libpng-dev libxml2-dev libjpeg-dev | |
# Build and install Flam3 from github repository. | |
cd /tmp | |
git clone https://github.com/scottdraves/flam3.git flam3 | |
cd flam3 | |
./configure | |
autoreconf -f -i | |
make | |
sudo make install | |
# Install Electricsheep dependencies (is commented out, installs all at once above). | |
#sudo apt install pkg-config wx-common wx3.0-headers libwxgtk3.2-dev \ | |
#libavcodec-dev libavformat-dev libswscale-dev \ | |
#liblua5.1-0-dev libcurl4-openssl-dev libxrender-dev \ | |
#libgtop2-dev libboost-dev libboost-thread-dev \ | |
#libboost-filesystem-dev libtinyxml-dev freeglut3-dev | |
# Install old and currently not supprted, Electricsheep dependencies manually from deb archive. | |
cd /tmp | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glee/glee-dev_5.4.0-2_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glee/libglee0d1_5.4.0-2_amd64.deb | |
wget http://security.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.5_amd64.deb | |
sudo apt install ./multiarch-support_2.27-3ubuntu1.5_amd64.deb | |
sudo apt install ./libglee0d1_5.4.0-2_amd64.deb | |
sudo apt install ./glee-dev_5.4.0-2_amd64.deb | |
# Build and install Electricsheep screensaver from github repository. | |
#git clone https://github.com/scottdraves/electricsheep electricsheep | |
# At the time writing this (2023-02-12), the scottdraves main branch cannot be build, but Rogach's fix-ffmpeg5 branch can. | |
git clone https://github.com/Rogach/electricsheep.git electricsheep | |
cd electricsheep/client_generic | |
git checkout fix-ffmpeg5 | |
./autogen.sh | |
./configure | |
# From https://github.com/stefantalpalaru/gentoo-overlay/issues/26#issuecomment-493652455 | |
make CXXFLAGS+="-DGL_GLEXT_PROTOTYPES=1" | |
sudo make install | |
# Notify of successful install. | |
echo "Electricsheep install was successful." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can install with
wget https://gist.github.com/jezek/1074f8c14dffbf72dec1ed3aa9f0b443/raw/847789f88ec2c1fda2f6c48b16cc3102674bd67e/electricsheep-install.sh -O - | bash
.Note: for some reasons (unknown to me) the command above has to be run 2 times. First time it installs dependencies and quits. Second time it buidls and installs all other stuff.