]> source.dussan.org Git - gitea.git/commitdiff
fix #2189
authorUnknwon <u@gogs.io>
Fri, 18 Dec 2015 10:49:28 +0000 (05:49 -0500)
committerUnknwon <u@gogs.io>
Fri, 18 Dec 2015 10:49:28 +0000 (05:49 -0500)
gogs.go
modules/setting/miniwinsvc.go [new file with mode: 0644]
modules/setting/setting.go
routers/install.go

diff --git a/gogs.go b/gogs.go
index d87a9f9d10fb64e9428e9605c4877d609516e711..5afeb0764c34436552b0db77566f2377ddd7a304 100644 (file)
--- 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 (file)
index 0000000..02e8eb9
--- /dev/null
@@ -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
+}
index 532d8595e93cbed20cdc5c8ef7e1d28d53ad761e..67f2f158b15c62547fb4296e565a8bcaa729a9a6 100644 (file)
@@ -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
index d5472c9b3eba88fc762e76beaa1d81e77ab6e492..120aa468513daef726de301330de4075b8bada76 100644 (file)
@@ -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 {