diff options
Diffstat (limited to 'games-util/dfhack/files/dfhack-0.40.24.2/11-dfhack-init-example.patch')
| -rw-r--r-- | games-util/dfhack/files/dfhack-0.40.24.2/11-dfhack-init-example.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/games-util/dfhack/files/dfhack-0.40.24.2/11-dfhack-init-example.patch b/games-util/dfhack/files/dfhack-0.40.24.2/11-dfhack-init-example.patch new file mode 100644 index 00000000..7fa121b0 --- /dev/null +++ b/games-util/dfhack/files/dfhack-0.40.24.2/11-dfhack-init-example.patch @@ -0,0 +1,39 @@ +dfhack.init.example + +From: eroen <eroen@occam.eroen.eu> + + +--- + library/CMakeLists.txt | 2 +- + library/Core.cpp | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index c1db87a..048282e 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -356,7 +356,7 @@ install(FILES xml/symbols.xml + DESTINATION ${DFHACK_DATA_DESTINATION}) #linux: share/dfhack + #install the example autoexec file + install(FILES ../dfhack.init-example +- DESTINATION ${DFHACK_USERDOC_DESTINATION}) ++ DESTINATION ${DFHACK_DATA_DESTINATION}) + + install(TARGETS dfhack-run dfhack-client binpatch + LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION} +diff --git a/library/Core.cpp b/library/Core.cpp +index 1c9d318..1cddd4e 100644 +--- a/library/Core.cpp ++++ b/library/Core.cpp +@@ -876,7 +876,11 @@ static void run_dfhack_init(color_ostream &out, Core *core) + if (!core->loadScriptFile(out, "dfhack.init", true)) + { + core->runCommand(out, "gui/no-dfhack-init"); ++#ifdef DFHACK_DATA_DESTINATION ++ core->loadScriptFile(out, DFHACK_DATA_DESTINATION "/dfhack.init-example", true); ++#else + core->loadScriptFile(out, "dfhack.init-example", true); ++#endif + } + } + |
