Fix -Dhttp=false builds

This commit is contained in:
Tamás Bálint Misius 2021-12-13 15:23:33 +01:00
parent 674134588c
commit 84d6ca6938
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
3 changed files with 15 additions and 2 deletions

View File

@ -4,7 +4,12 @@ client_files += files(
'GetUserInfoRequest.cpp',
'ImageRequest.cpp',
'Request.cpp',
'RequestManager.cpp',
'SaveUserInfoRequest.cpp',
'ThumbnailRequest.cpp',
)
if uopt_http
client_files += files(
'RequestManager.cpp',
)
endif

View File

@ -158,7 +158,9 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
initPlatformAPI();
initEventAPI();
initHttpAPI();
#ifndef NOHTTP
initSocketAPI();
#endif
//Old TPT API
int currentElementMeta, currentElement;
@ -4388,9 +4390,11 @@ LuaScriptInterface::~LuaScriptInterface() {
delete legacy;
}
#ifndef NOHTTP
void LuaScriptInterface::initSocketAPI()
{
LuaTCPSocket::Open(l);
}
#endif
#endif

View File

@ -10,10 +10,14 @@ luaconsole_files = files(
'LuaScriptInterface.cpp',
'LuaSlider.cpp',
'LuaSmartRef.cpp',
'LuaTCPSocket.cpp',
'LuaTextbox.cpp',
'LuaWindow.cpp',
)
if uopt_http
luaconsole_files += files(
'LuaTCPSocket.cpp',
)
endif
subdir('luascripts')