Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions leads_vec/_bootloader/leads_vec.service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
# do not remove `--xws`
python-leads -m leads_vec -c /usr/local/leads/config.json --xws run
2 changes: 1 addition & 1 deletion readthedocs
14 changes: 0 additions & 14 deletions scripts/leads.sh

This file was deleted.

5 changes: 4 additions & 1 deletion scripts/python-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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"
4 changes: 2 additions & 2 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
execute "pip-leads" "install" "Pillow" "PySDL2" "customtkinter" "gpiozero" "lgpio" "pynmea2" "pynput" "pysdl2-dll" "pyserial" "leads"
execute "python-leads" "-m" "leads_vec" "info"