public ExpandMacros ( string input ) : string | ||
input | string | |
return | string |
public string ExpandMacros(string input)
{
string sExpanded = input;
bool bFound = true;
ArrayList oMacros = Macros;
while (bFound)
{
bFound = false;
for (int i = 0; i < oMacros.Count; i++)
{
Macro oMacro = (Macro)oMacros[i];
if (sExpanded.IndexOf(oMacro.Name) >= 0)
{
bFound = true;
sExpanded = sExpanded.Replace(oMacro.Name, oMacro.Value);
}
}
}
return sExpanded;
}
public bool ValidateSettings(Builder builder, out string result) { if (!File.Exists(builder.ExpandMacros(VSPath))) { result = "The Visual Studio executable does not exist in the specified path\r\n"; return(false); } if (!File.Exists(builder.ExpandMacros(InnoSetupPath))) { result = "The InnoSetup executable does not exist in the specified path\r\n"; return(false); } if (!Directory.Exists(builder.ExpandMacros(SourcePath))) { result = "The hMailserver source code does not exist in the specified path\r\n"; return(false); } result = ""; return(true); }