This commit is contained in:
Unknwon 2015-12-18 05:49:28 -05:00
parent 1d95844d55
commit 037a01c4e4
4 changed files with 21 additions and 3 deletions

View File

@ -12,7 +12,6 @@ import (
"runtime" "runtime"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
_ "github.com/kardianos/minwinsvc"
"github.com/gogits/gogs/cmd" "github.com/gogits/gogs/cmd"
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"

View File

@ -0,0 +1,15 @@
// +build miniwinsvc
// Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package setting
import (
_ "github.com/kardianos/minwinsvc"
)
func init() {
SupportMiniWinService = true
}

View File

@ -181,8 +181,9 @@ var (
// Highlight settings are loaded in modules/template/hightlight.go // Highlight settings are loaded in modules/template/hightlight.go
// Other settings // Other settings
ShowFooterBranding bool ShowFooterBranding bool
ShowFooterVersion bool ShowFooterVersion bool
SupportMiniWinService bool
// Global setting objects // Global setting objects
Cfg *ini.File Cfg *ini.File

View File

@ -82,6 +82,9 @@ func GlobalInit() {
if models.EnableTidb { if models.EnableTidb {
log.Info("TiDB Supported") log.Info("TiDB Supported")
} }
if setting.SupportMiniWinService {
log.Info("Builtin Windows Service Supported")
}
checkRunMode() checkRunMode()
if setting.StartSSHServer { if setting.StartSSHServer {