Skip to content

Commit

Permalink
cmd/client-server: disable daemon on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nange committed Feb 26, 2020
1 parent e054a9e commit 148e3c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ client-server-with-tray:
cd cmd/client-server; \
$(GO) build -tags "with_tray " -o client-server-with-tray

client-server-with-tray-windows:
cd cmd/client-server; \
$(GO) build -ldflags -H=windowsgui -tags "with_tray " -o client-server-with-tray

client-server-with-notray:
cd cmd/client-server; \
$(GO) build -tags "with_notray " -o client-server-with-notray
Expand Down
5 changes: 4 additions & 1 deletion cmd/client-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"os"
"path"
"runtime"

"github.com/nange/easyss"
"github.com/nange/easyss/util"
Expand Down Expand Up @@ -36,7 +37,9 @@ func main() {
}
// we starting easyss as daemon only in client model, and save logs to file
var writer io.Writer
easyss.Daemon(godaemon)
if runtime.GOOS != "windows" {
easyss.Daemon(godaemon)
}
var err error
writer, err = util.GetLogFileWriter(easyss.LogMaxAge, easyss.LogRotationTime)
if err != nil {
Expand Down

0 comments on commit 148e3c7

Please sign in to comment.