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";
|
|
|
|
|
|
|
|
|
|
public string TestProgramName;
|
|
|
|
|
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()
|
|
|
|
|
{
|
2013-09-11 09:47:53 +00:00
|
|
|
|
TestProgramName = DEFAULT_ENGINE_NAME;
|
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
|
2014-12-03 23:15:26 +00:00
|
|
|
|
public EngineInfo(EngineInfo other)
|
|
|
|
|
{
|
2013-09-11 09:47:53 +00:00
|
|
|
|
TestProgramName = other.TestProgramName;
|
|
|
|
|
TestProgram = other.TestProgram;
|
|
|
|
|
TestParameters = other.TestParameters;
|
|
|
|
|
CustomParameters = other.CustomParameters;
|
|
|
|
|
TestSkill = other.TestSkill;
|
|
|
|
|
TestShortPaths = other.TestShortPaths;
|
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
|
2014-12-03 23:15:26 +00:00
|
|
|
|
public void CheckProgramName(bool forced)
|
|
|
|
|
{
|
|
|
|
|
if ((forced || TestProgramName == DEFAULT_ENGINE_NAME) && !String.IsNullOrEmpty(TestProgram))
|
|
|
|
|
{
|
2013-09-11 09:47:53 +00:00
|
|
|
|
//get engine name from folder name
|
2013-06-14 11:40:18 +00:00
|
|
|
|
TestProgramName = Path.GetFileNameWithoutExtension(TestProgram);
|
2013-09-11 09:47:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
}
|