2022-12-10 15:01:04 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
2023-02-19 23:21:47 +08:00
|
|
|
// Licensed under Apache License Version 2.0, January 2004
|
|
|
|
//
|
|
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
2022-12-10 15:01:04 +08:00
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
// energy 扩展定义, 编译版本, CEF版本
|
2023-05-31 17:41:14 +08:00
|
|
|
|
2022-12-10 15:01:04 +08:00
|
|
|
package cef
|
|
|
|
|
|
|
|
import (
|
2023-06-11 00:10:55 +08:00
|
|
|
"github.com/energye/energy/v2/cef/internal/def"
|
2023-06-02 08:32:10 +08:00
|
|
|
"github.com/energye/energy/v2/cef/internal/version"
|
2023-05-31 18:00:34 +08:00
|
|
|
"github.com/energye/energy/v2/common/imports"
|
2022-12-10 15:01:04 +08:00
|
|
|
"github.com/energye/golcl/lcl/api"
|
|
|
|
)
|
|
|
|
|
2023-06-02 08:32:10 +08:00
|
|
|
// defInit
|
|
|
|
// GlobalInit
|
|
|
|
func defInit() {
|
2023-06-02 16:18:58 +08:00
|
|
|
{
|
|
|
|
// Set pascal lib-lcl version
|
2023-06-11 00:10:55 +08:00
|
|
|
r1, _, _ := imports.Proc(def.LibVersion).Call()
|
2023-06-02 16:18:58 +08:00
|
|
|
version.SetLibVersion(api.GoStr(r1))
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// Set pascal lib-lcl build version
|
2023-06-11 00:10:55 +08:00
|
|
|
r1, _, _ := imports.Proc(def.LibBuildVersion).Call()
|
2023-06-02 16:18:58 +08:00
|
|
|
version.SetLibBuildVersion(api.GoStr(r1))
|
|
|
|
}
|
2022-12-10 15:01:04 +08:00
|
|
|
}
|
2023-02-20 14:42:17 +08:00
|
|
|
|
|
|
|
// setMacOSXCommandLine
|
|
|
|
// 针对 MacOSX 设置命令行参数
|
|
|
|
//
|
|
|
|
// 没找到什么好的方式,只能这样设置
|
|
|
|
func setMacOSXCommandLine(commandLine uintptr) {
|
2023-06-11 00:10:55 +08:00
|
|
|
imports.Proc(def.SetMacOSXCommandLine).Call(commandLine)
|
2023-02-20 14:42:17 +08:00
|
|
|
}
|