mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user