snaums
/
PiPlayer
Archived
1
0
Fork 0
Simple GUI around OMXPlayer for Raspberry Pi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
PiPlayer/setup.sh

65 lines
1.4 KiB

#! /bin/bash
#
# please set the folders, archive and link accordingly
# should download this file for building pyFLTK
pyFLTKFolder=pyFltk-1.3.4.1
pyFLTKFile=pyFltk-1.3.4.1_py3.tar.gz
pyFLTKLink=https://downloads.sourceforge.net/project/pyfltk/pyfltk/pyFltk-1.3.4.1/pyFltk-1.3.4.1_py3.tar.gz
# installation places for dbusconfig.sh and piplayer source files
dbusconfig=/opt/piplayerdbus.sh
piplayer=/opt/piplayer/
function help ()
{
echo "Usage: bash setup.sh [install|prepare]"
echo "----"
echo " * install: copies dbuscontrol.sh and PiPlayer to a common place (needs root)"
echo " * prepare: install prerequisites (pyFLTK); GCC required"
}
case $1 in
# install piplayer to a common place
install)
name=$(whoami)
#if [ "$name" != "root" ]
if [ 0 -eq 1 ]
then
echo "Please start as root"
echo ""
help
exit
fi
if [ ! -f $dbusconfig ]
then
cp dbusconfig.sh $dbusconfig
fi
if [ ! -f $piplayer ]
then
mkdir $piplayer
cp src/* $piplayer
fi
;;
# build and setup pyFLTK
prepare)
python fltk_exists.py &> /dev/null
val=$?
if [ $val -eq 0 ]
then
curl -L $pyFLTKLink > $pyFLTKFile
tar -xvf $pyFLTKFile
pushd .
cd $pyFLTKFolder
python setup.py build
sudo python setup.py install
popd
rm -rf $pyFLTKFolder
rm $pyFLTKFile
fi
;;
*)
help
;;
esac