소스 검색

:art: 新增内核启动参数 `mode` https://github.com/siyuan-note/siyuan/issues/5064

Liang Ding 3 년 전
부모
커밋
5ff6b4610a
3개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      DEV.md
  2. 1 1
      DEV_zh_CN.md
  3. 2 1
      kernel/util/working.go

+ 1 - 1
DEV.md

@@ -27,7 +27,7 @@ NPM mirror:
 
 
 * `cd kernel`
 * `cd kernel`
 * `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`
 * `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`
-* `SiYuan-Kernel.exe --wd=D:/siyuan/app`
+* `SiYuan-Kernel.exe --wd=D:/siyuan/app --mode=dev`
 
 
 ### iOS
 ### iOS
 
 

+ 1 - 1
DEV_zh_CN.md

@@ -27,7 +27,7 @@ NPM 镜像:
 
 
 * `cd kernel`
 * `cd kernel`
 * `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`
 * `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`
-* `SiYuan-Kernel.exe --wd=D:/siyuan/app`
+* `SiYuan-Kernel.exe --wd=D:/siyuan/app --mode=dev`
 
 
 ### iOS
 ### iOS
 
 

+ 2 - 1
kernel/util/working.go

@@ -63,7 +63,7 @@ func Boot() {
 	accessAuthCode := flag.String("accessAuthCode", "", "access auth code")
 	accessAuthCode := flag.String("accessAuthCode", "", "access auth code")
 	ssl := flag.Bool("ssl", false, "for https and wss")
 	ssl := flag.Bool("ssl", false, "for https and wss")
 	lang := flag.String("lang", "en_US", "zh_CN/zh_CHT/en_US/fr_FR")
 	lang := flag.String("lang", "en_US", "zh_CN/zh_CHT/en_US/fr_FR")
-
+	mode := flag.String("mode", "prod", "dev/prod")
 	flag.Parse()
 	flag.Parse()
 
 
 	if "" != *wdPath {
 	if "" != *wdPath {
@@ -72,6 +72,7 @@ func Boot() {
 	if "" != *lang {
 	if "" != *lang {
 		Lang = *lang
 		Lang = *lang
 	}
 	}
+	Mode = *mode
 	Resident = *resident
 	Resident = *resident
 	ReadOnly = *readOnly
 	ReadOnly = *readOnly
 	AccessAuthCode = *accessAuthCode
 	AccessAuthCode = *accessAuthCode