Skip to content

Commit 9999aae

Browse files
authored
Minor fixes (#6)
* ci: add winfowsgui build flag * ci: use Windows for PR build * ci: add release action * ci: set job name * fix: set correct release action * fix: update action tag * fix: uppdate runner * ci: update release action * doc: update build command * chore: enable PR action * doc: update readme * ci: set job name * ci: update release action * chore: enable PR action * doc: update readme * ci: update runner instance * ci: add package install * ci: use ubuntu runner * doc: update readme
1 parent 7ccca69 commit 9999aae

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed

.github/workflows/pull_request.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
name: Pull Request
22
run-name: Pull Request on ${{ github.ref_name }} by @${{ github.actor }}
33

4+
45
on:
56
- pull_request
67
- workflow_dispatch
78

89

910
jobs:
1011

11-
validate:
12-
runs-on:
13-
- windows-latest
12+
validate-and-build:
13+
runs-on:
14+
- ubuntu-latest
1415
timeout-minutes: 15
1516
steps:
1617
- name: Checkout Code
1718
uses: actions/checkout@v4
19+
- name: Install libs
20+
run: sudo apt install -y gcc libgtk-3-dev libayatana-appindicator3-dev
1821
- name: Set up Go
1922
uses: actions/setup-go@v5
2023
with:
2124
go-version-file: 'go.mod'
2225
- name: Vet
2326
run: go vet ./...
2427
- name: Build
25-
run: go build -v -o runsyncapps -ldflags="-H windowsgui" ./cmd
28+
run: go build -v -o runsyncapps ./cmd
2629

2730
vulnerability-check:
2831
runs-on:
29-
- macos-latest
32+
- ubuntu-latest
33+
timeout-minutes: 15
3034
steps:
35+
- name: Install libs
36+
run: sudo apt install -y gcc libgtk-3-dev libayatana-appindicator3-dev
3137
- name: govulncheck
3238
uses: golang/govulncheck-action@v1
3339
with:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Release
22
run-name: Release on ${{ github.ref_name }} by @${{ github.actor }}
33

4+
45
on:
56
pull_request:
67
types:

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
# RunSyncedApp
1+
# RunSyncApps
22

3-
This small application allows to start multiple applications at once and if one of them is closed, the others are killed. A system tray icon allows the using to exit the application without killing the child processes.
3+
This small application allows to start multiple programs at once and if one of them is closed, the others are killed. Tested on Windows 11 and MacOS 14.5
44

5-
## Bulding
5+
- [1. Building](#1-building)
6+
- [2. Usage](#2-usage)
7+
- [3. JSON configuration](#3-json-configuration)
8+
- [4. SystemTray icon](#4-systemtray-icon)
9+
10+
## 1. Building
611

712
```shell
813
go build -o="runsyncapps.exe" ./cmd/
914
```
1015

11-
You can add the buyild flag `-ldflags="-H windowsgui"` to avoid the console to open when starting the app.
16+
On Windows, You can add the build flag `-ldflags="-H windowsgui"` to avoid the console to open when starting the app.
1217

13-
## Usage
18+
## 2. Usage
1419

1520
```shell
16-
runsyncedapp.exe --config=myconfig.json --log
21+
runsyncapps.exe --config=myconfig.json --log
1722
```
1823

19-
- `config` : path of the config file
20-
- `log` : log events in a `trace_<timestamp>.log` file
24+
- `config` : path of the config file (`config.json` by default)
25+
- `log` : log events in a `trace_<timestamp>.log` file (disabled by default)
2126

22-
## JSON configuration
27+
## 3. JSON configuration
2328

2429
The configuration file looks like this:
2530

@@ -49,9 +54,17 @@ The configuration file looks like this:
4954

5055
The parameters are the following:
5156

52-
- `waitCheck`: time in second to wait after the applications starts and the verifications
53-
- `waitExit`: time in second to wait before the applications closures
54-
- `applications`: array of application to execute:
57+
- `waitCheck`: timer (in seconds) after the processes are being monitored
58+
- `waitExit`: timer (in seconds) before the processes are being killed
59+
- `applications`: array of application to start:
5560
- `path`: full path of the application
56-
- `useExistingInstance`: don't start a new instance if it's already running
61+
- `useExistingInstance`: don't start a new instance if there is one already running
5762
- `killOnExit`: kill the application if it's running after another app has been killed
63+
64+
## 4. SystemTray icon
65+
66+
A system tray icon allows the using to exit the application without killing the child processes.
67+
68+
This works by default on Windows.
69+
70+
On MacOS you will need to bundle the application (see [getlantern/systray lib info](https://github.com/getlantern/systray/blob/master/README.md) and [official Apple documentation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1)).

internal/gui.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66

77
func OnReadyUI() {
88
systray.SetTemplateIcon(SysTrayIcon, SysTrayIcon)
9-
systray.SetTitle("RunSyncApp")
10-
systray.SetTooltip("RunSyncApp")
9+
systray.SetTitle("RunSyncApps")
10+
systray.SetTooltip("RunSyncApps")
1111

1212
// Exit menu
1313
mQuitOrig := systray.AddMenuItem("Quit", "Quit")

0 commit comments

Comments
 (0)