Implemented command line config overrides
You can set the file to read as the config file via the command line, like this, assuming the program supports it: prog -config=file.cfg You can also override indevidual key-value pairs in the config system using this syntax: prog -Ckey=value Both commands can be used together, and you can override multiple key-value pairs at once. To use this feature of the ConfigUtility, it must receive argc and argv as parameters to the Load() method.
This commit is contained in:
@@ -34,12 +34,12 @@
|
||||
//public methods
|
||||
//-------------------------
|
||||
|
||||
void ServerApplication::Init(int argc, char** argv) {
|
||||
void ServerApplication::Init(int argc, char* argv[]) {
|
||||
//NOTE: I might need to rearrange the init process so that lua & SQL can interact with the map system as needed.
|
||||
std::cout << "Beginning " << argv[0] << std::endl;
|
||||
|
||||
//load the prerequisites
|
||||
config.Load("rsc\\config.cfg");
|
||||
config.Load("rsc\\config.cfg", argc, argv);
|
||||
|
||||
//-------------------------
|
||||
//Initialize the APIs
|
||||
|
||||
Reference in New Issue
Block a user