forked from Maschine2501/NR1-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·94 lines (71 loc) · 3.42 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
set +e
echo -e "\e[92mSetting up...\e[0m"
echo -e "\e[92mInstalling all needed Modules and Libraries\e[0m"
echo ""
sudo dpkg-reconfigure tzdata
sudo apt-get update
# Installing dependencies for pycurl and other packages
sudo apt-get install -y build-essential libffi-dev libc6-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev
# Upgrade pip and setuptools before installing any packages
sudo apt-get install -y python3-pip
sudo pip3 install -U pip setuptools
# Installing Python packages including pycurl
sudo pip3 install pycurl rpi.gpio psutil socketIO-client pcf8574 RPi.GPIO gpiozero readchar requests luma.lcd pillow
# Additional system dependencies
sudo apt-get install -y libfftw3-dev libasound2-dev libncursesw5-dev libpulse-dev libtool libiniparser-dev libsdl2-2.0-0 libsdl2-dev libffi-dev libbz2-dev libexpat1-dev liblzma-dev libncurses5-dev libncursesw5-dev libreadline-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libfreetype6-dev libatlas-base-dev libjpeg-dev libfftw3-dev libasound2-dev libncursesw5-dev libtool libcurl4 libssl-dev git autoconf automake make m4
sudo apt install python3-numpy
git clone https://github.com/Maschine2501/cava.git
git clone https://github.com/Maschine2501/cava2.git /home/volumio/CAVAinstall
sudo chmod +x /home/volumio/NR1-UI/ftp.sh
sudo echo "dtparam=spi=on" >> /boot/userconfig.txt
sudo echo "dtparam=i2c=on" >> /boot/userconfig.txt
sudo pip3 install -U pip setuptools
sudo pip3 install --upgrade setuptools pip wheel
sudo pip3 install --upgrade luma.oled
cd
sed -i 's/\(SpectrumActive = \)\(.*\)/\1True/' /home/volumio/NR1-UI/ConfigurationFiles/PreConfiguration.py
sed -i 's/\(NR1UIRemoteActive = \)\(.*\)/\1False/' /home/volumio/NR1-UI/ConfigurationFiles/PreConfiguration.py
mkdir /home/volumio/src
cd
echo -e "\e[92mInstalling Cava...\e[0m"
cd /home/volumio/src
wget http://www.fftw.org/fftw-3.3.10.tar.gz
tar zxvf fftw-3.3.10.tar.gz
sudo mkdir /usr/local/fftw
cd fftw-3.3.10
./configure --prefix=/usr/local/fftw --disable-fortran
make
sudo make install
make clean
./configure --enable-float --prefix=/usr/local/fftw --disable-fortran
make
sudo make install
cd
cd /home/volumio/cava
sudo bash autogen.sh
./configure && make -j4 && sudo make install
cd
git clone https://github.com/Maschine2501/cava2.git /home/volumio/CAVAinstall
cd /home/volumio/CAVAinstall
sudo bash ./autogen.sh
./configure --prefix=/home/volumio/CAVA2 && make -j4 && sudo make install
cd
sudo cp /home/volumio/NR1-UI/service-files/cava1.service /lib/systemd/system/
sudo cp /home/volumio/NR1-UI/service-files/cava2.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable cava1.service
sudo systemctl enable cava2.service
echo -e "\e[92mInstalling NR1-UI and Service File...\e[0m"
chmod +x /home/volumio/NR1-UI/nr1ui.py
sudo cp /home/volumio/NR1-UI/service-files/nr1uibuster.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable nr1uibuster.service
sudo cp /home/volumio/NR1-UI/service-files/mystreamerinit.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable mystreamerinit.service
sudo cp /home/volumio/NR1-UI/ConfigurationFiles/mpd.conf.tmpl /volumio/app/plugins/music_service/mpd
echo -e "\e[92mFifo-Audio-Outputs for Cava have been added to mpd.conf\e[0m"
sudo service mpd restart
echo -e "\e[92m**** Script has downloaded and executed successfully! ****\e[0m"
exit 0