Added git branch name and short hash to moonlight binary

This commit is contained in:
Albert Andaluz
2019-10-15 15:41:19 +02:00
committed by Iwan Timmer
parent fe1c203b10
commit 4528b78d81
4 changed files with 36 additions and 0 deletions

View File

@@ -20,5 +20,7 @@
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
#cmakedefine GIT_BRANCH "@GIT_BRANCH@"
#cmakedefine GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
#define COMPILE_OPTIONS "@MOONLIGHT_OPTIONS@"

View File

@@ -151,7 +151,11 @@ static void stream(PSERVER_DATA server, PCONFIGURATION config, enum platform sys
}
static void help() {
#ifdef GIT_BRANCH
printf("Moonlight Embedded %d.%d.%d-%s-%s\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, GIT_BRANCH, GIT_COMMIT_HASH);
#else
printf("Moonlight Embedded %d.%d.%d\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
#endif
printf("Usage: moonlight [action] (options) [host]\n");
printf(" moonlight [configfile]\n");
printf("\n Actions\n\n");