mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
bugfix.修复一个无法加载maaCore的bug
This commit is contained in:
@@ -20,7 +20,7 @@ public class MaaJavaSample {
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
//设定JNA寻找maa的dll的地址,同时也要把这个路径添加到环境变量中的Path中!
|
||||
String maaPath = "C:/Users/iguigui/Desktop/MaaCoreArknights3";
|
||||
String maaPath = "C:\\Users\\gui\\Desktop\\MeoAssistantArknights";
|
||||
System.setProperty("jna.library.path", maaPath);
|
||||
//adb地址,自己看着办
|
||||
String adbPath = maaPath + "/platform-tools/adb.exe";
|
||||
|
||||
@@ -18,7 +18,7 @@ object MaaService {
|
||||
|
||||
private val wsConnection = Collections.synchronizedSet<Connection?>(LinkedHashSet())
|
||||
|
||||
val MaaCore: MaaCore by lazy {
|
||||
val maaCore: MaaCore by lazy {
|
||||
var maaPath = File(File("").absolutePath).parent
|
||||
logger.info("maaPath $maaPath")
|
||||
// maaPath = "C:\\Users\\atmzx\\Desktop\\MaaCoreArknights3"
|
||||
@@ -33,8 +33,8 @@ object MaaService {
|
||||
// if (instancePool.containsKey(id)) {
|
||||
// return ConnectResponse(id, true)
|
||||
// }
|
||||
val maaInstance = MaaInstance(MaaCore, id, adbPath, host, detailJson, ::callBackLog)
|
||||
maaInstance.pointer = MaaCore.AsstCreateEx(maaInstance, maaInstance.id)
|
||||
val maaInstance = MaaInstance(maaCore, id, adbPath, host, detailJson, ::callBackLog)
|
||||
maaInstance.pointer = maaCore.AsstCreateEx(maaInstance, maaInstance.id)
|
||||
val connect = maaInstance.connect()
|
||||
if (!connect) {
|
||||
return ConnectResponse("", false)
|
||||
@@ -54,7 +54,7 @@ object MaaService {
|
||||
|
||||
fun stop(id: String) = instancePool[id]?.stop() ?: false
|
||||
|
||||
fun getVersion(): String = MaaCore.AsstGetVersion()
|
||||
fun getVersion(): String = maaCore.AsstGetVersion()
|
||||
|
||||
private fun sha1(password: String): String {
|
||||
val messageDigest = MessageDigest.getInstance("SHA")
|
||||
|
||||
Reference in New Issue
Block a user