trying to improve the stuff

This commit is contained in:
2025-12-26 23:59:32 +02:00
parent 352b3b1fc8
commit bf5ca2c23b
9 changed files with 95 additions and 16 deletions

View File

@@ -16,11 +16,16 @@
CUtlString owndir;
extern char *g_szBuildDir;
int build()
void build_tier0()
{
};
int build()
{
CreateInterfaceFn pBuildFactory;
BuildFileInfo_t *pBuildFileInfo;
CProject_t compileScriptProject = {};
compileScriptProject.m_szName = "build";
compileScriptProject.files = {"build.cpp"};
@@ -36,12 +41,19 @@ int build()
void *scriptDLL = Plat_LoadLibrary(script);
pBuildFactory = Sys_GetFactory(scriptDLL);
pBuildFactory = NULL;
pBuildFileInfo = (BuildFileInfo_t*)pBuildFactory(BUILD_FILE_INFO_INTERFACE_NAME, NULL);
if (!pBuildFactory)
Plat_FatalErrorFunc("Failed to find build file info interface\n");
auto PreinitFn = (void(*)())Plat_GetProc(scriptDLL, "Preinit");
if (PreinitFn)
PreinitFn();
for (auto &build: BuildStages())
for (auto &build: pBuildFileInfo->m_stages)
{
build->m_pMainFn();
};
@@ -61,7 +73,7 @@ void IEngine_Signal(int sig)
case SIGILL:
case SIGABRT:
Plat_Backtrace();
Plat_FatalErrorFunc("Fault");
Plat_FatalErrorFunc("Fault\n");
break;
case SIGINT:
Plat_Exit(0);