Versioning improvements (#768)

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
Elia Zammuto
2023-03-10 00:13:57 +01:00
committed by GitHub
parent 889b93da2d
commit c29c917474
14 changed files with 243 additions and 19 deletions
+2
View File
@@ -33,6 +33,7 @@
#include "rtsp.h"
#include "utility.h"
#include "uuid.h"
#include "version.h"
using namespace std::literals;
@@ -503,6 +504,7 @@ void getConfig(resp_https_t response, req_https_t request) {
outputTree.put("status", "true");
outputTree.put("platform", SUNSHINE_PLATFORM);
outputTree.put("version", PROJECT_VER);
outputTree.put("restart_supported", platf::restart_supported());
auto vars = config::parse_config(read_file(config::sunshine.config_file.c_str()));
+1 -1
View File
@@ -298,7 +298,7 @@ int main(int argc, char *argv[]) {
return fn->second(argv[0], config::sunshine.cmd.argc, config::sunshine.cmd.argv);
}
BOOST_LOG(info) << PROJECT_NAME << " version: " << PROJECT_VER << std::endl;
task_pool.start(1);
// Create signal handler after logging has been initialized
+10
View File
@@ -0,0 +1,10 @@
#ifndef INCLUDE_GUARD
#define INCLUDE_GUARD
#define PROJECT_NAME "@PROJECT_NAME@"
#define PROJECT_VER "@PROJECT_VERSION@"
#define PROJECT_VER_MAJOR "@PROJECT_VERSION_MAJOR@"
#define PROJECT_VER_MINOR "@PROJECT_VERSION_MINOR@"
#define PROJECT_VER_PATCH "@PROJECT_VERSION_PATCH@"
#endif // INCLUDE_GUARD