Skip to content

Commit db3c10b

Browse files
committed
modify:init parameter and used now for plugin module
1 parent 4d1af4f commit db3c10b

File tree

44 files changed

+185
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+185
-132
lines changed

CHANGELOG

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
XEngine_APIService V3.11.0.1001
2+
3+
增加:更多发布系统支持
4+
更新:依赖库
5+
优化:编译脚本
6+
修改:插件支持获取更多信息了
7+
修改:删除了插件配置,不在需要
8+
修复:配置文件内存溢出问题
9+
10+
ci:added debian and fedora system support
11+
update:depend library
12+
improved:make file build flags
13+
modify:get more info support for plugin module
14+
modify:delete plugin configure and plugin auto load support
15+
fixed:memory leak for configure parse
16+
======================================================================================
117
XEngine_APIService V3.10.0.1001
218

319
增加:windows服务支持

README.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ In order to save resources, now the IP and phone and mac databases need to be co
7979
#### Database Env
8080
MYSQL database version 8.0 or above is required. Create a table through CreateDatabase.sql, and then import other sql table
8181
Modify the database configuration in XSQL in the configuration file to your
82+
The default configuration does not enable database support. If the database interface is required, you need to enable the database yourself
8283

8384
#### Windows
8485
need to vcpkg configure third-part env.refer vcpkg install guide.after installed and execution:vcpkg.exe install lua:x86-windows opencv[contrib]:x86-windows libqrencode:x86-windows lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ macos执行:./XEngine_LINEnv.sh -i 3
8282
#### 数据库环境
8383
需要MYSQL数据库8.0以上版本.通过CreateDatabase.sql创建表,然后导入剩余的表
8484
修改配置文件里面XSQL里面的数据库配置为你的
85+
默认配置没有开启数据库支持,如果需要数据库接口支持,需要自己开启数据库
8586

8687
#### sub module
8788
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块

XEngine_Docment/Docment_en.docx

4.66 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

782 Bytes
Binary file not shown.

XEngine_Release/XEngine_LuaPlugin/ModulePlugin_Calculation.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
function PluginCore_Init()
1+
function PluginCore_Init(pSt_PluginParameter)
2+
-- print("API Ver:", pSt_PluginParameter.APIVersion)
3+
-- print("XEngine Ver:", pSt_PluginParameter.XEngineVer)
24
return true
35
end
46

XEngine_Release/XEngine_LuaPlugin/ModulePlugin_Heart.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
function PluginCore_Init()
1+
function PluginCore_Init(pSt_PluginParameter)
2+
-- print("API Ver:", pSt_PluginParameter.APIVersion)
3+
-- print("XEngine Ver:", pSt_PluginParameter.XEngineVer)
24
return true
35
end
46

XEngine_Release/XEngine_LuaPlugin/ModulePlugin_OSTime.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
function PluginCore_Init()
1+
function PluginCore_Init(pSt_PluginParameter)
2+
-- print("API Ver:", pSt_PluginParameter.APIVersion)
3+
-- print("XEngine Ver:", pSt_PluginParameter.XEngineVer)
24
return true
35
end
46

XEngine_Source/XEngine_ModulePlugin/ModulePlugin_Define.h

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ extern "C" bool ModulePlugin_LibCore_Init();
3939
类型:常量字符指针
4040
可空:N
4141
意思:插件模块路径
42-
参数.三:lParam
43-
In/Out:In/Out
44-
类型:无类型指针
42+
参数.三:pSt_PluginParameter
43+
In/Out:In
44+
类型:数据结构指针
4545
可空:Y
46-
意思:自定义输入输出参数
46+
意思:输入插件初始化参数
4747
返回值
4848
类型:逻辑型
4949
意思:是否成功添加
5050
备注:
5151
*********************************************************************/
52-
extern "C" bool ModulePlugin_LibCore_Push(XNETHANDLE * pxhNet, LPCXSTR lpszPluginFile, XPVOID lParam = NULL);
52+
extern "C" bool ModulePlugin_LibCore_Push(XNETHANDLE * pxhNet, LPCXSTR lpszPluginFile, XENGINE_PLUGINPARAM* pSt_PluginParameter = NULL);
5353
/********************************************************************
5454
函数名称:ModulePlugin_LibCore_Exec
5555
函数功能:执行一次
@@ -167,17 +167,17 @@ extern "C" bool ModulePlugin_LuaCore_Init();
167167
类型:常量字符指针
168168
可空:N
169169
意思:插件模块路径
170-
参数.三:lParam
171-
In/Out:In/Out
172-
类型:无类型指针
170+
参数.三:pSt_PluginParameter
171+
In/Out:In
172+
类型:数据结构指针
173173
可空:Y
174-
意思:自定义输入输出参数
174+
意思:输入插件初始化参数
175175
返回值
176176
类型:逻辑型
177177
意思:是否成功添加
178178
备注:
179179
*********************************************************************/
180-
extern "C" bool ModulePlugin_LuaCore_Push(XNETHANDLE* pxhModule, LPCXSTR lpszPluginFile, XPVOID lParam = NULL);
180+
extern "C" bool ModulePlugin_LuaCore_Push(XNETHANDLE* pxhModule, LPCXSTR lpszPluginFile, XENGINE_PLUGINPARAM* pSt_PluginParameter = NULL);
181181
/********************************************************************
182182
函数名称:ModulePlugin_LuaCore_Exec
183183
函数功能:执行一次
@@ -293,14 +293,19 @@ extern "C" bool ModulePlugin_Loader_Init();
293293
参数.二:nType
294294
In/Out:In
295295
类型:整数型
296-
可空:Y
296+
可空:N
297297
意思:0为lib,1为lua
298+
参数.三:pSt_PluginParameter
299+
In/Out:In
300+
类型:数据结构指针
301+
可空:Y
302+
意思:输入插件初始化参数
298303
返回值
299304
类型:逻辑型
300305
意思:是否成功
301306
备注:
302307
*********************************************************************/
303-
extern "C" bool ModulePlugin_Loader_Insert(LPCXSTR lpszModuleName, int nType = 0);
308+
extern "C" bool ModulePlugin_Loader_Insert(LPCXSTR lpszModuleName, int nType, XENGINE_PLUGINPARAM* pSt_PluginParameter = NULL);
304309
/********************************************************************
305310
函数名称:ModulePlugin_Loader_Find
306311
函数功能:查找方法是否注册

XEngine_Source/XEngine_ModulePlugin/ModulePlugin_LibCore/ModulePlugin_LibCore.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ bool CModulePlugin_LibCore::ModulePlugin_LibCore_Init()
5656
类型:常量字符指针
5757
可空:N
5858
意思:插件模块路径
59-
参数.三:lParam
60-
In/Out:In/Out
61-
类型:无类型指针
59+
参数.三:pSt_PluginParameter
60+
In/Out:In
61+
类型:数据结构指针
6262
可空:Y
63-
意思:自定义输入输出参数
63+
意思:输入插件初始化参数
6464
返回值
6565
类型:逻辑型
6666
意思:是否成功添加
6767
备注:
6868
*********************************************************************/
69-
bool CModulePlugin_LibCore::ModulePlugin_LibCore_Push(XNETHANDLE* pxhModule, LPCXSTR lpszPluginFile, XPVOID lParam)
69+
bool CModulePlugin_LibCore::ModulePlugin_LibCore_Push(XNETHANDLE* pxhModule, LPCXSTR lpszPluginFile, XENGINE_PLUGINPARAM* pSt_PluginParameter)
7070
{
7171
ModulePlugin_IsErrorOccur = false;
7272

@@ -76,7 +76,7 @@ bool CModulePlugin_LibCore::ModulePlugin_LibCore_Push(XNETHANDLE* pxhModule, LPC
7676
ModulePlugin_dwErrorCode = BaseLib_GetLastError();
7777
return false;
7878
}
79-
if (!ModulePlugin_LibCore_Add(*pxhModule, lpszPluginFile, lParam))
79+
if (!ModulePlugin_LibCore_Add(*pxhModule, lpszPluginFile, pSt_PluginParameter))
8080
{
8181
return false;
8282
}
@@ -256,17 +256,17 @@ bool CModulePlugin_LibCore::ModulePlugin_LibCore_Destroy()
256256
类型:常量字符指针
257257
可空:N
258258
意思:插件模块路径
259-
参数.三:lParam
260-
In/Out:In/Out
261-
类型:无类型指针
259+
参数.三:pSt_PluginParameter
260+
In/Out:In
261+
类型:数据结构指针
262262
可空:Y
263-
意思:自定义输入输出参数
263+
意思:输入插件初始化参数
264264
返回值
265265
类型:逻辑型
266266
意思:是否成功执行
267267
备注:
268268
*********************************************************************/
269-
bool CModulePlugin_LibCore::ModulePlugin_LibCore_Add(XNETHANDLE xhNet, LPCXSTR lpszPluginFile, XPVOID lParam)
269+
bool CModulePlugin_LibCore::ModulePlugin_LibCore_Add(XNETHANDLE xhNet, LPCXSTR lpszPluginFile, XENGINE_PLUGINPARAM* pSt_PluginParameter)
270270
{
271271
ModulePlugin_IsErrorOccur = false;
272272

@@ -351,7 +351,7 @@ bool CModulePlugin_LibCore::ModulePlugin_LibCore_Add(XNETHANDLE xhNet, LPCXSTR l
351351
return false;
352352
}
353353
//初始化内部模块
354-
if (!st_FrameWork.fpCall_PluginCore_Init(lParam))
354+
if (!st_FrameWork.fpCall_PluginCore_Init(pSt_PluginParameter))
355355
{
356356
XFreeModule(st_FrameWork.mhFile);
357357
ModulePlugin_IsErrorOccur = true;

0 commit comments

Comments
 (0)