Access to external program executables (game clients, servers, and so on). More...
#include <exefile.h>
Public Member Functions | |
const QString & | configKey () const |
Config key where executable path on current system can be remembered. | |
const QString & | exeTypeName () const |
Name of the type of the executable (server, client, etc.). | |
virtual Message | install (QWidget *parent) |
Attempts to install the binary. | |
virtual QString | pathToExe (Message &message) |
Returns the path to the executable file. | |
const QString & | programName () const |
Name of the program this executable belongs to (ex. "Odamex"). | |
void | setConfigKey (const QString &keyName) |
Plugin setter for configKey(). | |
void | setExeTypeName (const QString &name) |
Plugin setter for exeTypeName(). | |
void | setProgramName (const QString &name) |
Plugin setter for programName(). | |
virtual QString | workingDirectory (Message &message) |
Path to this executable working directory. | |
Access to external program executables (game clients, servers, and so on).
ExeFile is an interface to external programs executables. It obtains directory and file paths to the executable with pathToExe() and workingDirectory(), defines name of configKey() under which the executable path can be stored, names the program in general through programName() and also names the purpose of the exec within that program through exeTypeName() and lastly, it optionally handles install() procedure if user and plugin desire so.
const QString & ExeFile::configKey | ( | ) | const |
Config key where executable path on current system can be remembered.
Definition at line 53 of file exefile.cpp.
const QString & ExeFile::exeTypeName | ( | ) | const |
Name of the type of the executable (server, client, etc.).
Definition at line 58 of file exefile.cpp.
|
virtual |
Attempts to install the binary.
Some games may support additional executables (testing binaries, for example). If such executables are not available on local filesystem, but can be installed automatically, pathToExe() should return Message with Message::Type::GAME_NOT_FOUND_BUT_CAN_BE_INSTALLED error type and implement install() method.
Default implementation does nothing and returns ignorable message.
Example implementation is provided in Zandronum plugin.
parent | Should be treated as parent widget for all widgets that need to be created during the process. |
Definition at line 63 of file exefile.cpp.
|
virtual |
Returns the path to the executable file.
[out] | message | Information or error message, if any. The type of the message might be relevant in some cases, please review documentation for install() method. |
Definition at line 69 of file exefile.cpp.
const QString & ExeFile::programName | ( | ) | const |
Name of the program this executable belongs to (ex. "Odamex").
Definition at line 108 of file exefile.cpp.
void ExeFile::setConfigKey | ( | const QString & | keyName | ) |
Plugin setter for configKey().
Definition at line 113 of file exefile.cpp.
void ExeFile::setExeTypeName | ( | const QString & | name | ) |
Plugin setter for exeTypeName().
Definition at line 118 of file exefile.cpp.
void ExeFile::setProgramName | ( | const QString & | name | ) |
Plugin setter for programName().
Definition at line 123 of file exefile.cpp.
|
virtual |
Path to this executable working directory.
Default behavior returns directory of pathToExe(), but you can override this to provide different working directory if needed.
[out] | message | Information or error message, if any. |
Definition at line 128 of file exefile.cpp.