Show version and build options on startup

This commit is contained in:
Iwan Timmer
2015-12-27 18:37:04 +01:00
parent 537dbd8215
commit 6a0079f3ae
3 changed files with 38 additions and 0 deletions

24
src/configuration.h.in Normal file
View File

@@ -0,0 +1,24 @@
/*
* This file is part of Moonlight Embedded.
*
* Copyright (C) 2015 Iwan Timmer
*
* Moonlight is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Moonlight is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Moonlight; if not, see <http://www.gnu.org/licenses/>.
*/
#define VERSION_MAJOR @MOONLIGHT_MAJOR_VERSION@
#define VERSION_MINOR @MOONLIGHT_MINOR_VERSION@
#define VERSION_PATCH @MOONLIGHT_PATCH_VERSION@
#define COMPILE_OPTIONS "@MOONLIGHT_OPTIONS@"

View File

@@ -20,6 +20,7 @@
#include "loop.h"
#include "client.h"
#include "connection.h"
#include "configuration.h"
#include "audio.h"
#include "video.h"
#include "discover.h"
@@ -159,6 +160,8 @@ static void pair_check(PSERVER_DATA server) {
}
int main(int argc, char* argv[]) {
printf("Moonlight Embedded %d.%d.%d (%s)\n\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, COMPILE_OPTIONS);
CONFIGURATION config;
config_parse(argc, argv, &config);