25 #include "configuration/doomseekerconfig.h" 26 #include "ini/inisection.h" 27 #include "ini/inivariable.h" 29 #include "plugins/engineplugin.h" 59 return d->exeTypeName;
74 QString path = setting.
value().toString();
76 if (path.trimmed().isEmpty())
85 if (!fi.exists() || (fi.isDir() && !fi.isBundle()))
89 error = tr(
"Executable for %1 %2:\n%3\nis a directory or doesn't exist.")
91 .arg(fi.absoluteFilePath());
96 return fi.absoluteFilePath();
101 return d->programName;
106 d->configKey = keyName;
111 d->exeTypeName = name;
116 d->programName = name;
122 return fi.absolutePath();
136 ExeFilePath::ExeFilePath()
140 ExeFilePath::ExeFilePath(
const QString &path)
143 d->workingDir = QFileInfo(path).path();
151 ExeFilePath::~ExeFilePath()
162 QString ExeFilePath::path()
const 167 ExeFilePath &ExeFilePath::setPath(
const QString &path)
173 QString ExeFilePath::workingDir()
const 175 return d->workingDir;
178 ExeFilePath &ExeFilePath::setWorkingDir(
const QString &path)
180 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).