diff --git a/.gitignore b/.gitignore index 9ce76b5..748115b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ /config/config.yml /chromium-857950/ /tools +QuestionBank.db +config/user.db +pid.pid diff --git a/main.go b/main.go index 0396330..46b304b 100644 --- a/main.go +++ b/main.go @@ -29,6 +29,7 @@ import ( "github.com/sjkhsl/study_xxqg/conf" "github.com/sjkhsl/study_xxqg/lib/state" "github.com/sjkhsl/study_xxqg/utils" + // "github.com/sjkhsl/study_xxqg/gui" "github.com/sjkhsl/study_xxqg/lib" "github.com/sjkhsl/study_xxqg/model" @@ -47,12 +48,7 @@ var ( var VERSION = "unknown" func init() { - if i { - core := &lib.Core{} - core.Init() - core.Quit() - os.Exit(0) - } + if runtime.GOOS != "windows" { runBack() } @@ -72,6 +68,12 @@ func init() { flag.BoolVar(&now, "now", false, "run cron now") flag.StringVar(&configPath, "config", "./config/config.yml", "设置配置文件路径") flag.Parse() + if i { + core := &lib.Core{} + core.Init() + core.Quit() + os.Exit(0) + } // 初始化配置文件 conf.InitConfig(configPath, utils.Restart) config = conf.GetConfig()