From 6eb929b306ed8b504579db5053ce19318981ffdc Mon Sep 17 00:00:00 2001 From: lethosor Date: Sat, 9 May 2015 16:04:15 -0400 Subject: [PATCH] Move JSON files out of hack/ folder --- CMakeLists.txt | 2 ++ Readme.rst | 2 +- dfhack-config/dwarfmonitor.json | 3 +++ plugins/dwarfmonitor.cpp | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 dfhack-config/dwarfmonitor.json diff --git a/CMakeLists.txt b/CMakeLists.txt index c00e06dfb..f85c9e3db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,6 +173,8 @@ IF(BUILD_LIBRARY) install(DIRECTORY images DESTINATION ${DFHACK_USERDOC_DESTINATION}) endif() +install(DIRECTORY dfhack-config DESTINATION .) + #build the plugins IF(BUILD_PLUGINS) add_subdirectory (plugins) diff --git a/Readme.rst b/Readme.rst index d4d2c7eb8..3870635ce 100644 --- a/Readme.rst +++ b/Readme.rst @@ -1700,7 +1700,7 @@ Options: ``dwarfmonitor prefs``: Show dwarf preferences summary ``dwarfmonitor reload``: - Reload configuration file (``hack/config/dwarfmonitor.json``) + Reload configuration file (``dfhack-config/dwarfmonitor.json``) Configuration options: diff --git a/dfhack-config/dwarfmonitor.json b/dfhack-config/dwarfmonitor.json new file mode 100644 index 000000000..2a96eb4c7 --- /dev/null +++ b/dfhack-config/dwarfmonitor.json @@ -0,0 +1,3 @@ +{ + "date_format": "y-m-d" +} diff --git a/plugins/dwarfmonitor.cpp b/plugins/dwarfmonitor.cpp index b9e239ac7..4d9b452ce 100644 --- a/plugins/dwarfmonitor.cpp +++ b/plugins/dwarfmonitor.cpp @@ -1849,7 +1849,7 @@ DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) static bool load_config (color_ostream &out) { jsonxx::Object o; - std::ifstream infile("hack/config/dwarfmonitor.json"); + std::ifstream infile("dfhack-config/dwarfmonitor.json"); if (infile.good()) { std::string contents((std::istreambuf_iterator(infile)), (std::istreambuf_iterator()));