Polyphase Game Engine
Loading...
Searching...
No Matches
SystemUtils.cpp File Reference
#include "SystemUtils.h"
#include "System.h"
#include "Log.h"
#include "EmbeddedFile.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>

Functions

void ExecCommon (const char *cmd, std::string *output)
 
bool SYS_ExecFull (const char *cmd, std::string *outStdout, std::string *outStderr, int *outExitCode)
 Execute a command with full output capture.
 
void SYS_RegisterEmbeddedRawAssets (EmbeddedFile *table, uint32_t count)
 
const char * SYS_LookupEmbeddedRawAsset (const char *path, uint32_t &outSize)
 

Function Documentation

◆ ExecCommon()

void ExecCommon ( const char *  cmd,
std::string *  output 
)

◆ SYS_ExecFull()

bool SYS_ExecFull ( const char *  cmd,
std::string *  outStdout,
std::string *  outStderr,
int *  outExitCode 
)

Execute a command with full output capture.

Unlike SYS_Exec which only captures the first 1024 bytes, this function captures complete stdout/stderr output.

Parameters
cmdCommand to execute
outStdoutPointer to receive stdout (can be nullptr)
outStderrPointer to receive stderr (can be nullptr)
outExitCodePointer to receive exit code (can be nullptr)
Returns
true if command executed successfully

◆ SYS_LookupEmbeddedRawAsset()

const char * SYS_LookupEmbeddedRawAsset ( const char *  path,
uint32_t &  outSize 
)

◆ SYS_RegisterEmbeddedRawAssets()

void SYS_RegisterEmbeddedRawAssets ( EmbeddedFile table,
uint32_t  count 
)