From 4b124bc022d2b54bea0326a3b7fe5705f8a1b09c Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 3 Apr 2015 14:02:14 -0400 Subject: [PATCH] Avoid including DFHackVersion.h in PluginManager.h Changes to DFHackVersion.h previously required recompiling nearly all of the DFHack core. --- library/Core.cpp | 4 +++- library/include/DFHackVersion.h | 1 + library/include/PluginManager.h | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/library/Core.cpp b/library/Core.cpp index 19b94719d..e2f45c5f7 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -1066,7 +1066,9 @@ void fIOthread(void * iodata) run_dfhack_init(con, core); con.print("DFHack is ready. Have a nice day!\n" - "Type in '?' or 'help' for general help, 'ls' to see all commands.\n"); + "DFHack version %s\n" + "Type in '?' or 'help' for general help, 'ls' to see all commands.\n", + Version::dfhack_version()); int clueless_counter = 0; while (true) diff --git a/library/include/DFHackVersion.h b/library/include/DFHackVersion.h index 315ddf885..4bfbd85dd 100644 --- a/library/include/DFHackVersion.h +++ b/library/include/DFHackVersion.h @@ -1,3 +1,4 @@ +#pragma once namespace DFHack { namespace Version { const char *dfhack_version(); diff --git a/library/include/PluginManager.h b/library/include/PluginManager.h index cded965b0..35de36297 100644 --- a/library/include/PluginManager.h +++ b/library/include/PluginManager.h @@ -24,7 +24,6 @@ distribution. #pragma once -#include "DFHackVersion.h" #include "Export.h" #include "Hooks.h" #include "ColorText.h" @@ -59,6 +58,10 @@ namespace DFHack class Notification; } + namespace Version { + const char *dfhack_version(); + } + // anon type, pretty much struct DFLibrary;