/*
Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
#include "Audio/openal_wrapper.hpp"
#include "Graphic/gamegl.hpp"
-#include "MacCompatibility.hpp"
+#include "Platform/Platform.hpp"
#include "User/Settings.hpp"
+#include "Version.hpp"
#include <fstream>
#include <iostream>
using namespace Game;
#ifdef WIN32
-#include "win-res/resource.hpp"
#include <shellapi.h>
#include <windows.h>
#endif
{
{ UNKNOWN, 0, "", "", option::Arg::None, "USAGE: lugaru [options]\n\n"
"Options:" },
+ { VERSION, 0, "v", "version", option::Arg::None, " -v, --version Print version and exit." },
{ HELP, 0, "h", "help", option::Arg::None, " -h, --help Print usage and exit." },
{ FULLSCREEN, 1, "f", "fullscreen", option::Arg::None, " -f, --fullscreen Start the game in fullscreen mode." },
{ FULLSCREEN, 0, "w", "windowed", option::Arg::None, " -w, --windowed Start the game in windowed mode (default)." },
return 1;
}
+ // Always start by printing the version and info to the stdout
+ std::cout << "--------------------------------------------------------------------------\n"
+ << "Lugaru HD: The Rabbit's Foot, by Wolfire Games and the OSS Lugaru project.\n\n"
+ << "Licensed under the GPL 2.0+ and CC-BY-SA 3.0 and 4.0 licenses.\n"
+ << "More information, updates and bug reports at http://osslugaru.gitlab.io\n"
+ << std::endl;
+
+ std::cout << "Version " + VERSION_STRING + " -- " + VERSION_BUILD_TYPE + " build\n"
+ << "--------------------------------------------------------------------------\n"
+ << std::endl;
+
+ if (commandLineOptions[VERSION]) {
+ // That was enough, quit.
+ delete[] commandLineOptionsBuffer;
+ return 0;
+ }
+
if (commandLineOptions[HELP]) {
option::printUsage(std::cout, usage);
delete[] commandLineOptionsBuffer;