This commit is contained in:
parent
e961875129
commit
e9ffb03491
|
@ -0,0 +1,10 @@
|
|||
@echo off
|
||||
mkdir lib
|
||||
mklink /j .\lua ..\Release64\lua
|
||||
mklink /j .\test ..\Release64\test
|
||||
mklink /j .\tools ..\Release64\tools
|
||||
|
||||
mklink /h .\build.lua ..\Release64\build.lua
|
||||
mklink /h .\ggelua.lua ..\Release64\ggelua.lua
|
||||
mklink /h .\main.lua ..\Release64\main.lua
|
||||
pause
|
|
@ -1,13 +0,0 @@
|
|||
@echo off
|
||||
|
||||
rd lua /q
|
||||
mklink /j .\lua ..\Release64\lua
|
||||
rd 实例 /q
|
||||
mklink /j .\实例 ..\Release64\实例
|
||||
rd 插件开发 /q
|
||||
mklink /j .\插件开发 ..\Release64\插件开发
|
||||
|
||||
copy /y ..\Release64\build.lua .\build.lua
|
||||
copy /y ..\Release64\ggelua.lua .\ggelua.lua
|
||||
copy /y ..\Release64\main.lua .\main.lua
|
||||
pause
|
|
@ -0,0 +1,10 @@
|
|||
@echo off
|
||||
mkdir lib
|
||||
mklink /j .\lua ..\Release64\lua
|
||||
mklink /j .\test ..\Release64\test
|
||||
mklink /j .\tools ..\Release64\tools
|
||||
|
||||
mklink /h .\build.lua ..\Release64\build.lua
|
||||
mklink /h .\ggelua.lua ..\Release64\ggelua.lua
|
||||
mklink /h .\main.lua ..\Release64\main.lua
|
||||
pause
|
|
@ -1,13 +0,0 @@
|
|||
@echo off
|
||||
|
||||
rd lua /q
|
||||
mklink /j .\lua ..\Release64\lua
|
||||
rd 实例 /q
|
||||
mklink /j .\实例 ..\Release64\实例
|
||||
rd 插件开发 /q
|
||||
mklink /j .\插件开发 ..\Release64\插件开发
|
||||
|
||||
copy /y ..\Release64\build.lua .\build.lua
|
||||
copy /y ..\Release64\ggelua.lua .\ggelua.lua
|
||||
copy /y ..\Release64\main.lua .\main.lua
|
||||
pause
|
|
@ -0,0 +1,10 @@
|
|||
@echo off
|
||||
mkdir lib
|
||||
mklink /j .\lua ..\Release64\lua
|
||||
mklink /j .\test ..\Release64\test
|
||||
mklink /j .\tools ..\Release64\tools
|
||||
|
||||
mklink /h .\build.lua ..\Release64\build.lua
|
||||
mklink /h .\ggelua.lua ..\Release64\ggelua.lua
|
||||
mklink /h .\main.lua ..\Release64\main.lua
|
||||
pause
|
|
@ -1,13 +0,0 @@
|
|||
@echo off
|
||||
|
||||
rd lua /q
|
||||
mklink /j .\lua ..\Release64\lua
|
||||
rd 实例 /q
|
||||
mklink /j .\实例 ..\Release64\实例
|
||||
rd 插件开发 /q
|
||||
mklink /j .\插件开发 ..\Release64\插件开发
|
||||
|
||||
copy /y ..\Release64\build.lua .\build.lua
|
||||
copy /y ..\Release64\ggelua.lua .\ggelua.lua
|
||||
copy /y ..\Release64\main.lua .\main.lua
|
||||
pause
|
|
@ -84,15 +84,14 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>LUA_UCID;LUA_BUILD_AS_DLL;LUA_COMPAT_MATHLIB;LUA_USER_H="luauser.h";WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll;.\\lib\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)
|
||||
copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitecture)\插件开发\library\$(TargetName)_$(Configuration).lib</Command>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -102,15 +101,14 @@ copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitectu
|
|||
<PreprocessorDefinitions>LUA_UCID;LUA_BUILD_AS_DLL;LUA_COMPAT_MATHLIB;LUA_USER_H="luauser.h";WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll;.\\lib\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)
|
||||
copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitecture)\插件开发\library\$(TargetName)_$(Configuration).lib</Command>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -122,11 +120,10 @@ copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitectu
|
|||
<PreprocessorDefinitions>LUA_UCID;LUA_BUILD_AS_DLL;LUA_COMPAT_MATHLIB;LUA_USER_H="luauser.h";LUA_BUILD_AS_DLL;LUA_UCID;LUA_COMPAT_MATHLIB;LUA_USER_H="luauser.h";%(PreprocessorDefinitions);%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll;.\\lib\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)
|
||||
copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitecture)\插件开发\library\$(TargetName)_$(Configuration).lib</Command>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -136,15 +133,14 @@ copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitectu
|
|||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/D "LUA_PATH_DEFAULT=\"!\\?.lua;!\\lua\\?.lua;.\\?.lua;.\\lua\\?.lua\"" /D "LUA_CPATH_DEFAULT=\"!\\?.dll;!\\lib\\?.dll;.\\?.dll;.\\lib\\?.dll\"" %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)
|
||||
copy /y "$(OutDir)"$(TargetName).lib ..\..\..\GGELUA\Release$(PlatformArchitecture)\插件开发\library\$(TargetName)_$(Configuration).lib</Command>
|
||||
<Command>copy /y "$(OutDir)"$(TargetFileName) ..\..\..\GGELUA\$(Configuration)$(PlatformArchitecture)\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1264,7 +1264,7 @@ BOOLEAN utf8_CreateSymbolicLink(LPCSTR lpSymlinkFileName, LPCSTR lpTargetFileNam
|
|||
WCHAR FileName2[MAX_PATH];
|
||||
memset(FileName2, 0, sizeof(FileName2));
|
||||
UTF8ToUnicode(lpTargetFileName, FileName2);
|
||||
return CreateSymbolicLinkW(FileName, FileName2,dwFlags);
|
||||
return CreateSymbolicLinkW(FileName, FileName2, dwFlags);
|
||||
}
|
||||
|
||||
BOOLEAN utf8_CreateHardLink(LPCSTR lpFileName, LPCSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
||||
|
|
|
@ -112,7 +112,7 @@ static int GetPackHeaderFlag(lua_State* L){
|
|||
//ITcpAgent
|
||||
static int SendSmallFile(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
lua_pushboolean(L,Agent->SendSmallFile(luaL_checkinteger(L,2),luaL_checkstring(L,3),
|
||||
lua_pushboolean(L,Agent->SendSmallFile((CONNID)luaL_checkinteger(L,2),luaL_checkstring(L,3),
|
||||
(LPWSABUF)luaL_optlstring(L,4,nullptr,NULL),
|
||||
(LPWSABUF)luaL_optlstring(L,5,nullptr,NULL)));
|
||||
return 1;
|
||||
|
@ -168,7 +168,7 @@ static int GetRemoteHost(lua_State* L){
|
|||
char* p = luaL_buffinitsize(L,&b,LUAL_BUFFERSIZE);
|
||||
int len = LUAL_BUFFERSIZE;
|
||||
USHORT port;
|
||||
if (Agent->GetRemoteHost(luaL_checkinteger(L,2),p,len,port)){
|
||||
if (Agent->GetRemoteHost((CONNID)luaL_checkinteger(L,2),p,len,port)){
|
||||
luaL_pushresultsize(&b,len-1);
|
||||
lua_pushinteger(L,port);
|
||||
return 2;
|
||||
|
@ -190,7 +190,7 @@ static int Send(lua_State* L){
|
|||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
size_t len;
|
||||
BYTE* buf = (BYTE*)luaL_checklstring(L,3,&len);
|
||||
lua_pushboolean(L,Agent->Send(luaL_checkinteger(L,2),buf,(int)len,(int)luaL_optinteger(L,4,0)));
|
||||
lua_pushboolean(L,Agent->Send((CONNID)luaL_checkinteger(L,2),buf,(int)len,(int)luaL_optinteger(L,4,0)));
|
||||
return 1;
|
||||
}
|
||||
//static int SendPackets(lua_State* L){
|
||||
|
@ -200,12 +200,12 @@ static int Send(lua_State* L){
|
|||
//}
|
||||
static int PauseReceive(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
lua_pushboolean(L,Agent->PauseReceive(luaL_checkinteger(L,2),luaL_optboolean(L,3,TRUE)));
|
||||
lua_pushboolean(L,Agent->PauseReceive((CONNID)luaL_checkinteger(L,2),luaL_optboolean(L,3,TRUE)));
|
||||
return 1;
|
||||
}
|
||||
static int Disconnect(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
lua_pushboolean(L,Agent->Disconnect(luaL_checkinteger(L,2),luaL_optboolean(L,3,TRUE)));
|
||||
lua_pushboolean(L,Agent->Disconnect((CONNID)luaL_checkinteger(L,2),luaL_optboolean(L,3,TRUE)));
|
||||
return 1;
|
||||
}
|
||||
static int DisconnectLongConnections(lua_State* L){
|
||||
|
@ -275,14 +275,14 @@ static int GetAllConnectionIDs(lua_State* L){
|
|||
static int GetConnectPeriod(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
DWORD v;
|
||||
Agent->GetConnectPeriod(luaL_checkinteger(L,2),v);
|
||||
Agent->GetConnectPeriod((CONNID)luaL_checkinteger(L,2),v);
|
||||
lua_pushinteger(L,v);
|
||||
return 1;
|
||||
}
|
||||
static int GetSilencePeriod(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
DWORD v;
|
||||
Agent->GetSilencePeriod(luaL_checkinteger(L,2),v);
|
||||
Agent->GetSilencePeriod((CONNID)luaL_checkinteger(L,2),v);
|
||||
lua_pushinteger(L,v);
|
||||
return 1;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ static int GetLocalAddress(lua_State* L){
|
|||
char* p = luaL_buffinitsize(L,&b,LUAL_BUFFERSIZE);
|
||||
int len = LUAL_BUFFERSIZE;
|
||||
USHORT port;
|
||||
if (Agent->GetLocalAddress(luaL_checkinteger(L,2),p,len,port)){
|
||||
if (Agent->GetLocalAddress((CONNID)luaL_checkinteger(L,2),p,len,port)){
|
||||
luaL_pushresultsize(&b,len-1);
|
||||
lua_pushinteger(L,port);
|
||||
return 2;
|
||||
|
@ -305,7 +305,7 @@ static int GetRemoteAddress(lua_State* L){
|
|||
char* p = luaL_buffinitsize(L,&b,LUAL_BUFFERSIZE);
|
||||
int len = LUAL_BUFFERSIZE;
|
||||
USHORT port;
|
||||
if (Agent->GetRemoteAddress(luaL_checkinteger(L,2),p,len,port)){
|
||||
if (Agent->GetRemoteAddress((CONNID)luaL_checkinteger(L,2),p,len,port)){
|
||||
luaL_pushresultsize(&b,len-1);
|
||||
lua_pushinteger(L,port);
|
||||
return 2;
|
||||
|
@ -342,20 +342,20 @@ static int GetLastErrorDesc(lua_State* L){
|
|||
static int GetPendingDataLength(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
int v;
|
||||
Agent->GetPendingDataLength(luaL_checkinteger(L,2),v);
|
||||
Agent->GetPendingDataLength((CONNID)luaL_checkinteger(L,2),v);
|
||||
lua_pushinteger(L,v);
|
||||
return 1;
|
||||
}
|
||||
static int IsPauseReceive(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
BOOL v;
|
||||
Agent->GetPendingDataLength(luaL_checkinteger(L,2),v);
|
||||
Agent->GetPendingDataLength((CONNID)luaL_checkinteger(L,2),v);
|
||||
lua_pushboolean(L,v);
|
||||
return 1;
|
||||
}
|
||||
static int IsConnected(lua_State* L){
|
||||
ITcpPackAgent* Agent = GetAgent(L);
|
||||
lua_pushboolean(L,Agent->IsConnected(luaL_checkinteger(L,2)));
|
||||
lua_pushboolean(L,Agent->IsConnected((CONNID)luaL_checkinteger(L,2)));
|
||||
return 1;
|
||||
}
|
||||
static int SetReuseAddressPolicy(lua_State* L){
|
||||
|
|
|
@ -56,7 +56,7 @@ static int WSAGetLastError(lua_State* L){
|
|||
//SYS_SSO_ReuseAddress
|
||||
//SYS_SSO_ExclusiveAddressUse
|
||||
static int GetSocketLocalAddress(lua_State* L){
|
||||
SOCKET sock = luaL_checkinteger(L,1);
|
||||
SOCKET sock = (SOCKET)luaL_checkinteger(L,1);
|
||||
TCHAR lpszAddress[16] = {0};//INET_ADDRSTRLEN
|
||||
int iAddressLen=16;
|
||||
USHORT usPort;
|
||||
|
@ -68,7 +68,7 @@ static int GetSocketLocalAddress(lua_State* L){
|
|||
}
|
||||
|
||||
static int GetSocketRemoteAddress(lua_State* L){
|
||||
SOCKET sock = luaL_checkinteger(L,1);
|
||||
SOCKET sock = (SOCKET)luaL_checkinteger(L,1);
|
||||
TCHAR lpszAddress[16] = {0};//INET_ADDRSTRLEN
|
||||
int iAddressLen=16;
|
||||
USHORT usPort;
|
||||
|
|
Loading…
Reference in New Issue