summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/example.mana (renamed from data/branding.xml)9
-rw-r--r--src/client.cpp5
-rw-r--r--src/client.h1
-rw-r--r--src/main.cpp11
4 files changed, 19 insertions, 7 deletions
diff --git a/data/branding.xml b/docs/example.mana
index 38f74e40..795d8d40 100644
--- a/data/branding.xml
+++ b/docs/example.mana
@@ -1,12 +1,11 @@
<?xml version="1.0"?>
<!--
-Branding information
+Example branding file
-All values in here are the default values which are hardcoded into the Mana
-client. So it would make no difference for the official version when this file
-is missing. It is basically an example for developers of Mana servers to help them
-writing a branding.xml for their servers.
+With a branding file you can customize the appearance and various
+other default settings. To use a branding file just pass its
+filename / path as a command line parameter
-->
<configuration>
diff --git a/src/client.cpp b/src/client.cpp
index cf1a6496..5651f968 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -205,7 +205,10 @@ Client::Client(const Options &options):
mInstance = this;
// Load branding information
- branding.init("data/branding.xml");
+ if (!options.brandingPath.empty())
+ {
+ branding.init(options.brandingPath);
+ }
initHomeDir(options);
initScreenshotDir(options.screenshotDir);
diff --git a/src/client.h b/src/client.h
index 47328c4d..32b921dc 100644
--- a/src/client.h
+++ b/src/client.h
@@ -139,6 +139,7 @@ public:
std::string password;
std::string character;
std::string configPath;
+ std::string brandingPath;
std::string updateHost;
std::string dataPath;
std::string homeDir;
diff --git a/src/main.cpp b/src/main.cpp
index 2fb9c112..aaa826cb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -40,7 +40,7 @@ static void printHelp()
using std::endl;
std::cout
- << _("mana") << endl << endl
+ << _("mana [mana-file]") << endl << endl
<< _("Options:") << endl
<< _(" -C --config-file : Configuration file to use") << endl
<< _(" -d --data : Directory to load game data from") << endl
@@ -147,6 +147,15 @@ static void parseOptions(int argc, char *argv[], Client::Options &options)
break;
}
}
+
+ // when there are still options left use the last
+ // one as branding file
+ if (optind < argc)
+ {
+ options.brandingPath = argv[optind];
+ }
+
+
}
#ifdef WIN32