mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2025-02-16 23:03:14 +03: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 _home = get_string(home);
|
||||||
scoped_string _version_name = get_string(version_name);
|
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
|
JNIEXPORT void JNICALL
|
||||||
|
@ -16,9 +16,10 @@ import (
|
|||||||
|
|
||||||
var errBlocked = errors.New("blocked")
|
var errBlocked = errors.New("blocked")
|
||||||
|
|
||||||
func Init(home, versionName string, platformVersion int) {
|
func Init(home, versionName, gitVersion string, platformVersion int) {
|
||||||
log.Infoln("Init core, home: %s, versionName: %s, platformVersion: %d", home, versionName, platformVersion)
|
log.Infoln("Init core, home: %s, versionName: %s, gitVersion: %s, platformVersion: %d", home, versionName, gitVersion, platformVersion)
|
||||||
constant.SetHomeDir(home)
|
constant.SetHomeDir(home)
|
||||||
|
constant.Version = gitVersion
|
||||||
app.ApplyVersionName(versionName)
|
app.ApplyVersionName(versionName)
|
||||||
app.ApplyPlatformVersion(platformVersion)
|
app.ApplyPlatformVersion(platformVersion)
|
||||||
|
|
||||||
|
@ -23,12 +23,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//export coreInit
|
//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)
|
h := C.GoString(home)
|
||||||
v := C.GoString(versionName)
|
v := C.GoString(versionName)
|
||||||
|
g := C.GoString(gitVersion)
|
||||||
s := int(sdkVersion)
|
s := int(sdkVersion)
|
||||||
|
|
||||||
delegate.Init(h, v, s)
|
delegate.Init(h, v, g, s)
|
||||||
|
|
||||||
reset()
|
reset()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user