vendor/github.com/tadvi/systray/README.md
52 lines · 1664 bytes
1# systray
2
3Go package for Windows Systray icon, menu and notifications.
4
5## Dependencies
6
7No other dependencies except Go standard library.
8
9## Building
10
11If you want to package icon files and other resources into binary **rsrc** tool is recommended:
12
13 rsrc -manifest app.manifest -ico=app.ico,application_edit.ico,application_error.ico -o rsrc.syso
14
15Here app.manifest is XML file in format:
16```
17<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
18<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
19 <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="App" type="win32"/>
20 <dependency>
21 <dependentAssembly>
22 <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
23 </dependentAssembly>
24 </dependency>
25</assembly>
26```
27
28Most Windows applications do not display command prompt. Build your Go project with flag to indicate that it is Windows GUI binary:
29
30 go build -ldflags="-H windowsgui"
31
32## Samples
33
34Best way to learn how to use the library is to look at the included **example** project.
35
36
37
38Use **release.bat** to build it.
39
40## Caveats
41
42Package is designed to run as standalone GUI application. That means it runs its own Windows message loop.
43This can have unexpected side effects if you try to combine with other UI packages that also run they
44own message loops.
45
46## Credits
47
48This library is built based on
49
50[xilp/systray](https://github.com/xilp/systray)
51
52Constant definitions and syscall declarations have been reused from that package.