mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2025-12-08 11:21:17 +08:00
Adding Orange Pi as a platform in the installation script
This commit is contained in:
@@ -13,6 +13,7 @@ function print_help_and_exit {
|
||||
echo " linux Install OpenPLC on a Debian-based Linux distribution"
|
||||
echo " docker Install OpenPLC in a Docker container"
|
||||
echo " rpi Install OpenPLC on a Raspberry Pi"
|
||||
echo " opi Install OpenPLC on a Orange Pi"
|
||||
echo " neuron Install OpenPLC on a UniPi Neuron PLC"
|
||||
echo " unipi Install OpenPLC on a Raspberry Pi with UniPi v1.1 PLC"
|
||||
echo " custom Skip all specific package installation and tries to install"
|
||||
@@ -90,6 +91,21 @@ function install_pigpio {
|
||||
)
|
||||
}
|
||||
|
||||
function install_wiringop {
|
||||
echo "[WIRINGOP]"
|
||||
local URL="https://github.com/orangepi-xunlong/wiringOP/archive/master.zip"
|
||||
(
|
||||
set -e
|
||||
rm -f master.zip
|
||||
wget -c "$URL"
|
||||
unzip -o master.zip
|
||||
cd wiringOP-master
|
||||
sudo ./build clean
|
||||
sudo ./build
|
||||
rm -f ../master.zip
|
||||
)
|
||||
}
|
||||
|
||||
function install_py_deps {
|
||||
python3 -m venv "$VENV_DIR"
|
||||
"$VENV_DIR/bin/python3" -m pip install --upgrade pip
|
||||
@@ -347,6 +363,15 @@ elif [ "$1" == "rpi" ]; then
|
||||
install_systemd_service sudo
|
||||
finalize_install linux
|
||||
|
||||
elif [ "$1" == "opi" ]; then
|
||||
echo "Installing OpenPLC on Orange Pi"
|
||||
linux_install_deps sudo
|
||||
install_wiringop
|
||||
install_py_deps
|
||||
install_all_libs sudo
|
||||
install_systemd_service sudo
|
||||
finalize_install linux
|
||||
|
||||
elif [ "$1" == "neuron" ]; then
|
||||
echo "Installing OpenPLC on UniPi Neuron PLC"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user