alttpo / sni

SNES Interface with gRPC API
MIT License
46 stars 12 forks source link

Please change the windows release to not create a console window #4

Closed dagit closed 2 years ago

dagit commented 2 years ago

The way sni is built for windows right now makes windows think it's a console application. This means that windows always creates a console window for it and closing the console window causes sni to exit. Because sni has a tray icon and a log file, I think the console window is redundant and just clutters up people's environment. Plus when the console window is created it steals focus.

According to stackoverflow this should be as simple as passing -ldflags -H=windowsgui during the build step.

JamesDunne commented 2 years ago

Sure. Can do.

JamesDunne commented 2 years ago

Try out https://github.com/alttpo/sni/releases/tag/v0.0.65

dagit commented 2 years ago

Thanks. That was quick.

I wanted to make sure the log existed and whatnot and I noticed something. The README.md says to look in %APPDATA%\Local\Temp, but I think it's outdated? The code creates the log at %LOCALAPPDATA\sni. Would it be possible to get a menu item in the sys tray like, "Open Log Folder" or maybe "View Log"?

JamesDunne commented 2 years ago

Yup, click the version menu item at the top to browse to logs folder.

I think the two path expressions evaluate to the same folder but I can make them consistent.

dagit commented 2 years ago

Yup, click the version menu item at the top to browse to logs folder.

Okay, that opens to the right place. I didn't think to click it, but it definitely does the trick.

I think the two path expressions evaluate to the same folder but I can make them consistent.

They different on my windows 10 account. The one in the readme doesn't exist but %LOCALAPPDATA%\sni opens up to a folder with my logs.

Thanks again.