Esempio n. 1
0
func Run(which string) {
	exec.Command("cmd.exe", "/c", "title", config.APP_FULL_NAME).Start()
	defer func() {
		if cache.Task.InheritDeduplication {
			scheduler.SaveDeduplication()
		}
	}()

	// 选择运行界面
	switch which {
	case "gui":
		gui.Run()

	case "cmd":
		cmd.Run()

	case "web":
		fallthrough
	default:
		ctrl := make(chan os.Signal, 1)
		signal.Notify(ctrl, os.Interrupt, os.Kill)
		go web.Run()
		<-ctrl
	}
}
Esempio n. 2
0
func main() {
	setConf() // 不调用则为默认值

	// 开始运行
	// web.Run() // web版
	cmd.Run() // cmd版
	// gui.Run() // gui版
}
Esempio n. 3
0
func run(which string) {
	exec.Command("/bin/sh", "-c", "title", config.APP_FULL_NAME).Start()
	defer func() {
		scheduler.TryFlushHistory()
	}()

	// 选择运行界面
	switch which {
	case "cmd":
		cmd.Run()

	case "web":
		fallthrough
	default:
		ctrl := make(chan os.Signal, 1)
		signal.Notify(ctrl, os.Interrupt, os.Kill)
		go web.Run()
		<-ctrl
	}
}
Esempio n. 4
0
func run(which string) {
	exec.Command("cmd.exe", "/c", "title", config.FULL_NAME).Start()

	// 选择运行界面
	switch which {
	case "gui":
		gui.Run()

	case "cmd":
		cmd.Run()

	case "web":
		fallthrough
	default:
		ctrl := make(chan os.Signal, 1)
		signal.Notify(ctrl, os.Interrupt, os.Kill)
		go web.Run()
		<-ctrl
	}
}