25 #include "configuration/doomseekerconfig.h" 26 #include "ini/inisection.h" 27 #include "ini/inivariable.h" 29 #include "plugins/engineplugin.h" 59 return d->exeTypeName;
73 QString path = setting.
value().toString();
75 if (path.trimmed().isEmpty())
84 if (!fi.exists() || (fi.isDir() && !fi.isBundle()))
88 error = tr(
"Executable for %1 %2:\n%3\nis a directory or doesn't exist.")
90 .arg(fi.absoluteFilePath());
95 return fi.absoluteFilePath();
100 return d->programName;
105 d->configKey = keyName;
110 d->exeTypeName = name;
115 d->programName = name;
121 return fi.absolutePath();
135 ExeFilePath::ExeFilePath()
139 ExeFilePath::ExeFilePath(
const QString &path)
142 d->workingDir = QFileInfo(path).path();
145 ExeFilePath::~ExeFilePath()
149 QString ExeFilePath::path()
const 154 ExeFilePath &ExeFilePath::setPath(
const QString &path)
160 QString ExeFilePath::workingDir()
const 162 return d->workingDir;
165 ExeFilePath &ExeFilePath::setWorkingDir(
const QString &path)
167 d->workingDir = path;
void setProgramName(const QString &name)
Plugin setter for programName().
const QString & programName() const
Name of the program this executable belongs to (ex. "Odamex").
INI variable representation.
void setExeTypeName(const QString &name)
Plugin setter for exeTypeName().
const QString & exeTypeName() const
Name of the type of the executable (server, client, etc.).
Message object used to pass messages throughout the Doomseeker's system.
virtual Message install(QWidget *parent)
Attempts to install the binary.
void setConfigKey(const QString &keyName)
Plugin setter for configKey().
QVariant value() const
Extracts the value as QVariant.
const QString & configKey() const
Config key where executable path on current system can be remembered.
virtual QString pathToExe(Message &message)
Returns the path to the executable file.
A simple executable path & working dir structure.
INI section representation.
virtual QString workingDirectory(Message &message)
Path to this executable working directory.
static Message customError(const QString &content)
Convenience method. Sets type to Type::CUSTOM_ERROR.
Access to external program executables (game clients, servers, and so on).