The Battle for Wesnoth  1.15.9+dev
build_info.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 - 2018 by Iris Morelle <shadowm2006@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #define GETTEXT_DOMAIN "wesnoth-lib"
16 
17 #include "build_info.hpp"
18 
19 #include "desktop/version.hpp"
20 #include "game_config.hpp"
21 #include "filesystem.hpp"
22 #include "formatter.hpp"
23 #include "gettext.hpp"
26 #include "game_version.hpp"
27 #include "sound.hpp"
28 #include "video.hpp"
29 #include "addon/manager.hpp"
30 
31 #include <algorithm>
32 #include <fstream>
33 #include <iomanip>
34 
35 #include <SDL2/SDL.h>
36 #include <SDL2/SDL_image.h>
37 #include <SDL2/SDL_mixer.h>
38 #include <SDL2/SDL_ttf.h>
39 
40 #include <boost/algorithm/string.hpp>
41 #include <boost/version.hpp>
42 
43 #ifndef __APPLE__
44 #include <openssl/crypto.h>
45 #include <openssl/opensslv.h>
46 #endif
47 
48 #include <pango/pangocairo.h>
49 
50 #ifdef __APPLE__
51 // apple_notification.mm uses Foundation.h, which is an Objective-C header;
52 // but CoreFoundation.h is a C header which also defines these.
53 #include <CoreFoundation/CoreFoundation.h>
54 #endif
55 
56 namespace game_config
57 {
58 
59 namespace {
60 
61 struct version_table_manager
62 {
63  std::vector<std::string> compiled, linked, names;
64  std::vector<optional_feature> features;
65 
66  version_table_manager();
67 };
68 
69 const version_table_manager versions;
70 
71 #if 0
72 std::string format_version(unsigned a, unsigned b, unsigned c)
73 {
74  return formatter() << a << '.' << b << '.' << c;
75 }
76 #endif
77 
78 std::string format_version(const SDL_version& v)
79 {
80  return formatter() << static_cast<unsigned>(v.major) << '.'
81  << static_cast<unsigned>(v.minor) << '.'
82  << static_cast<unsigned>(v.patch);
83 }
84 
85 #ifndef __APPLE__
86 
87 std::string format_openssl_patch_level(uint8_t p)
88 {
89  return p <= 26
90  ? std::string(1, 'a' + static_cast<char>(p) - 1)
91  : "patch" + std::to_string(p);
92 }
93 
94 std::string format_openssl_version(long v)
95 {
96  int major, minor, fix, patch, status;
97  std::ostringstream fmt;
98 
99  //
100  // The people who maintain OpenSSL are not from this world. I suppose it's
101  // only fair that I'm the one who gets to try to make sense of their version
102  // encoding scheme. -- shadowm
103  //
104 
105  if(v < 0x0930L) {
106  // Pre-0.9.3 seems simpler times overall.
107  minor = v & 0x0F00L >> 8;
108  fix = v & 0x00F0L >> 4;
109  patch = v & 0x000FL;
110 
111  fmt << "0." << minor << '.' << fix;
112  if(patch) {
113  fmt << format_openssl_patch_level(patch);
114  }
115  } else {
116  //
117  // Note that they either assume the major version will never be greater than
118  // 9, they plan to use hexadecimal digits for versions 10.x.x through
119  // 15.x.x, or they expect long to be always > 32-bits by then. Who the hell
120  // knows, really.
121  //
122  major = (v & 0xF0000000L) >> 28;
123  minor = (v & 0x0FF00000L) >> 20;
124  fix = (v & 0x000FF000L) >> 12;
125  patch = (v & 0x00000FF0L) >> 4;
126  status = (v & 0x0000000FL);
127 
128  if(v < 0x00905100L) {
129  //
130  // From wiki.openssl.org (also mentioned in opensslv.h, in the most oblique
131  // fashion possible):
132  //
133  // "Versions between 0.9.3 and 0.9.5 had a version identifier with this interpretation:
134  // MMNNFFRBB major minor fix final beta/patch"
135  //
136  // Both the wiki and opensslv.h fail to accurately list actual version
137  // numbers that ended up used in the wild -- e.g. 0.9.3a is supposedly
138  // 0x0090301f when it really was 0x00903101.
139  //
140  const uint8_t is_final = (v & 0xF00L) >> 8;
141  status = is_final ? 0xF : 0;
142  patch = v & 0xFFL;
143  } else if(v < 0x00906000L) {
144  //
145  // Quoth opensslv.h:
146  //
147  // "For continuity reasons (because 0.9.5 is already out, and is coded
148  // 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
149  // part is slightly different, by setting the highest bit. This means
150  // that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start
151  // with 0x0090600S..."
152  //
153  patch ^= 1 << 7;
154  }
155 
156  fmt << major << '.' << minor << '.' << fix;
157 
158  if(patch) {
159  fmt << format_openssl_patch_level(patch);
160  }
161 
162  if(status == 0x0) {
163  fmt << "-dev";
164  } else if(status < 0xF) {
165  fmt << "-beta" << status;
166  }
167  }
168 
169  return fmt.str();
170 
171 }
172 
173 #endif
174 
175 version_table_manager::version_table_manager()
176  : compiled(LIB_COUNT, "")
177  , linked(LIB_COUNT, "")
178  , names(LIB_COUNT, "")
179  , features()
180 {
181  SDL_version sdl_version;
182 
183 
184  //
185  // SDL
186  //
187 
188  SDL_VERSION(&sdl_version);
189  compiled[LIB_SDL] = format_version(sdl_version);
190 
191  SDL_GetVersion(&sdl_version);
192  linked[LIB_SDL] = format_version(sdl_version);
193 
194  names[LIB_SDL] = "SDL";
195 
196  //
197  // SDL_image
198  //
199 
200  SDL_IMAGE_VERSION(&sdl_version);
201  compiled[LIB_SDL_IMAGE] = format_version(sdl_version);
202 
203  const SDL_version* sdl_rt_version = IMG_Linked_Version();
204  if(sdl_rt_version) {
205  linked[LIB_SDL_IMAGE] = format_version(*sdl_rt_version);
206  }
207 
208  names[LIB_SDL_IMAGE] = "SDL_image";
209 
210  //
211  // SDL_mixer
212  //
213 
214  SDL_MIXER_VERSION(&sdl_version);
215  compiled[LIB_SDL_MIXER] = format_version(sdl_version);
216 
217  sdl_rt_version = Mix_Linked_Version();
218  if(sdl_rt_version) {
219  linked[LIB_SDL_MIXER] = format_version(*sdl_rt_version);
220  }
221 
222  names[LIB_SDL_MIXER] = "SDL_mixer";
223 
224  //
225  // SDL_ttf
226  //
227 
228  SDL_TTF_VERSION(&sdl_version);
229  compiled[LIB_SDL_TTF] = format_version(sdl_version);
230 
231  sdl_rt_version = TTF_Linked_Version();
232  if(sdl_rt_version) {
233  linked[LIB_SDL_TTF] = format_version(*sdl_rt_version);
234  }
235 
236  names[LIB_SDL_TTF] = "SDL_ttf";
237 
238  //
239  // Boost
240  //
241 
242  compiled[LIB_BOOST] = BOOST_LIB_VERSION;
243  std::replace(compiled[LIB_BOOST].begin(), compiled[LIB_BOOST].end(), '_', '.');
244  names[LIB_BOOST] = "Boost";
245 
246  //
247  // OpenSSL/libcrypto
248  //
249 
250 #ifndef __APPLE__
251  compiled[LIB_CRYPTO] = format_openssl_version(OPENSSL_VERSION_NUMBER);
252  linked[LIB_CRYPTO] = format_openssl_version(SSLeay());
253  names[LIB_CRYPTO] = "OpenSSL/libcrypto";
254 #endif
255 
256  //
257  // Cairo
258  //
259 
260  compiled[LIB_CAIRO] = CAIRO_VERSION_STRING;
261  linked[LIB_CAIRO] = cairo_version_string();
262  names[LIB_CAIRO] = "Cairo";
263 
264  //
265  // Pango
266  //
267 
268  compiled[LIB_PANGO] = PANGO_VERSION_STRING;
269  linked[LIB_PANGO] = pango_version_string();
270  names[LIB_PANGO] = "Pango";
271 
272  //
273  // Features table.
274  //
275 
276  features.emplace_back(N_("feature^Lua console completion"));
277 #ifdef HAVE_HISTORY
278  features.back().enabled = true;
279 #endif
280 
281  features.emplace_back(N_("feature^Legacy bidirectional rendering"));
282 #ifdef HAVE_FRIBIDI
283  features.back().enabled = true;
284 #endif
285 
286 #ifdef _X11
287 
288  features.emplace_back(N_("feature^D-Bus notifications back end"));
289 #ifdef HAVE_LIBDBUS
290  features.back().enabled = true;
291 #endif
292 
293 #endif /* _X11 */
294 
295 #ifdef _WIN32
296  // Always compiled in.
297  features.emplace_back(N_("feature^Win32 notifications back end"));
298  features.back().enabled = true;
299 #endif
300 
301 #ifdef __APPLE__
302  // Always compiled in.
303  features.emplace_back(N_("feature^Cocoa notifications back end"));
304  features.back().enabled = true;
305 #endif /* __APPLE__ */
306 }
307 
308 const std::string empty_version = "";
309 
310 } // end anonymous namespace 1
311 
312 std::vector<optional_feature> optional_features_table()
313 {
314  std::vector<optional_feature> res = versions.features;
315 
316  for(std::size_t k = 0; k < res.size(); ++k) {
317  res[k].name = _(res[k].name.c_str());
318  }
319  return res;
320 }
321 
322 const std::string& library_build_version(LIBRARY_ID lib)
323 {
324  if(lib >= LIB_COUNT) {
325  return empty_version;
326  }
327 
328  return versions.compiled[lib];
329 }
330 
331 const std::string& library_runtime_version(LIBRARY_ID lib)
332 {
333  if(lib >= LIB_COUNT) {
334  return empty_version;
335  }
336 
337  return versions.linked[lib];
338 }
339 
340 const std::string& library_name(LIBRARY_ID lib)
341 {
342  if(lib >= LIB_COUNT) {
343  return empty_version;
344  }
345 
346  return versions.names[lib];
347 }
348 
349 std::string dist_channel_id()
350 {
351  std::string info;
352  std::ifstream infofile(game_config::path + "/data/dist");
353  if(infofile.is_open()) {
354  std::getline(infofile, info);
355  infofile.close();
356  boost::trim(info);
357  }
358 
359  if(info.empty()) {
360  return "Default";
361  }
362 
363  return info;
364 }
365 
366 namespace {
367 
368 /**
369  * Formats items into a tidy 2-column list with a fixed-length first column.
370  */
371 class list_formatter
372 {
373 public:
374  using list_entry = std::pair<std::string, std::string>;
375  using contents_list = std::vector<list_entry>;
376 
377  list_formatter(const std::string& heading, const contents_list& contents = {}, const std::string& empty_placeholder = "")
378  : heading_(heading)
379  , placeholder_(empty_placeholder)
380  , contents_(contents)
381  {
382  }
383 
384  void insert(const std::string& label, const std::string& value)
385  {
386  contents_.emplace_back(label, value);
387  }
388 
389  void set_placeholder(const std::string& placeholder)
390  {
391  placeholder_ = placeholder;
392  }
393 
394  void stream_put(std::ostream& os) const;
395 
396 private:
397  static const char heading_delimiter;
398  static const std::string label_delimiter;
399 
400  std::string heading_;
401  std::string placeholder_;
402 
403  contents_list contents_;
404 };
405 
406 const char list_formatter::heading_delimiter = '=';
407 const std::string list_formatter::label_delimiter = ": ";
408 
409 void list_formatter::stream_put(std::ostream& os) const
410 {
411  if(!heading_.empty()) {
412  os << heading_ << '\n' << std::string(utf8::size(heading_), heading_delimiter) << "\n\n";
413  }
414 
415  if(contents_.empty() && !placeholder_.empty()) {
416  os << placeholder_ << '\n';
417  } else if(!contents_.empty()) {
418  auto label_length_comparator = [](const list_entry& a, const list_entry& b)
419  {
420  return utf8::size(a.first) < utf8::size(b.first);
421  };
422 
423  const auto longest_entry_label = std::max_element(contents_.begin(), contents_.end(), label_length_comparator);
424  const std::size_t min_length = longest_entry_label != contents_.end()
425  ? utf8::size(label_delimiter) + utf8::size(longest_entry_label->first)
426  : 0;
427 
428  // Save stream attributes for resetting them later after completing the loop
429  const std::size_t prev_width = os.width();
430  const std::ostream::fmtflags prev_flags = os.flags();
431 
432  os << std::left;
433 
434  for(const auto& entry : contents_) {
435  os << std::setw(min_length) << entry.first + label_delimiter << entry.second << '\n';
436  }
437 
438  os.width(prev_width);
439  os.flags(prev_flags);
440  }
441 
442  os << '\n';
443 }
444 
445 std::ostream& operator<<(std::ostream& os, const list_formatter& fmt)
446 {
447  fmt.stream_put(os);
448  return os;
449 }
450 
451 list_formatter library_versions_report_internal(const std::string& heading = "")
452 {
453  list_formatter fmt{heading};
454 
455  for(unsigned n = 0; n < LIB_COUNT; ++n)
456  {
457  if(versions.names[n].empty()) {
458  continue;
459  }
460 
461  std::string text = versions.compiled[n];
462  if(!versions.linked[n].empty()) {
463  text += " (runtime " + versions.linked[n] + ")";
464  }
465 
466  fmt.insert(versions.names[n], text);
467  }
468 
469  return fmt;
470 }
471 
472 list_formatter optional_features_report_internal(const std::string& heading = "")
473 {
474  list_formatter fmt{heading};
475 
476  // Yes, it's for stdout/stderr but we still want the localized version so
477  // that the context prefixes are stripped.
478  const std::vector<optional_feature>& features = optional_features_table();
479 
480  for(const auto& feature : features) {
481  fmt.insert(feature.name, feature.enabled ? "yes" : "no");
482  }
483 
484  return fmt;
485 }
486 
487 template<typename T>
488 inline std::string geometry_to_string(T horizontal, T vertical)
489 {
490  return std::to_string(horizontal) + 'x' + std::to_string(vertical);
491 }
492 
493 std::string format_sdl_driver_list(std::vector<std::string> drivers, const std::string& current_driver)
494 {
495  bool found_current_driver = false;
496 
497  for(auto& drvname : drivers) {
498  if(current_driver == drvname) {
499  found_current_driver = true;
500  drvname = "[" + current_driver + "]";
501  }
502  }
503 
504  if(drivers.empty() || !found_current_driver) {
505  // This shouldn't happen but SDL is weird at times so whatevs
506  drivers.emplace_back("[" + current_driver + "]");
507  }
508 
509  return utils::join(drivers, " ");
510 }
511 
512 list_formatter video_settings_report_internal(const std::string& heading = "")
513 {
514  list_formatter fmt{heading};
515 
516  if(!CVideo::setup_completed()) {
517  fmt.set_placeholder("Graphics not initialized.");
518  return fmt;
519  }
520 
521  CVideo& video = CVideo::get_singleton();
522 
523  std::string placeholder;
524 
525  if(video.non_interactive()) {
526  placeholder = "Running in non-interactive mode.";
527  } else if(!video.has_window()) {
528  placeholder = "Running without a game window.";
529  }
530 
531  if(!placeholder.empty()) {
532  fmt.set_placeholder(placeholder);
533  return fmt;
534  }
535 
536  const auto& current_driver = CVideo::current_driver();
537  auto drivers = CVideo::enumerate_drivers();
538 
539  const auto& dpi = video.get_dpi();
540  const auto& scale = video.get_dpi_scale_factor();
541  std::string dpi_report, scale_report;
542 
543  if(dpi.first == 0.0f || dpi.second == 0.0f) {
544  scale_report = dpi_report = "<unknown>";
545  } else {
546  dpi_report = geometry_to_string(dpi.first, dpi.second);
547  scale_report = geometry_to_string(scale.first, scale.second);
548  }
549 
550  fmt.insert("SDL video drivers", format_sdl_driver_list(drivers, current_driver));
551  fmt.insert("Window size", geometry_to_string(video.get_width(), video.get_height()));
552  fmt.insert("Screen refresh rate", std::to_string(video.current_refresh_rate()));
553  fmt.insert("Screen dots per inch", dpi_report);
554  fmt.insert("Screen dpi scale factor", scale_report);
555 
556  return fmt;
557 }
558 
559 list_formatter sound_settings_report_internal(const std::string& heading = "")
560 {
561  list_formatter fmt{heading};
562 
563  const auto& driver_status = sound::driver_status::query();
564 
565  if(!driver_status.initialized) {
566  fmt.set_placeholder("Audio not initialized.");
567  return fmt;
568  }
569 
570  const auto& current_driver = sound::current_driver();
571  auto drivers = sound::enumerate_drivers();
572 
573  static std::map<uint16_t, std::string> audio_format_names = {
574  // 8 bits
575  { AUDIO_U8, "unsigned 8 bit" },
576  { AUDIO_S8, "signed 8 bit" },
577  // 16 bits
578  { AUDIO_U16LSB, "unsigned 16 bit little-endian" },
579  { AUDIO_U16MSB, "unsigned 16 bit big-endian" },
580  { AUDIO_S16LSB, "signed 16 bit little-endian" },
581  { AUDIO_S16MSB, "signed 16 bit big-endian" },
582  // 32 bits
583  { AUDIO_S32LSB, "signed 32 bit little-endian" },
584  { AUDIO_S32MSB, "signed 32 bit big-endian" },
585  { AUDIO_F32LSB, "signed 32 bit floating point little-endian" },
586  { AUDIO_F32MSB, "signed 32 bit floating point big-endian" },
587  };
588 
589  auto fmt_names_it = audio_format_names.find(driver_status.format);
590  // If we don't recognize the format id just print the raw number
591  const std::string fmt_name = fmt_names_it != audio_format_names.end()
592  ? fmt_names_it->second
593  : formatter() << "0x" << std::setfill('0') << std::setw(2*sizeof(driver_status.format)) << std::hex << std::uppercase << driver_status.format;
594 
595  fmt.insert("SDL audio drivers", format_sdl_driver_list(drivers, current_driver));
596  fmt.insert("Number of channels", std::to_string(driver_status.channels));
597  fmt.insert("Output rate", std::to_string(driver_status.frequency) + " Hz");
598  fmt.insert("Sample format", fmt_name);
599  fmt.insert("Sample size", std::to_string(driver_status.chunk_size) + " bytes");
600 
601  return fmt;
602 }
603 
604 } // end anonymous namespace 2
605 
607 {
608  return formatter{} << library_versions_report_internal();
609 }
610 
612 {
613  return formatter{} << optional_features_report_internal();
614 }
615 
616 std::string full_build_report()
617 {
618  list_formatter::contents_list paths{
619  {"Data dir", game_config::path},
620  {"User config dir", filesystem::get_user_config_dir()},
621  {"User data dir", filesystem::get_user_data_dir()},
622  {"Saves dir", filesystem::get_saves_dir()},
623  {"Add-ons dir", filesystem::get_addons_dir()},
624  {"Cache dir", filesystem::get_cache_dir()},
625  };
626 
627  // Obfuscate usernames in paths
628  for(auto& entry : paths) {
629  entry.second = filesystem::sanitize_path(entry.second);
630  }
631 
632  list_formatter::contents_list addons;
633 
634  for(const auto& addon_info : installed_addons_and_versions()) {
635  addons.emplace_back(addon_info.first, addon_info.second);
636  }
637 
638  std::ostringstream o;
639 
640  o << "The Battle for Wesnoth version " << game_config::revision << '\n'
641  << "Running on " << desktop::os_version() << '\n'
642  << "Distribution channel: " << dist_channel_id() << '\n'
643  << '\n'
644  << list_formatter{"Game paths", paths}
645  << library_versions_report_internal("Libraries")
646  << optional_features_report_internal("Features")
647  << video_settings_report_internal("Current video settings")
648  << sound_settings_report_internal("Current audio settings")
649  << list_formatter("Installed add-ons", addons, "No add-ons installed.");
650 
651  return o.str();
652 }
653 
654 } // end namespace game_config
std::string heading_
Definition: build_info.cpp:400
static const char heading_delimiter
Definition: build_info.cpp:397
std::string library_versions_report()
Produce a plain-text report of library versions suitable for stdout/stderr.
Definition: build_info.cpp:606
Interfaces for manipulating version numbers of engine, add-ons, etc.
std::string current_driver()
Definition: sound.cpp:411
std::string join(const T &v, const std::string &s=",")
Generates a new string joining container items in a list.
std::pair< float, float > get_dpi_scale_factor() const
The current scale factor on High-DPI screens.
Definition: video.cpp:436
static const std::string label_delimiter
Definition: build_info.cpp:398
std::string optional_features_report()
Produce a plain-text report of features suitable for stdout/stderr.
Definition: build_info.cpp:611
logger & info()
Definition: log.cpp:91
#define a
std::string placeholder_
Definition: build_info.cpp:401
Definition: video.hpp:31
contents_list contents_
Definition: build_info.cpp:403
static CVideo & get_singleton()
Definition: video.hpp:48
bool non_interactive() const
Definition: video.cpp:140
STL namespace.
const std::string & library_build_version(LIBRARY_ID lib)
Retrieve the build-time version number of the given library.
Definition: build_info.cpp:322
static std::string _(const char *str)
Definition: gettext.hpp:92
std::string get_saves_dir()
#define b
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
Definition: unicode.cpp:86
const std::string & library_name(LIBRARY_ID lib)
Retrieve the user-visible name for the given library.
Definition: build_info.cpp:340
void scale(size_t factor, const uint32_t *src, uint32_t *trg, int srcWidth, int srcHeight, const ScalerCfg &cfg=ScalerCfg(), int yFirst=0, int yLast=std::numeric_limits< int >::max())
Definition: xbrz.cpp:1190
std::vector< optional_feature > optional_features_table()
Return a localized features table.
Definition: build_info.cpp:312
std::vector< optional_feature > features
Definition: build_info.cpp:64
void trim(string_view &s)
std::ostringstream wrapper.
Definition: formatter.hpp:38
std::string get_user_data_dir()
Definition: filesystem.cpp:791
static std::vector< std::string > enumerate_drivers()
Definition: video.cpp:385
std::string dist_channel_id()
Return the distribution channel identifier, or "Default" if missing.
Definition: build_info.cpp:349
std::string path
Definition: game_config.cpp:38
std::string sanitize_path(const std::string &path)
Sanitizes a path to remove references to the user&#39;s name.
int get_width(bool as_pixels=true) const
Returns the window renderer width in pixels or screen coordinates.
Definition: video.cpp:311
bool has_window()
Definition: video.hpp:80
std::ostream & operator<<(std::ostream &s, const ai::attack_result &r)
Definition: actions.cpp:1130
Platform identification and version information functions.
std::string get_cache_dir()
Definition: filesystem.cpp:796
int current_refresh_rate() const
Definition: video.hpp:164
std::vector< std::string > linked
Definition: build_info.cpp:63
const std::string revision
mock_party p
Game configuration data as global variables.
Definition: build_info.cpp:56
std::string os_version()
Returns a string with the running OS name and version information.
Definition: version.cpp:163
std::vector< std::string > names
Definition: build_info.cpp:63
const std::string & library_runtime_version(LIBRARY_ID lib)
Retrieve the runtime version number of the given library.
Definition: build_info.cpp:331
std::string name
Definition: sdl_ttf.cpp:70
static std::string current_driver()
Definition: video.cpp:379
std::string & insert(std::string &str, const std::size_t pos, const std::string &insert)
Insert a UTF-8 string at the specified position.
Definition: unicode.cpp:99
Declarations for File-IO.
int get_height(bool as_pixels=true) const
Returns the window renderer height in pixels or in screen coordinates.
Definition: video.cpp:316
#define N_(String)
Definition: gettext.hpp:100
std::string get_user_config_dir()
Definition: filesystem.cpp:762
lu_byte left
Definition: lparser.cpp:1027
std::string get_addons_dir()
static driver_status query()
Definition: sound.cpp:430
mock_char c
std::vector< std::string > enumerate_drivers()
Definition: sound.cpp:417
static map_location::DIRECTION n
std::vector< std::string > compiled
Definition: build_info.cpp:63
static bool setup_completed()
Definition: video.hpp:43
std::string full_build_report()
Produce a bug report-style info dump.
Definition: build_info.cpp:616
std::pair< float, float > get_dpi() const
The current game screen dpi.
Definition: video.cpp:407
std::map< std::string, std::string > installed_addons_and_versions()
Retrieves the ids and versions of all installed add-ons.
Definition: manager.cpp:182