|
@@ -63,7 +63,7 @@ namespace IDE
|
|
regEntry.mLocation.Parse(data).IgnoreError();
|
|
regEntry.mLocation.Parse(data).IgnoreError();
|
|
}
|
|
}
|
|
|
|
|
|
- for (data.Enumerate("LibDirs"))
|
|
|
|
|
|
+ for (data.Enumerate("UnversionedLibDirs"))
|
|
{
|
|
{
|
|
String dirStr = scope .();
|
|
String dirStr = scope .();
|
|
data.GetCurString(dirStr);
|
|
data.GetCurString(dirStr);
|
|
@@ -74,6 +74,39 @@ namespace IDE
|
|
libDir.mPath = new String(dirStr);
|
|
libDir.mPath = new String(dirStr);
|
|
libDir.mConfigFile = configFile;
|
|
libDir.mConfigFile = configFile;
|
|
mLibDirectories.Add(libDir);
|
|
mLibDirectories.Add(libDir);
|
|
|
|
+
|
|
|
|
+ String absPath = scope .();
|
|
|
|
+ Path.GetAbsolutePath(libDir.mPath, configFile.mConfigDir, absPath);
|
|
|
|
+
|
|
|
|
+ for (var entry in Directory.EnumerateDirectories(absPath))
|
|
|
|
+ {
|
|
|
|
+ String projName = scope .();
|
|
|
|
+ entry.GetFileName(projName);
|
|
|
|
+
|
|
|
|
+ String filePath = scope .();
|
|
|
|
+ entry.GetFilePath(filePath);
|
|
|
|
+
|
|
|
|
+ String projFilePath = scope .();
|
|
|
|
+ projFilePath.Concat(filePath, "/BeefProj.toml");
|
|
|
|
+
|
|
|
|
+ if (File.Exists(projFilePath))
|
|
|
|
+ {
|
|
|
|
+ RegistryEntry regEntry = new RegistryEntry();
|
|
|
|
+ regEntry.mProjName = new String(projName);
|
|
|
|
+ mRegistry.Add(regEntry);
|
|
|
|
+
|
|
|
|
+ regEntry.mConfigFile = configFile;
|
|
|
|
+
|
|
|
|
+ var verString = scope String();
|
|
|
|
+ data.GetString("Version", verString);
|
|
|
|
+ regEntry.mVersion = new SemVer();
|
|
|
|
+ regEntry.mVersion.Parse("0.0.0");
|
|
|
|
+
|
|
|
|
+ regEntry.mLocation = new VerSpecRecord();
|
|
|
|
+ using (data.Open("Location"))
|
|
|
|
+ regEntry.mLocation.SetPath(filePath);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -82,6 +115,11 @@ namespace IDE
|
|
return .Ok;
|
|
return .Ok;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void Refresh()
|
|
|
|
+ {
|
|
|
|
+ Load().IgnoreError();
|
|
|
|
+ }
|
|
|
|
+
|
|
public void QueuePaths(StringView topLevelDir)
|
|
public void QueuePaths(StringView topLevelDir)
|
|
{
|
|
{
|
|
let dir = scope String(topLevelDir);
|
|
let dir = scope String(topLevelDir);
|
|
@@ -96,7 +134,7 @@ namespace IDE
|
|
if (File.Exists(path))
|
|
if (File.Exists(path))
|
|
{
|
|
{
|
|
if (mConfigPathQueue.Contains(path))
|
|
if (mConfigPathQueue.Contains(path))
|
|
- break; // We have this and everthing under it already
|
|
|
|
|
|
+ break; // We have this and everything under it already
|
|
mConfigPathQueue.Add(new String(path));
|
|
mConfigPathQueue.Add(new String(path));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -116,6 +154,9 @@ namespace IDE
|
|
|
|
|
|
public Result<void> Load()
|
|
public Result<void> Load()
|
|
{
|
|
{
|
|
|
|
+ ClearAndDeleteItems(mRegistry);
|
|
|
|
+ ClearAndDeleteItems(mConfigFiles);
|
|
|
|
+
|
|
for (int i = mConfigPathQueue.Count - 1; i >= 0; i--)
|
|
for (int i = mConfigPathQueue.Count - 1; i >= 0; i--)
|
|
{
|
|
{
|
|
let path = mConfigPathQueue[i];
|
|
let path = mConfigPathQueue[i];
|