some work on fpc

This commit is contained in:
2025-12-30 22:13:01 +02:00
parent 842eeabbde
commit 773a541199
27 changed files with 298 additions and 101 deletions

View File

@@ -35,7 +35,8 @@ static uint32_t pathSize = sizeof(path);
static int pathResult = _NSGetExecutablePath(path, &pathSize);
#endif
static char *szPathDir = dirname(path);
char *g_szBuildDir = 0;
static char *s_szBuildDir = 0;
EXPOSE_INTERFACE_GLOBALVAR(szBuildDir, char*, FILE_SYSTEM_2_BUILD_DIRECTORY_INTERFACE_VERSION, s_szBuildDir);
class CPOSIXFileSystem2: public IFileSystem2
{
@@ -87,24 +88,26 @@ char *CPOSIXFileSystem2::OwnDirectory()
};
char *CPOSIXFileSystem2::BuildDirectory()
{
return g_szBuildDir;
return s_szBuildDir;
};
void CPOSIXFileSystem2::CopyFile( const char *szDestination, const char *szOrigin )
{
CUtlVector<CUtlString> args = {
CUtlString(szOrigin),
CUtlString(szDestination),
szOrigin,
szDestination,
};
runner->Run("cp", args);
printf("runner: %p\n",runner);
runner->Run(CUtlString("cp"), args);
printf("runner: %p\n",runner);
runner->Wait();
}
void CPOSIXFileSystem2::CopyDirectory( const char *szDestination, const char *szOrigin )
{
CUtlVector<CUtlString> args = {
"-r",
CUtlString(szOrigin),
CUtlString(szDestination),
szOrigin,
szDestination,
};
runner->Run("cp", args);
runner->Wait();
@@ -133,4 +136,5 @@ bool CPOSIXFileSystem2::ShouldRecompile(const char *szSource, const char *szOutp
return outbuf.st_mtime < srcbuf.st_mtime;
};
IINIFile *g_pConfig;