andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 651 forks source link

How to hide console under Mac OS X? #240

Closed nifflin closed 7 years ago

nifflin commented 7 years ago

Under Windows, go build -ldflags -H=windowsgui main.go could do this. But there is also console under OS X, how to hide it?

andlabs commented 7 years ago

Are you running from a console? OS X doesn't have Windows-like console behavior...

nifflin commented 7 years ago

No, I double click the binary file from finder.

nifflin commented 7 years ago
3eb15c2b-f480-4288-aabf-e9e9f97639d4
andlabs commented 7 years ago

Ah, so OS X does open a terminal for a binary from the Finder then, or at least it does by default; try using Get Info?. If that doesn't work, try running from a .app bundle.

nifflin commented 7 years ago

Yes, if I rename the binary file to *.app, there is no terminal after running again.