mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-16 02:22:17 +08:00
set GIT_VERSION to core
This commit is contained in:
parent
aea7edd2f8
commit
d79fbf2519
|
@ -19,8 +19,9 @@ Java_com_github_kr328_clash_core_bridge_Bridge_nativeInit(JNIEnv *env, jobject t
|
|||
|
||||
scoped_string _home = get_string(home);
|
||||
scoped_string _version_name = get_string(version_name);
|
||||
char* _git_version = make_String(GIT_VERSION);
|
||||
|
||||
coreInit(_home, _version_name, sdk_version);
|
||||
coreInit(_home, _version_name, _git_version, sdk_version);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
|
|
|
@ -16,9 +16,10 @@ import (
|
|||
|
||||
var errBlocked = errors.New("blocked")
|
||||
|
||||
func Init(home, versionName string, platformVersion int) {
|
||||
log.Infoln("Init core, home: %s, versionName: %s, platformVersion: %d", home, versionName, platformVersion)
|
||||
func Init(home, versionName, gitVersion string, platformVersion int) {
|
||||
log.Infoln("Init core, home: %s, versionName: %s, gitVersion: %s, platformVersion: %d", home, versionName, gitVersion, platformVersion)
|
||||
constant.SetHomeDir(home)
|
||||
constant.Version = gitVersion
|
||||
app.ApplyVersionName(versionName)
|
||||
app.ApplyPlatformVersion(platformVersion)
|
||||
|
||||
|
|
|
@ -23,12 +23,13 @@ func main() {
|
|||
}
|
||||
|
||||
//export coreInit
|
||||
func coreInit(home, versionName C.c_string, sdkVersion C.int) {
|
||||
func coreInit(home, versionName, gitVersion C.c_string, sdkVersion C.int) {
|
||||
h := C.GoString(home)
|
||||
v := C.GoString(versionName)
|
||||
g := C.GoString(gitVersion)
|
||||
s := int(sdkVersion)
|
||||
|
||||
delegate.Init(h, v, s)
|
||||
delegate.Init(h, v, g, s)
|
||||
|
||||
reset()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user