mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 记录操作系统平台
This commit is contained in:
parent
08641595ae
commit
a6d945a9a1
3 changed files with 11 additions and 8 deletions
|
|
@ -18,13 +18,13 @@ package mobile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
|
||||||
"github.com/siyuan-note/siyuan/kernel/job"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||||
|
"github.com/siyuan-note/siyuan/kernel/job"
|
||||||
"github.com/siyuan-note/siyuan/kernel/model"
|
"github.com/siyuan-note/siyuan/kernel/model"
|
||||||
"github.com/siyuan-note/siyuan/kernel/server"
|
"github.com/siyuan-note/siyuan/kernel/server"
|
||||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||||
|
|
@ -36,10 +36,10 @@ func StartKernelFast(container, appDir, workspaceBaseDir, localIPs string) {
|
||||||
go server.Serve(true)
|
go server.Serve(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func StartKernel(container, appDir, workspaceBaseDir, timezoneID, localIPs, lang string) {
|
func StartKernel(container, appDir, workspaceBaseDir, timezoneID, localIPs, lang, osVer string) {
|
||||||
SetTimezone(container, appDir, timezoneID)
|
SetTimezone(container, appDir, timezoneID)
|
||||||
util.Mode = "prod"
|
util.Mode = "prod"
|
||||||
|
util.MobileOSVer = osVer
|
||||||
util.LocalIPs = strings.Split(localIPs, ",")
|
util.LocalIPs = strings.Split(localIPs, ",")
|
||||||
util.BootMobile(container, appDir, workspaceBaseDir, lang)
|
util.BootMobile(container, appDir, workspaceBaseDir, lang)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ package util
|
||||||
|
|
||||||
func GetOSPlatform() (plat, ver string) {
|
func GetOSPlatform() (plat, ver string) {
|
||||||
if ContainerIOS == Container {
|
if ContainerIOS == Container {
|
||||||
return "iOS", ""
|
return "iOS", MobileOSVer
|
||||||
}
|
}
|
||||||
if ContainerAndroid == Container {
|
if ContainerAndroid == Container {
|
||||||
return "Android", ""
|
return "Android", MobileOSVer
|
||||||
}
|
}
|
||||||
return "Unknown", ""
|
return "Unknown", MobileOSVer
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,14 @@ const (
|
||||||
// IsExiting 是否正在退出程序。
|
// IsExiting 是否正在退出程序。
|
||||||
var IsExiting = false
|
var IsExiting = false
|
||||||
|
|
||||||
|
// MobileOSVer 移动端操作系统版本。
|
||||||
|
var MobileOSVer string
|
||||||
|
|
||||||
func logBootInfo() {
|
func logBootInfo() {
|
||||||
plat, platVer := GetOSPlatform()
|
plat, platVer := GetOSPlatform()
|
||||||
osInfo := plat
|
osInfo := plat
|
||||||
if "" != platVer {
|
if "" != platVer {
|
||||||
osInfo += "/" + platVer
|
osInfo += " " + platVer
|
||||||
}
|
}
|
||||||
logging.LogInfof("kernel is booting:\n"+
|
logging.LogInfof("kernel is booting:\n"+
|
||||||
" * ver [%s]\n"+
|
" * ver [%s]\n"+
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue