Fixed some formatting.
This commit is contained in:
parent
23474da175
commit
b56b819c35
15
main.cpp
15
main.cpp
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user