Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tray #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tkey-ssh-agent.exe:
tkey-ssh-agent-tray.exe:
$(MAKE) -C gotools go-winres
cd ./cmd/tkey-ssh-agent-tray && ../../gotools/go-winres make --arch amd64
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-H windowsgui" -trimpath -buildvcs=false ./cmd/tkey-ssh-agent-tray
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-H windowsgui -X main.version=$(TKEY_SSH_AGENT_VERSION)" -trimpath -buildvcs=false ./cmd/tkey-ssh-agent-tray

.PHONY: clean
clean:
Expand Down
11 changes: 9 additions & 2 deletions cmd/tkey-ssh-agent-tray/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const (
mainExe = "tkey-ssh-agent.exe"
)

var version string

var notify = func(msg string) {
tkeyutil.Notify(progname, msg)
}
Expand All @@ -40,6 +42,10 @@ func main() {
os.Exit(1)
}

if version == "" {
version = "unknown" // The version should be set from make during build.
}

// We're not supposed to be run in a console , but if we still are
// then try to get our output into it
if err := fixconsole.FixConsoleIfNeeded(); err != nil {
Expand Down Expand Up @@ -122,10 +128,11 @@ Source code is licensed under
GNU General Public License v2.0 only
unless otherwise noted in the source code.

Source repository: https://github.com/tillitis/tillitis-key1-apps
Source repository: https://github.com/tillitis/tkey-ssh-agent
Tillitis: https://www.tillitis.se

Running: %s`, mainCmdLine))
Version: %s
Running: %s`, version, mainCmdLine))
}
}()

Expand Down