Fixed some formatting.

This commit is contained in:
Andrew 2013-02-25 13:39:07 -06:00
parent 23474da175
commit b56b819c35
3 changed files with 339 additions and 334 deletions

View File

@ -52,7 +52,7 @@ private:
MinecraftProcess *proc; MinecraftProcess *proc;
ConsoleWindow *console; ConsoleWindow *console;
public: public:
InstanceLauncher(QString instId) : QObject(), instances(settings->getInstanceDir()) InstanceLauncher(QString instId) : QObject(), instances(settings->get("InstanceDir").toString())
{ {
this->instId = instId; this->instId = instId;
} }
@ -172,22 +172,27 @@ int main(int argc, char *argv[])
// parse the arguments // parse the arguments
QHash<QString, QVariant> args; QHash<QString, QVariant> args;
try { try
{
args = parser.parse(app.arguments()); args = parser.parse(app.arguments());
} catch(ParsingError e) { }
catch(ParsingError e)
{
std::cerr << "CommandLineError: " << e.what() << std::endl; std::cerr << "CommandLineError: " << e.what() << std::endl;
std::cerr << "Try '%1 -h' to get help on MultiMC's command line parameters." << std::endl; std::cerr << "Try '%1 -h' to get help on MultiMC's command line parameters." << std::endl;
return 1; return 1;
} }
// display help and exit // display help and exit
if (args["help"].toBool()) { if (args["help"].toBool())
{
std::cout << qPrintable(parser.compileHelp(app.arguments()[0])); std::cout << qPrintable(parser.compileHelp(app.arguments()[0]));
return 0; return 0;
} }
// display version and exit // display version and exit
if (args["version"].toBool()) { if (args["version"].toBool())
{
std::cout << "Version " << VERSION_STR << std::endl; std::cout << "Version " << VERSION_STR << std::endl;
std::cout << "Git " << GIT_COMMIT << std::endl; std::cout << "Git " << GIT_COMMIT << std::endl;
std::cout << "Tag: " << JENKINS_BUILD_TAG << " " << (ARCH==x64?"x86_64":"x86") << std::endl; std::cout << "Tag: " << JENKINS_BUILD_TAG << " " << (ARCH==x64?"x86_64":"x86") << std::endl;