2023-06-24 12:39:55 +00:00
|
|
|
// SiYuan - Refactor your thinking
|
2022-05-26 07:18:53 +00:00
|
|
|
// Copyright (c) 2020-present, b3log.org
|
|
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
//go:build !mobile
|
|
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2022-07-15 01:25:02 +00:00
|
|
|
"github.com/siyuan-note/siyuan/kernel/cache"
|
2023-01-26 15:30:29 +00:00
|
|
|
"github.com/siyuan-note/siyuan/kernel/job"
|
2022-05-26 07:18:53 +00:00
|
|
|
"github.com/siyuan-note/siyuan/kernel/model"
|
|
|
|
|
"github.com/siyuan-note/siyuan/kernel/server"
|
|
|
|
|
"github.com/siyuan-note/siyuan/kernel/sql"
|
|
|
|
|
"github.com/siyuan-note/siyuan/kernel/util"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
util.Boot()
|
|
|
|
|
|
|
|
|
|
model.InitConf()
|
|
|
|
|
go server.Serve(false)
|
|
|
|
|
model.InitAppearance()
|
|
|
|
|
sql.InitDatabase(false)
|
2022-08-23 02:13:51 +00:00
|
|
|
sql.InitHistoryDatabase(false)
|
2023-08-04 04:05:29 +00:00
|
|
|
sql.InitAssetContentDatabase(false)
|
2022-05-26 07:18:53 +00:00
|
|
|
sql.SetCaseSensitive(model.Conf.Search.CaseSensitive)
|
2023-05-10 02:30:05 +00:00
|
|
|
sql.SetIndexAssetPath(model.Conf.Search.IndexAssetPath)
|
2022-05-26 07:18:53 +00:00
|
|
|
|
2022-10-22 03:55:12 +00:00
|
|
|
model.BootSyncData()
|
2022-05-26 07:18:53 +00:00
|
|
|
model.InitBoxes()
|
2023-01-18 08:20:57 +00:00
|
|
|
model.LoadFlashcards()
|
2024-04-29 08:10:56 +00:00
|
|
|
util.LoadAssetsTexts()
|
2022-05-26 07:18:53 +00:00
|
|
|
|
|
|
|
|
util.SetBooted()
|
2022-12-23 14:42:54 +00:00
|
|
|
util.PushClearAllMsg()
|
2023-01-26 15:30:29 +00:00
|
|
|
|
|
|
|
|
job.StartCron()
|
2024-12-05 01:01:51 +00:00
|
|
|
|
|
|
|
|
go util.LoadSysFonts()
|
2024-04-28 12:56:32 +00:00
|
|
|
go model.AutoGenerateFileHistory()
|
2022-07-15 01:25:02 +00:00
|
|
|
go cache.LoadAssets()
|
2023-03-16 14:55:32 +00:00
|
|
|
go util.CheckFileSysStatus()
|
2023-01-26 15:30:29 +00:00
|
|
|
|
2022-05-26 07:18:53 +00:00
|
|
|
model.WatchAssets()
|
2024-06-18 11:25:22 +00:00
|
|
|
model.WatchEmojis()
|
2022-05-26 07:18:53 +00:00
|
|
|
model.HandleSignal()
|
|
|
|
|
}
|