ManaPlus
Functions
dumplibs.h File Reference

(986a3bf)

#include "localconsts.h"

Go to the source code of this file.

Functions

void dumpLibs ()
 

Function Documentation

◆ dumpLibs()

void dumpLibs ( )

Definition at line 116 of file dumplibs.cpp.

117 {
118  logger->log("Compiled with:");
119  logger->log(" zLib: %s", ZLIB_VERSION);
120 #ifdef ENABLE_LIBXML
121  logger->log(" libxml2: %s, %s",
122  LIBXML_DOTTED_VERSION,
123  LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA);
124 #endif // ENABLE_LIBXML
125 
126  logger->log(" libcurl: %s", LIBCURL_VERSION);
127  logger->log(" libpng: %s", PNG_LIBPNG_VER_STRING);
128 
129  dumpCompiledSdlVersion("SDL", SDL);
130  dumpCompiledSdlVersion("SDL_net", SDL_NET);
131  dumpCompiledSdlVersion("SDL_image", SDL_IMAGE);
132  dumpCompiledSdlVersion("SDL_mixer", SDL_MIXER);
133  dumpCompiledSdlVersion("SDL_ttf", SDL_TTF);
134 
135  logger->log("Linked with:");
136 #if ZLIB_VERNUM >= 0x1020
137  logger->log(" zLib: %s", zlibVersion());
138 #endif // ZLIB_VERNUM >= 0x1020
139 #ifdef LIBXML_TEST_VERSION
140  LIBXML_TEST_VERSION
141 #endif // LIBXML_TEST_VERSION
142 #ifdef ENABLE_LIBXML
143  const char **xmlVersion = __xmlParserVersion();
144  if (xmlVersion != nullptr)
145  logger->log(" libxml2: %s", *xmlVersion);
146 #endif // ENABLE_LIBXML
147 #ifdef USE_SDL2
148  SDL_version sdlVersion;
149  sdlVersion.major = 0;
150  sdlVersion.minor = 0;
151  sdlVersion.patch = 0;
152  SDL_GetVersion(&sdlVersion);
153  dumpLinkedSdlVersion("SDL", &sdlVersion);
154 #else // USE_SDL2
155  dumpLinkedSdlVersion("SDL", SDL_Linked_Version());
156 #endif // USE_SDL2
157  dumpLinkedSdlVersion("SDL_net", SDLNet_Linked_Version());
158  dumpLinkedSdlVersion("SDL_image", IMG_Linked_Version());
159  dumpLinkedSdlVersion("SDL_mixer", Mix_Linked_Version());
160  dumpLinkedSdlVersion("SDL_ttf", TTF_Linked_Version());
161 
162  compareVersions("zLib", ZLIB_VERSION, zlibVersion());
163 #ifdef ENABLE_LIBXML
164  if (xmlVersion != nullptr)
165  {
166  compareVersions("libxml2",
167  LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA,
168  *xmlVersion);
169  }
170 #endif // ENABLE_LIBXML
171 #ifdef USE_SDL2
172  compareSDLVersions("SDL", sdlVersionJoin(SDL), &sdlVersion);
173 #else // USE_SDL2
174  compareSDLVersions("SDL", sdlVersionJoin(SDL), SDL_Linked_Version());
175 #endif // USE_SDL2
176 
177  compareSDLVersions("SDL_net",
178  sdlVersionJoin(SDL_NET),
179  SDLNet_Linked_Version());
180  compareSDLVersions("SDL_image",
181  sdlVersionJoin(SDL_IMAGE),
182  IMG_Linked_Version());
183  compareSDLVersions("SDL_mixer",
184  sdlVersionJoin(SDL_MIXER),
185  Mix_Linked_Version());
186  compareSDLVersions("SDL_ttf",
187  sdlVersionJoin(SDL_TTF),
188  TTF_Linked_Version());
189 }
void log(const char *const log_text,...)
Definition: logger.cpp:269
#define dumpCompiledSdlVersion(text, prefix)
Definition: dumplibs.cpp:54
static void compareSDLVersions(char *libName, int major, int minor, int patch, SDL_version *linkedVersion)
Definition: dumplibs.cpp:92
static void compareVersions(char *libName, char *buildVersion, char *linkedVersion)
Definition: dumplibs.cpp:78
static void dumpLinkedSdlVersion(char *text, SDL_version *version)
Definition: dumplibs.cpp:65
#define sdlVersionJoin(prefix)
Definition: dumplibs.cpp:60
Logger * logger
Definition: logger.cpp:89
Definition: sdlhelper.h:45

References compareSDLVersions(), compareVersions(), dumpCompiledSdlVersion, dumpLinkedSdlVersion(), Logger::log(), logger, and sdlVersionJoin.