Program version is now determined from makefile.

This commit is contained in:
jakcron 2019-02-17 15:18:24 +08:00
parent 50d891cd24
commit 54cf4c5ef2
2 changed files with 13 additions and 5 deletions

View file

@ -45,7 +45,7 @@ void UserSettings::parseCmdArgs(const std::vector<std::string>& arg_list)
void UserSettings::showHelp()
{
printf("%s v%d.%d.%d (C) %s\n", APP_NAME, VER_MAJOR, VER_MINOR, VER_PATCH, AUTHORS);
printf("%s v%d.%d.%d (C) %s\n", APP_NAME, PROJECT_VER_MAJOR, PROJECT_VER_MINOR, PROJECT_VER_PATCH, PROJECT_AUTHORS);
printf("Built: %s %s\n\n", __TIME__, __DATE__);
printf("Usage: %s [options... ] <file>\n", BIN_NAME);

View file

@ -1,7 +1,15 @@
#pragma once
#define APP_NAME "NSTool"
#define BIN_NAME "nstool"
#define VER_MAJOR 1
#define VER_MINOR 0
#define VER_PATCH 5
#define AUTHORS "jakcron"
#ifndef PROJECT_VER_MAJOR
#define PROJECT_VER_MAJOR 0
#endif
#ifndef PROJECT_VER_MINOR
#define PROJECT_VER_MINOR 0
#endif
#ifndef PROJECT_VER_PATCH
#define PROJECT_VER_PATCH 0
#endif
#define PROJECT_AUTHORS "jakcron"