1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-04 23:30:06 +00:00

Added commit hash to version display

This commit is contained in:
2022-04-06 01:07:16 -05:00
parent 5fcdb53740
commit 9084afa738
6 changed files with 14 additions and 18 deletions

View File

@@ -1,9 +1,13 @@
#include <stdio.h>
#include "ltask.h"
#include "lconfig.h"
#include "cnc.h"
#include "ini.h"
#define STRING(x) #x
#define MACROLITSTR(x) STRING(x)
struct sLaika_taskService tService;
static int iniHandler(void* user, const char* section, const char* name, const char* value) {
@@ -38,8 +42,11 @@ bool loadConfig(struct sLaika_cnc *cnc, char *config) {
}
int main(int argv, char *argc[]) {
struct sLaika_cnc *cnc = laikaC_newCNC(atoi(LAIKA_CNC_PORT));
struct sLaika_cnc *cnc;
printf("Laika v" MACROLITSTR(LAIKA_VERSION_MAJOR) "." MACROLITSTR(LAIKA_VERSION_MINOR) "-" LAIKA_VERSION_COMMIT "\n");
cnc = laikaC_newCNC(atoi(LAIKA_CNC_PORT));
/* load config file */
if (argv >= 2 && !loadConfig(cnc, argc[1]))
return 1;