aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gogs.go1
-rw-r--r--modules/setting/miniwinsvc.go15
-rw-r--r--modules/setting/setting.go5
-rw-r--r--routers/install.go3
4 files changed, 21 insertions, 3 deletions
diff --git a/gogs.go b/gogs.go
index d87a9f9d..5afeb076 100644
--- a/gogs.go
+++ b/gogs.go
@@ -12,7 +12,6 @@ import (
"runtime"
"github.com/codegangsta/cli"
- _ "github.com/kardianos/minwinsvc"
"github.com/gogits/gogs/cmd"
"github.com/gogits/gogs/modules/setting"
diff --git a/modules/setting/miniwinsvc.go b/modules/setting/miniwinsvc.go
new file mode 100644
index 00000000..02e8eb91
--- /dev/null
+++ b/modules/setting/miniwinsvc.go
@@ -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
+}
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 532d8595..67f2f158 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -181,8 +181,9 @@ var (
// Highlight settings are loaded in modules/template/hightlight.go
// Other settings
- ShowFooterBranding bool
- ShowFooterVersion bool
+ ShowFooterBranding bool
+ ShowFooterVersion bool
+ SupportMiniWinService bool
// Global setting objects
Cfg *ini.File
diff --git a/routers/install.go b/routers/install.go
index d5472c9b..120aa468 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -82,6 +82,9 @@ func GlobalInit() {
if models.EnableTidb {
log.Info("TiDB Supported")
}
+ if setting.SupportMiniWinService {
+ log.Info("Builtin Windows Service Supported")
+ }
checkRunMode()
if setting.StartSSHServer {