1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 02:28:01 +02:00

Improved Add From Installed IDE project dialog

This commit is contained in:
Brian Fiete 2022-06-24 10:29:40 -07:00
parent 48635c1939
commit d204922403
4 changed files with 76 additions and 4 deletions

View file

@ -13,6 +13,7 @@ namespace IDE
public class RegistryEntry
{
public String mProjName ~ delete _;
public Project.TargetType mTargetType;
public SemVer mVersion ~ delete _;
public VerSpec mLocation ~ _.Dispose();
public ConfigFile mConfigFile;
@ -51,6 +52,29 @@ namespace IDE
using (mMonitor.Enter())
entry.mProjName.Set(projName);
}
if (sd.Contains("StartupObject"))
entry.mTargetType = .BeefConsoleApplication;
else
entry.mTargetType = .BeefLib;
var targetTypeName = scope String();
sd.GetString("TargetType", targetTypeName);
if (!targetTypeName.IsEmpty)
{
switch (targetTypeName)
{ // Handle Legacy names first
case "BeefWindowsApplication":
entry.mTargetType = .BeefGUIApplication;
case "C_WindowsApplication":
entry.mTargetType = .C_GUIApplication;
case "BeefDynLib":
entry.mTargetType = .BeefLib;
default:
entry.mTargetType = sd.GetEnum<Project.TargetType>("TargetType", entry.mTargetType);
}
}
}
}
}