fileNameLen += len;
path = new char[len+1];
f.Read(path, sizeof(char), len+1);
-
+
/*
fileName = new char[fileNameLen+2];
strcpy(fileName, path);
f.Read(&type, sizeof(type), 1);
f.Read(&count, sizeof(count), 1);
-
+
if(type == file)
{
nodeType = file;
if(path && path[0])
f.Printf("%s Path = %s\n", indentation, path);
}
-
+
/*if(buildExclusions.first && type != project)
{
for(item = buildExclusions.first; item; item = item.next)
f.Printf("\n");
}
*/
-
+
if(type == project && (files.count /*|| preprocessorDefs.first*/))
{
f.Printf("\n");
{
if(numOfBreaks > 1)
f.Printf("%s%d =", name, c+1);
-
+
len = 3;
itemCount = breaks[c];
for(n=offset; n<offset+itemCount; n++)
strcpy(temp, item);
StripExtension(temp);
s = temp;
- }
+ }
f.Puts(" \\\n\t$(call _L,");
usedFunction = true;
}
}
else
PathCatSlash(string, targetFileName);
-
+
switch(targetType)
{
case executable:
if(c && ((c.options && cfg.options && cfg.options.console != c.options.console) ||
(!c.options || !cfg.options)))
cfg.symbolGenModified = true;
- if(c && ((c.options && cfg.options &&
- ( (cfg.options.libraries && c.options.libraries && cfg.options.libraries.OnCompare(c.options.libraries)) || (!cfg.options.libraries || !c.options.libraries)) )
+ if(c && ((c.options && cfg.options &&
+ ( (cfg.options.libraries && c.options.libraries && cfg.options.libraries.OnCompare(c.options.libraries)) || (!cfg.options.libraries || !c.options.libraries)) )
|| (!c.options || !cfg.options)))
cfg.linkingModified = true;
ide.workspace.modified = true;
}
}
-
+
void RotateActiveConfig(bool forward, bool syncAllProjects)
{
if(configurations.first && configurations.last != configurations.first)
DynamicString windres { };
/*
- if(bitDepth == 64 && compiler.targetPlatform == win32)
+ if(bitDepth == 64 && compiler.targetPlatform == win32)
gnuToolchainPrefix = "x86_64-w64-mingw32-";
else if(bitDepth == 32 && compiler.targetPlatform == win32)
gnuToolchainPrefix = "i686-w64-mingw32-";
{
// Silence warnings for compiled eC
char * objDir = strstr(moduleName, objDirExp.dir);
-
+
if(linking)
{
if((pointer = strstr(line, "undefined")) ||
ide.outputView.buildBox.Logf("%d %s, ", numErrors, (numErrors > 1) ? $"errors" : $"error");
else
ide.outputView.buildBox.Logf($"no error, ");
-
+
if(numWarnings)
ide.outputView.buildBox.Logf("%d %s\n", numWarnings, (numWarnings > 1) ? $"warnings" : $"warning");
else
strcpy(makeFilePath, topNode.path);
CatMakeFileName(makeFile, config);
PathCatSlash(makeFilePath, makeFile);
-
+
if(compiler.type.isVC)
{
bool result = false;
char oldwd[MAX_LOCATION];
GetWorkingDir(oldwd, sizeof(oldwd));
ChangeWorkingDir(topNode.path);
-
+
// TODO: justPrint support
sprintf(command, "%s /useenv /clean /nologo /logcommands %s.sln %s|Win32", compiler.makeCommand, name, config.name);
if(justPrint)
}
void Run(char * args, CompilerConfig compiler, ProjectConfig config, int bitDepth)
- {
+ {
String target = new char[maxPathLen];
char oldDirectory[MAX_LOCATION];
char * executableLauncher = compiler.executableLauncher;
ReplaceSpaces(objDirNoSpaces, objDirExp);
ReplaceSpaces(fixedModuleName, moduleName);
-
+
//sprintf(fixedModuleName, "%s.main", fixedPrjName);
//strcat(fixedModuleName, ".main");
PathCatSlash(topNodePath, filePath);
project.filePath = topNodePath;
-
+
/* THIS IS ALREADY DONE BY filePath property
StripLastDirectory(topNodePath, topNodePath);
project.topNode.path = CopyString(topNodePath);
*/
// Shouldn't this be done BEFORE the StripLastDirectory? project.filePath = topNodePath;
-
+
// newConfig.options.defaultNameSpace = "";
/*newConfig.objDir.dir = "obj";
newConfig.targetDir.dir = "";*/
f.Read(&temp, sizeof(int),1);
project./*config.*/options.debug = temp ? true : false;
- f.Read(&temp, sizeof(int),1);
+ f.Read(&temp, sizeof(int),1);
project./*config.*/options.optimization = temp ? speed : none;
f.Read(&temp, sizeof(int),1);
project./*config.*/options.profile = temp ? true : false;
project.options.libraryDirs = { };
for(c = 0; c < count; c++)
{
- char * name;
+ char * name;
f.Read(&len, sizeof(int),1);
name = new char[len+1];
f.Read(name, sizeof(char), len+1);
}
void ProjectConfig::LegacyProjectConfigLoad(File f)
-{
+{
delete options;
options = { };
while(!f.Eof())
char * equal;
int len;
uint pos;
-
+
pos = f.Tell();
f.GetLine(buffer, 65536 - 1);
TrimLSpaces(buffer, buffer);
}
}
}
- }
+ }
}
}
if(cfg.options.targetType != staticLibrary)
{
int result;
-
+
if(type.type == noHeadClass || type.type == normalClass)
{
- result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
+ result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
*(void **)((byte *)firstConfig.options + member.offset + member._class.offset),
*(void **)((byte *)cfg.options + member.offset + member._class.offset));
}
else
{
- result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
+ result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
(byte *)firstConfig.options + member.offset + member._class.offset,
(byte *)cfg.options + member.offset + member._class.offset);
}
break;
}
}
- }
+ }
}
if(same)
{
if(type.type == noHeadClass || type.type == normalClass)
{
- if(!((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
+ if(!((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
*(void **)((byte *)firstConfig.options + member.offset + member._class.offset),
*(void **)((byte *)nullOptions + member.offset + member._class.offset)))
continue;
}
else
{
- if(!((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
+ if(!((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
(byte *)firstConfig.options + member.offset + member._class.offset,
(byte *)nullOptions + member.offset + member._class.offset))
continue;
}
if(!project.options) project.options = { };
-
+
/*if(type.type == noHeadClass || type.type == normalClass)
{
- ((void (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCopy])(type,
+ ((void (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCopy])(type,
(byte *)project.options + member.offset + member._class.offset,
*(void **)((byte *)firstConfig.options + member.offset + member._class.offset));
}
{
void * address = (byte *)firstConfig.options + member.offset + member._class.offset;
// TOFIX: ListBox::SetData / OnCopy mess
- ((void (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCopy])(type,
+ ((void (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCopy])(type,
(byte *)project.options + member.offset + member._class.offset,
- (type.typeSize > 4) ? address :
- ((type.typeSize == 4) ? (void *)*(uint32 *)address :
- ((type.typeSize == 2) ? (void *)*(uint16*)address :
- (void *)*(byte *)address )));
+ (type.typeSize > 4) ? address :
+ ((type.typeSize == 4) ? (void *)*(uint32 *)address :
+ ((type.typeSize == 2) ? (void *)*(uint16*)address :
+ (void *)*(byte *)address )));
}*/
memcpy(
(byte *)project.options + member.offset + member._class.offset,
if(cfg.options.targetType == staticLibrary)
{
int result;
-
+
if(type.type == noHeadClass || type.type == normalClass)
{
- result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
+ result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
*(void **)((byte *)firstConfig.options + member.offset + member._class.offset),
*(void **)((byte *)cfg.options + member.offset + member._class.offset));
}
else
{
- result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
+ result = ((int (*)(void *, void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnCompare])(type,
(byte *)firstConfig.options + member.offset + member._class.offset,
(byte *)cfg.options + member.offset + member._class.offset);
}
{
if(type.type == noHeadClass || type.type == normalClass)
{
- ((void (*)(void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnFree])(type,
+ ((void (*)(void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnFree])(type,
*(void **)((byte *)cfg.options + member.offset + member._class.offset));
}
else
{
- ((void (*)(void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnFree])(type,
+ ((void (*)(void *, void *))(void *)type._vTbl[__ecereVMethodID_class_OnFree])(type,
(byte *)cfg.options + member.offset + member._class.offset);
}
memset((byte *)cfg.options + member.offset + member._class.offset, 0, type.typeSize);
- }
+ }
}
memset((byte *)firstConfig.options + member.offset + member._class.offset, 0, type.typeSize);
}
{
project.resNode = project.topNode.Add(project, "Resources", project.topNode.files.last, resources, archiveFile, false);
}
-
+
if(!project.moduleName)
project.moduleName = CopyString(project.name);
- if(project.config &&
+ if(project.config &&
(!project.options || !project.options.targetFileName || !project.options.targetFileName[0]) &&
(!project.config.options.targetFileName || !project.config.options.targetFileName[0]))
{
//delete project.config.options.targetFileName;
-
+
project.options.targetFileName = /*CopyString(*/project.moduleName/*)*/;
project.config.options.optimization = none;
project.config.options.debug = true;