mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-03 06:45:59 +02:00
Update BeefBuild to use new custom build properties API.
This commit is contained in:
parent
275dbd14e8
commit
80a72f991d
5 changed files with 30 additions and 39 deletions
|
@ -61,11 +61,12 @@ namespace IDE
|
|||
mProjects.Clear();
|
||||
}
|
||||
|
||||
static public void Load()
|
||||
static public void Load(bool clearExistingProperties = true)
|
||||
{
|
||||
const char8* PROPERTIES_STR = "Properties";
|
||||
|
||||
Clear();
|
||||
if (clearExistingProperties)
|
||||
Clear();
|
||||
|
||||
String propertiesFileName = scope String();
|
||||
GetFileName(propertiesFileName);
|
||||
|
@ -85,22 +86,31 @@ namespace IDE
|
|||
|
||||
for (var property in data.Enumerate(PROPERTIES_STR))
|
||||
{
|
||||
String propertyStr = new String();
|
||||
property.ToString(propertyStr);
|
||||
String propertyName = new String();
|
||||
property.ToString(propertyName);
|
||||
|
||||
if (Contains(propertyStr))
|
||||
if (Contains(propertyName))
|
||||
{
|
||||
delete propertyStr;
|
||||
delete propertyName;
|
||||
continue;
|
||||
}
|
||||
|
||||
String propertyValue = new String();
|
||||
data.GetCurString(propertyValue);
|
||||
|
||||
mProperties.Add(propertyStr, propertyValue);
|
||||
TryAddProperty(propertyName, propertyValue);
|
||||
}
|
||||
}
|
||||
|
||||
static public bool TryAddProperty(String propertyName, String propertyValue)
|
||||
{
|
||||
if (Contains(propertyName))
|
||||
return false;
|
||||
|
||||
mProperties.Add(propertyName, propertyValue);
|
||||
return true;
|
||||
}
|
||||
|
||||
static public bool Contains(String property)
|
||||
{
|
||||
return mProperties.ContainsKey(property);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue