Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Add setup steps for MacOS #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,67 @@ You can run this app as a simple python script or by executing the binary file f
* __On Linux__ have libusb1 installed (you probably already have).
* Download/clone this repo and simply run `app.py` like you would any python script.

<details>
<summary>Mac Install Tutorial (Apple Silicon M1/M2 & Intel Macs)</summary>
It's recommended you have a basic understanding of how to use Terminal, as this will makes things a bit easier.

If you don't have Homebrew already installed, [install homebrew](https://brew.sh/).

1. Open Terminal
2. Install the dependencies:
```sh
brew install libusb python3 tcl-tk python-tk
```

3. Reopen Terminal, as there will be some new paths.

4. `python3 --version` should return `Python 3.xxx.yyy`, where `xxx` is a major version such as 11, 12, etc. yyy is the minor version.

> As of April 2023, Python 3.11 is the current stable version of Python. Future versions, *should* work. If the below steps don't work with `Python 3.12` etc, you can install Python 3.11 & Python-tk for Python3.11 via `brew install [email protected] [email protected]`. Then in the following steps, instead of using `python3`, use `[email protected]` to run Python 3.11.

5. `git clone` the repository, `cd` into it:
```sh
git clone https://github.com/nh-server/fusee-interfacee-tk
cd fusee-interfacee-tk
```

> If you have issues with Git, you can also download the repository directly [here](https://github.com/nh-server/fusee-interfacee-tk/archive/refs/heads/master.zip), extract it then cd into it. Mac does come with Git, so it should work.

```sh
# Run the below steps only if Git doesn't work.
curl -L https://github.com/nh-server/fusee-interfacee-tk/archive/refs/heads/master.zip --output fusee-interfacee-tk.zip
unzip fusee-interfacee-tk.zip
cd fusee-interfacee-tk.zip
```

6. Create a "virtual environment", which means that packages will be installed within this directory instead of system wide, which might cause conflicts and other issues.
```sh
python3 -m venv .venv
```

7. Install the needed Python packages:
```sh
./.venv/bin/pip install pyusb
```

> You can also use`source .venv/bin/activate`, which activates a "virtual environment". But as we are just running a couple of steps, prefixing our commands with `.venv/bin/` is fine.

8. Now you should be able to run the script. Running this command should show the GUI. In future you should just be able to run this command and not need to perform steps 1-7:

```sh
./.venv/bin/python3 app.py
```

## Copy+paste, once you have installed Homebrew:
```sh
brew install libusb python3 tcl-tk python-tk
git clone https://github.com/nh-server/fusee-interfacee-tk
cd fusee-interfacee-tk
python3 -m venv .venv
./.venv/bin/pip install pyusb
./.venv/bin/python3 app.py
```
</details>

### Running the binary file
### Linux
Expand Down