Improve Windows stash behaviour (#2543)

* Rename manager.instance to Manager
* Show dialog message on fatal error on Windows
* Hide console windows explicitly on icon launch

Gets rid of the windowsgui flag, which causes all sorts of issues.
Instead, checks if stash was launched from the icon, and if so hides the console.

* Remove fixconsole
* Add changelog entries
This commit is contained in:
WithoutPants
2022-05-04 10:37:32 +10:00
committed by GitHub
parent 36aa51a187
commit a6f15273d9
55 changed files with 262 additions and 9187 deletions

View File

@@ -41,7 +41,7 @@ var githash string
var uiBox = ui.UIBox
var loginUIBox = ui.LoginUIBox
func Start() {
func Start() error {
initialiseImages()
r := chi.NewRouter()
@@ -263,16 +263,18 @@ func Start() {
displayAddress = "http://" + displayAddress + "/"
}
go func() {
if tlsConfig != nil {
logger.Infof("stash is running at " + displayAddress)
logger.Error(server.ListenAndServeTLS("", ""))
} else {
logger.Infof("stash is running at " + displayAddress)
logger.Error(server.ListenAndServe())
}
manager.GetInstance().Shutdown(0)
}()
logger.Infof("stash is running at " + displayAddress)
if tlsConfig != nil {
err = server.ListenAndServeTLS("", "")
} else {
err = server.ListenAndServe()
}
if !errors.Is(err, http.ErrServerClosed) {
return err
}
return nil
}
func printVersion() {