Skip to content

Commit

Permalink
Add instructions on how to run from a venv and requirements.txt, also…
Browse files Browse the repository at this point in the history
… how to run daemon in debug mode from run.sh
  • Loading branch information
C0rn3j committed Sep 21, 2024
1 parent 11c4f26 commit 48d5d58
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
test.*
test[0-9].*
build/
venv/
.atomignore
commit*
profiles
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,10 @@ Windows:

## Running with non distro-specific package
- Download and extract [latest release](https://github.com/C0rn3j/sc-controller/releases/latest)
- Navigate to extracted directory and execute `./run.sh`
- Navigate to extracted directory: `cd sc-controller`
- If you do not wish to use system dependencies, you can setup a venv and install them there:
- Create the venv: `python -m venv venv`
- Activate it, you will need to do this before each launch: `source venv/bin/activate`
- Install dependencies: `pip install -r requirements.txt`
- Execute `./run.sh`
- If you are debuggin an issue, running `./run.sh daemon` first will launch the daemon in debug mode, allowing you to launch sc-controller in another terminal with `./run.sh`
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
evdev
ioctl-opt
libusb1
setuptools
PyGObject
2 changes: 2 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Dev package to see types
pygobject-stubs --config-settings=config=Gtk3
2 changes: 2 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export SCC_SHARED="$(pwd)"

# Start either the daemon in debug mode if first parameter is 'debug', or the regular sc-controller app
if [[ ${1-} == 'daemon' ]]; then
# Kill any existing daemons before spawning our own
pkill -f scc-daemon || true
python3 'scripts/scc-daemon' debug
else
python3 'scripts/sc-controller' $@
Expand Down

0 comments on commit 48d5d58

Please sign in to comment.