2012-11-02 23:11:38 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
2014-12-03 23:15:26 +00:00
|
|
|
|
namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|
|
|
|
{
|
|
|
|
|
public class EngineInfo
|
|
|
|
|
{
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public const string DEFAULT_ENGINE_NAME = "Engine with no name";
|
|
|
|
|
|
2015-03-24 14:21:38 +00:00
|
|
|
|
private string testprogramname;
|
|
|
|
|
public string TestProgramName { get { return testprogramname; } set { testprogramname = value; CheckProgramName(); } }
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public string TestProgram;
|
|
|
|
|
public string TestParameters;
|
|
|
|
|
public bool CustomParameters;
|
|
|
|
|
public int TestSkill;
|
|
|
|
|
public bool TestShortPaths;
|
2012-11-02 23:11:38 +00:00
|
|
|
|
|
2014-12-03 23:15:26 +00:00
|
|
|
|
public EngineInfo()
|
|
|
|
|
{
|
2015-03-24 14:21:38 +00:00
|
|
|
|
testprogramname = DEFAULT_ENGINE_NAME;
|
2013-09-11 09:47:53 +00:00
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
|
2014-12-03 23:15:26 +00:00
|
|
|
|
public EngineInfo(EngineInfo other)
|
|
|
|
|
{
|
2015-03-24 14:21:38 +00:00
|
|
|
|
testprogramname = other.TestProgramName;
|
2013-09-11 09:47:53 +00:00
|
|
|
|
TestProgram = other.TestProgram;
|
|
|
|
|
TestParameters = other.TestParameters;
|
|
|
|
|
CustomParameters = other.CustomParameters;
|
|
|
|
|
TestSkill = other.TestSkill;
|
|
|
|
|
TestShortPaths = other.TestShortPaths;
|
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
|
2015-03-24 14:21:38 +00:00
|
|
|
|
private void CheckProgramName()
|
2014-12-03 23:15:26 +00:00
|
|
|
|
{
|
2015-03-24 14:21:38 +00:00
|
|
|
|
if(testprogramname == DEFAULT_ENGINE_NAME && !String.IsNullOrEmpty(TestProgram))
|
2014-12-03 23:15:26 +00:00
|
|
|
|
{
|
2015-03-24 14:21:38 +00:00
|
|
|
|
//get engine name from path
|
|
|
|
|
testprogramname = Path.GetFileNameWithoutExtension(TestProgram);
|
2013-09-11 09:47:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
}
|