Adds a TORQUE_TOOLS_EXT cmake flag/preprocessor and moves the systemCommand method into that so that one can lock down full shell command execution calls without dropping tools support

This commit is contained in:
Areloch 2024-09-01 16:55:58 -05:00
parent 2dbfc16cf9
commit 03efedab37
3 changed files with 7 additions and 1 deletions

View file

@ -2803,7 +2803,7 @@ DefineEngineFunction(getTimestamp, const char*, (), ,
return returnBuffer;
}
#ifdef TORQUE_TOOLS
#ifdef TORQUE_TOOLS_EXT_COMMANDS
DefineEngineFunction(systemCommand, S32, (const char* commandLineAction, const char* callBackFunction), (""), "")
{
if (commandLineAction && commandLineAction[0] != '\0')
@ -2819,7 +2819,9 @@ DefineEngineFunction(systemCommand, S32, (const char* commandLineAction, const c
return -1;
}
#endif
#ifdef TORQUE_TOOLS
const char* getDocsLink(const char* filename, U32 lineNumber)
{
Vector<String> fileStringSplit;