2012-11-02 23:11:38 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.GZBuilder.Data {
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public class EngineInfo {
|
|
|
|
|
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
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public EngineInfo() {
|
|
|
|
|
TestProgramName = DEFAULT_ENGINE_NAME;
|
|
|
|
|
}
|
2012-11-02 23:11:38 +00:00
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public EngineInfo(EngineInfo other) {
|
|
|
|
|
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
|
|
|
|
|
2013-09-11 09:47:53 +00:00
|
|
|
|
public void CheckProgramName(bool forced) {
|
|
|
|
|
if ((forced || TestProgramName == DEFAULT_ENGINE_NAME) && !String.IsNullOrEmpty(TestProgram)) {
|
|
|
|
|
//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
|
|
|
|
}
|