commit
8b1156f72c
6
clients/java/README.MD
vendored
6
clients/java/README.MD
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
## 快速开始
|
||||
|
||||
* 下载 [最新发布的文件](https://github.com/lich0821/WeChatFerry/releases/latest),解压到 `WeChatFerry\clients\java\wcferry\src\main\resources\win32-x86-64`。
|
||||
* 下载 [最新发布的文件](https://github.com/lich0821/WeChatFerry/releases/latest),解压到 `WeChatFerry\clients\java\wcferry\dll`目录下。
|
||||
|
||||
* 使用惯用 IDE,打开工程,编译,运行。
|
||||
|
||||
@ -68,9 +68,9 @@ cd C:/Projs/WeChatFerry/java/wcferry/src/main/java
|
||||
protoc.exe --java_out=. --proto_path=C:\Projs\WeChatFerry\WeChatFerry\rpc\proto wcf.proto
|
||||
```
|
||||
|
||||
### 添加 `wcferry` 依赖
|
||||
### 添加 `dll` 依赖
|
||||
|
||||
将 `wcf.exe` 、 `spy.dll` 、 `spy_debug.dll` 添加到 `WeChatFerry\clients\java\wcferry\src\main\resources\win32-x86-64`。
|
||||
将 `spy.dll` 、 `spy_debug.dll`、 `spy.dll` 添加到 `WeChatFerry\clients\java\wcferry\dll`。
|
||||
|
||||
### 其他问题
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ public class Main {
|
||||
// Client client = new Client("127.0.0.1", 10086);
|
||||
|
||||
// 本地启动 RPC
|
||||
Client client = new Client(true); // 默认 10086 端口
|
||||
Client client = new Client(); // 默认 10086 端口
|
||||
// Client client = new Client(10088,true); // 也可以指定端口
|
||||
|
||||
// 是否已登录
|
||||
@ -60,3 +60,4 @@ public class Main {
|
||||
client.keepRunning();
|
||||
}
|
||||
}
|
||||
|
||||
|
30
clients/java/wcferry/src/main/java/com/iamteer/SDK.java
vendored
Normal file
30
clients/java/wcferry/src/main/java/com/iamteer/SDK.java
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
package com.iamteer;
|
||||
|
||||
import com.sun.jna.Library;
|
||||
import com.sun.jna.Native;
|
||||
|
||||
/**
|
||||
* SDK.dll的接口类
|
||||
* @Description
|
||||
* @Author xinggq
|
||||
* @Date 2024/7/10
|
||||
*/
|
||||
public interface SDK extends Library {
|
||||
// 读取项目根目录下dll文件夹,而且只能写绝对路径,放在resource下会有问题,暂时先不解决
|
||||
// 打包后,dll文件应该放在jar外,这样dll更新不需要生成jar包,重启下就ok了
|
||||
SDK INSTANCE = Native.load(System.getProperty("user.dir")+"\\dll\\sdk.dll", SDK.class);
|
||||
|
||||
/**
|
||||
* 初始化SDK
|
||||
* @param debug
|
||||
* @param port
|
||||
* @return
|
||||
*/
|
||||
int WxInitSDK(boolean debug, int port);
|
||||
|
||||
/**
|
||||
* 退出SDK
|
||||
* @return
|
||||
*/
|
||||
int WxDestroySDK();
|
||||
}
|
10032
clients/java/wcferry/src/main/java/com/iamteer/Wcf.java
vendored
10032
clients/java/wcferry/src/main/java/com/iamteer/Wcf.java
vendored
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user