Skip to content

Commit

Permalink
[pah] rewrite systray support
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed May 4, 2021
1 parent f177b59 commit 1c07a7e
Show file tree
Hide file tree
Showing 16 changed files with 722 additions and 140 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/systray.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Systray

on:
push:
branches: [ main ]
paths:
- 'src/net/cmd/systray/*'
pull_request:
branches: [ main ]
paths:
- 'src/net/cmd/systray/*'

jobs:

build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-16.04
binary: permuter-systray-linux
- os: windows-latest
binary: permuter-systray.exe
- os: macos-latest
binary: permuter-systray-macos
steps:
- uses: actions/checkout@main

- name: Install gtk3
if: ${{ matrix.os == 'ubuntu-16.04' }}
run: sudo apt-get install libgtk-3-dev libappindicator3-dev

- name: Setup Go environment
uses: actions/[email protected]

- name: Build
run: go build -o ${{ matrix.binary }} -ldflags "-s -w" tray.go
working-directory: src/net/cmd/systray/

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.binary }}
path: src/net/cmd/systray/${{ matrix.binary }}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ To allow others to use your computer for permuter runs, do the following:
- install Docker (used for sandboxing and to ensure a consistent environment)
- if on Linux, add yourself to the Docker group: `sudo usermod -aG docker $USER`
- install required packages: `python3 -m pip install docker`
(optionally add `pystray` and `Pillow` for experimental systray support)
- open a terminal, and run `./pah.py run-server` to start the server.
There are a few required arguments (e.g. how many cores to use), see `--help` for more details.

Expand Down
3 changes: 1 addition & 2 deletions src/net/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ def start_client(
feedback_queue,
)

thread = threading.Thread(target=conn.run)
thread.daemon = True
thread = threading.Thread(target=conn.run, daemon=True)
thread.start()

stats = (num_clients, num_servers, num_cores)
Expand Down
Binary file removed src/net/cmd/icon.png
Binary file not shown.
Binary file added src/net/cmd/icons/notok.ico
Binary file not shown.
Binary file added src/net/cmd/icons/ok.ico
Binary file not shown.
Binary file added src/net/cmd/icons/okthink.ico
Binary file not shown.
Loading

0 comments on commit 1c07a7e

Please sign in to comment.