diff --git a/README.md b/README.md index 7de6d6d1..e904c0f5 100644 --- a/README.md +++ b/README.md @@ -244,8 +244,7 @@ You may also choose to clone the repository or download the scripts from These scripts currently only support `apt` as the package manager. If you install Python using the scripts, you will not find `python ...`, `python3 ...`, `pip ...`, or `pip3 ...` working -because you have to specify the Python environment such that `/usr/local/leads/venv/bin/python ...` and -`/usr/local/leads/venv/bin/pip ...`. +because you have to specify the Python interpreter such that `python-leads ...` and `pip-leads ...`. ### LEADS @@ -256,27 +255,6 @@ dependencies of LEADS for you. /bin/sh "setup.sh$(wget -O setup.sh https://raw.githubusercontent.com/ProjectNeura/LEADS/master/scripts/setup.sh)" && rm setup.sh || rm setup.sh ``` -To save your time from typing `/usr/local/leads/venv/bin/python -m leads_vec -c /usr/local/leads/config.json run` a -thousand times, we provide a boot script "[leads.sh](scripts/leads.sh)". - -Download it to wherever you feel convenient. - -```shell -wget -O leads.sh https://raw.githubusercontent.com/ProjectNeura/LEADS/master/scripts/leads.sh -``` - -Run it like this. - -```shell -/bin/sh leads.sh {arg1} {arg2} {arg3} ... -``` - -It specifies to use this configuration file: "usr/local/leads/config.json". If the file does not exist an error will be -raised. You must [create](#configurations) or [generate](#generate-a-configuration-file) a configuration file with the -exact same path. - -You can always pass other optional arguments additionally to that. - ### Python [python-install.sh](scripts/python-install.sh) will only install Python 3.12 and Tcl/Tk. diff --git a/leads_vec/_bootloader/leads_vec.service.sh b/leads_vec/_bootloader/leads_vec.service.sh index 4c2c26be..03f43d5d 100644 --- a/leads_vec/_bootloader/leads_vec.service.sh +++ b/leads_vec/_bootloader/leads_vec.service.sh @@ -5,5 +5,5 @@ then fi # change the interpreter or adjust the arguments according to your needs -# but do not remove `--xws` -/usr/local/leads/venv/bin/python -m leads_vec -c /usr/local/leads/config.json --xws run \ No newline at end of file +# do not remove `--xws` +python-leads -m leads_vec -c /usr/local/leads/config.json --xws run \ No newline at end of file diff --git a/readthedocs b/readthedocs index a1e60182..b0b5d555 160000 --- a/readthedocs +++ b/readthedocs @@ -1 +1 @@ -Subproject commit a1e60182e53ab6f564bca83744dc99e8eed627e3 +Subproject commit b0b5d555eec64f56bff601e7032617c40717aeff diff --git a/scripts/leads.sh b/scripts/leads.sh deleted file mode 100644 index 5869dd89..00000000 --- a/scripts/leads.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -abort() { - printf "%s\n" "$@" >&2 - exit 1 -} - -execute() { - if ! "$@"; - then abort "$(printf "Failed: %s" "$@")" - fi -} - -execute "/usr/local/leads/venv/bin/python" "-m" "leads_vec" "-c" "/usr/local/leads/config.json" "$@" "run" \ No newline at end of file diff --git a/scripts/python-install.sh b/scripts/python-install.sh index 4d10e4e2..4bc588fe 100644 --- a/scripts/python-install.sh +++ b/scripts/python-install.sh @@ -27,4 +27,7 @@ execute_root "apt" "install" "-y" "gcc" "python3.12" "python3.12-dev" "python3.1 echo "Installing Tcl/Tk..." execute_root "apt" "install" "-y" "python3.12-tk" echo "Creating Virtual Environment..." -execute_root "python3.12" "-m" "venv" "/usr/local/leads/venv" \ No newline at end of file +execute_root "python3.12" "-m" "venv" "/usr/local/leads/venv" +echo "Creating Soft Links..." +execute_root "ln" "/usr/local/leads/venv/bin/python" "/bin/python-leads" +execute_root "ln" "/usr/local/leads/venv/bin/pip" "/bin/pip-leads" \ No newline at end of file diff --git a/scripts/setup.sh b/scripts/setup.sh index 242f28bc..89f552b5 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -25,5 +25,5 @@ execute_root "/bin/sh" "python-install.sh" echo "Cleaning up..." execute_root "rm" "python-install.sh" echo "Installing dependencies..." -execute "/usr/local/leads/venv/bin/pip" "install" "Pillow" "PySDL2" "customtkinter" "gpiozero" "lgpio" "pynmea2" "pynput" "pysdl2-dll" "pyserial" "leads" -execute "/usr/local/leads/venv/bin/python" "-m" "leads_vec" "info" \ No newline at end of file +execute "pip-leads" "install" "Pillow" "PySDL2" "customtkinter" "gpiozero" "lgpio" "pynmea2" "pynput" "pysdl2-dll" "pyserial" "leads" +execute "python-leads" "-m" "leads_vec" "info" \ No newline at end of file