-
Notifications
You must be signed in to change notification settings - Fork 22
Install_items
This is for the NEW gui, currently called test_gui and is currently work in progress
The pigrow gui's install dialogue is designed to make it easy to add new sensors and scripts in a modular fashion, this is achieved by looking through the subfolders of the installer folder and reading the text files within which give the details for how to install the required dependencies.
Each subfolder's name is added to the dropdown box in the install dialogue, the files ending with _install.txt within that folder are added under that category - Pigrow/scripts/gui/test/installer/sensor/bme280_install.txt for example will appear in the sensor category as bme280.
The files are simple key=value lists of information;
install_method=pip
package_name=adafruit-circuitpython-bme280
test=import
import=adafruit_bme280
this tells it to use pip to install the package using the supplied package name, it also tells it to test if it's successfully installed by attempting to import it into python using the supplied name.
To test if something is currently installed there are several methods depending on the item;
Attempts to import the package into python and sets to false if import fails.
test=import
import=<package name as used in python>
Checks for the existence of the folder and the git log file, this should indicate a completed install.
test=git
Looks for the location of a given file,
test=file
Checks to see if a program is installed by using the command 'which' and the programs name, e.g.
which mpv
returns the path to the program file for mpv (/usr/bin/mpv) when installed and nothing when it's not
test=apt
import=<program name>
Pip is the python package manager used to install and update most python packages,
Apt is a linux package management tool that's used for installing programs within the Raspberry Pi OS repository, these are generally stand-alone programs but in same cases can also be python packages or similar.
Git is a version management system used by many programs to allow easy install and updating of software, the pigrow itself uses this to install as the project is hosted on GitHub.
wget is a linux command used to download a file from the internet, generally further steps such as unpacking and compiling the software are required after the download has been completed but this is not always the case.