{
char path[MAX_LOCATION];
char relative[MAX_LOCATION];
- node.GetFullFilePath(path);
+ node.GetFullFilePath(path, false);
bp.absoluteFilePath = path;
MakePathRelative(path, prj.topNode.path, relative);
bp.relativeFilePath = relative;
DataRow r = null;
ProjectNode node = prj.topNode;
char filePath[MAX_LOCATION];
- prj.topNode.GetFullFilePath(filePath);
+ prj.topNode.GetFullFilePath(filePath, false);
lastSelectionProject = CopyString(filePath);
findWherePrjNode.Clear();
ListProjectNodeFolders(node, null);
if(node)
{
char filePath[MAX_LOCATION];
- node.GetFullFilePath(filePath);
+ node.GetFullFilePath(filePath, true);
lastSelectionProjectNode = CopyString(filePath);
}
}
Project p = (Project)(intptr)row.tag;
if(p)
{
- p.topNode.GetFullFilePath(filePath);
+ p.topNode.GetFullFilePath(filePath, false);
if(!fstrcmp(filePath, lastSelectionProject))
break;
}
{
char filePath[MAX_LOCATION];
Window document;
- node.GetFullFilePath(filePath);
+ node.GetFullFilePath(filePath, true);
if(FileExists(filePath))
ide.projectView.OpenNode(node, key.ctrl && key.shift);
else
{
if((n = p.topNode.Find(filePath, false)))
{
- n.GetFullFilePath(selectedPath);
+ n.GetFullFilePath(selectedPath, true);
if((fileAttribs = FileExists(selectedPath)).isFile)
{
if(node) *node = n;
#endif
}
+int GetBitDepth()
+{
+#ifdef MAKEFILE_GENERATOR
+ return 0; // todo: improve this somehow? add bit depth command line option?
+#else
+ return ide.workspace.bitDepth;
+#endif
+}
+
define localTargetType = config && config.options && config.options.targetType ?
config.options.targetType : options && options.targetType ?
options.targetType : TargetTypes::executable;
import "Project"
static define app = ((GuiApplication)__thisModule);
-#endif
+#endif // #ifndef MAKEFILE_GENERATOR
#define OPTION(x) ((uint)(uintptr)(&((ProjectOptions)0).x))
printf("%s", string);
#else
ide.outputView.buildBox.Log(string);
-#endif
+#endif // #ifdef MAKEFILE_GENERATOR
}
bool eString_PathInsideOfMore(const char * path, const char * of, char * pathRest)
}
}
- char * GetFullFilePath(char * buffer)
+ char * GetFullFilePath(char * buffer, bool resolveVars)
{
if(buffer)
{
strcpy(buffer, root.path);
- PathCatSlash(buffer, path);
- PathCatSlash(buffer, name);
+ if(resolveVars)
+ {
+ if(path && path[0])
+ {
+ DirExpression pathExp { };
+ Project project = property::project;
+ CompilerConfig compiler = GetCompilerConfig();
+ ProjectConfig config = project.config;
+ int bitDepth = GetBitDepth();
+ pathExp.Evaluate(path, project, compiler, config, bitDepth);
+ PathCatSlash(buffer, pathExp.dir);
+ delete compiler;
+ delete pathExp;
+ }
+ PathCatSlash(buffer, name);
+ }
+ else
+ {
+ PathCatSlash(buffer, path);
+ PathCatSlash(buffer, name);
+ }
}
return buffer;
}
else if(child.name && !fstrcmp(lastDirName, child.name))
{
char p[MAX_LOCATION];
- child.GetFullFilePath(p);
+ child.GetFullFilePath(p, true);
if(!fstrcmp(p, path))
{
result = child;
}
}
}
-#endif
+#endif // #ifndef MAKEFILE_GENERATOR
int OnCompare(ProjectNode b)
{
if(!strcmpi(extension, &h2s))
{
char filePath[MAX_LOCATION];
- GetFullFilePath(filePath);
+ GetFullFilePath(filePath, false);
OutputLog($"No compilation required for header file "); OutputLog(filePath); OutputLog("\n");
ChangeExtension(moduleName, h2s, moduleName);
if(prj.topNode.Find(moduleName, false))
{
char filePath[MAX_LOCATION];
char ext[MAX_EXTENSION];
- node.GetFullFilePath(filePath);
+ node.GetFullFilePath(filePath, true);
+
GetExtension(filePath, ext);
if(binaryDocExt.Find(ext))
{
fileDialog.master = parent;
while(node)
{
- node.GetFullFilePath(path);
+ node.GetFullFilePath(path, false);
while(path[0])
{
StripLastDirectory(path, path);
}
if(prj)
{
- node.GetFullFilePath(absolute);
+ node.GetFullFilePath(absolute, false);
return CopyString(absolute);
}