summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-10-21 19:38:43 -0600
committerJared Adams <jaxad0127@gmail.com>2009-10-21 19:47:12 -0600
commitd9eb7650ed1bc11de9d96ed9a387501238663094 (patch)
tree15672303ab375a621ca07fb43ce755c7ae2f5bbe /src
parent7e9cd47d1aa10f7b556d04903d20f8884ca3eb35 (diff)
downloadmana-d9eb7650ed1bc11de9d96ed9a387501238663094.tar.gz
mana-d9eb7650ed1bc11de9d96ed9a387501238663094.tar.bz2
mana-d9eb7650ed1bc11de9d96ed9a387501238663094.tar.xz
mana-d9eb7650ed1bc11de9d96ed9a387501238663094.zip
Add an option to skip loading updates
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 92cbae77..9b10448e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -186,6 +186,7 @@ struct Options
printHelp(false),
printVersion(false),
skipUpdate(false),
+ skipUpdateLoad(false),
chooseDefault(false),
noOpenGL(false),
serverPort(0)
@@ -194,6 +195,7 @@ struct Options
bool printHelp;
bool printVersion;
bool skipUpdate;
+ bool skipUpdateLoad;
bool chooseDefault;
bool noOpenGL;
std::string username;
@@ -553,6 +555,7 @@ static void printHelp()
<< _(" -p --port : Login server port") << endl
<< _(" -s --server : Login server name or IP") << endl
<< _(" -u --skip-update : Skip the update downloads") << endl
+ << _(" -l --skip-load : Skip loading the updates") << endl
<< _(" -U --username : Login with this username") << endl
#ifdef USE_OPENGL
<< _(" -O --no-opengl : Disable OpenGL for this session") << endl
@@ -567,7 +570,7 @@ static void printVersion()
static void parseOptions(int argc, char *argv[], Options &options)
{
- const char *optstring = "hvud:U:P:Dc:s:p:C:H:S:O";
+ const char *optstring = "hvuld:U:P:Dc:s:p:C:H:S:O";
const struct option long_options[] = {
{ "config-file", required_argument, 0, 'C' },
@@ -581,6 +584,7 @@ static void parseOptions(int argc, char *argv[], Options &options)
{ "port", required_argument, 0, 'p' },
{ "server", required_argument, 0, 's' },
{ "skip-update", no_argument, 0, 'u' },
+ { "skip-load", no_argument, 0, 'l' },
{ "username", required_argument, 0, 'U' },
{ "no-opengl", no_argument, 0, 'O' },
{ "version", no_argument, 0, 'v' },
@@ -628,6 +632,9 @@ static void parseOptions(int argc, char *argv[], Options &options)
case 'u':
options.skipUpdate = true;
break;
+ case 'l':
+ options.skipUpdateLoad = true;
+ break;
case 'U':
options.username = optarg;
break;
@@ -1043,7 +1050,10 @@ int main(int argc, char *argv[])
logger->log("State: LOAD DATA");
// Load the updates downloaded so far...
- loadUpdates();
+ if (!options.skipUpdateLoad)
+ {
+ loadUpdates();
+ }
// Also add customdata directory
ResourceManager::getInstance()->searchAndAddArchives(