Build system almost done
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include "tier0/platform.h"
|
||||
#include "tier1/utlvector.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include "unistd.h"
|
||||
#include "libgen.h"
|
||||
|
||||
unsigned int g_hashState = 102851263;
|
||||
unsigned int CProject::GenerateProjectHash( void )
|
||||
@@ -19,11 +21,19 @@ unsigned int CProject::GenerateProjectHash( void )
|
||||
return hash;
|
||||
};
|
||||
|
||||
static char path[1024];
|
||||
static ssize_t pathSize = readlink("/proc/self/exe", path, sizeof(path) - 1);
|
||||
static char* pathDir = dirname(path);
|
||||
char *IFileSystem2::OwnDirectory()
|
||||
{
|
||||
return pathDir;
|
||||
};
|
||||
|
||||
void IFileSystem2::MakeDirectory( const char *psz )
|
||||
{
|
||||
CUtlVector<CUtlString> args = {
|
||||
"-p",
|
||||
psz,
|
||||
CUtlString(psz),
|
||||
};
|
||||
IRunner::Run("mkdir", args);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user