QTfrontend/ui/widget/about.cpp
changeset 9331 26f0bf0de172
parent 9329 b825fa990e1c
child 9337 c9d4daae1dee
equal deleted inserted replaced
9329:b825fa990e1c 9331:26f0bf0de172
    97     libinfo.append(QString("<a href=\"http://gcc.gnu.org\">GCC</a> %1<br>").arg(__VERSION__));
    97     libinfo.append(QString("<a href=\"http://gcc.gnu.org\">GCC</a> %1<br>").arg(__VERSION__));
    98 #else
    98 #else
    99     libinfo.append(QString(tr("Unknown Compiler")).arg(__VERSION__) + QString("<br>"));
    99     libinfo.append(QString(tr("Unknown Compiler")).arg(__VERSION__) + QString("<br>"));
   100 #endif
   100 #endif
   101 
   101 
       
   102     const SDL_version *sdl_ver = SDL_Linked_Version();
   102     libinfo.append(QString("<a href=\"http://www.libsdl.org/\">SDL</a> version: %1.%2.%3<br>")
   103     libinfo.append(QString("<a href=\"http://www.libsdl.org/\">SDL</a> version: %1.%2.%3<br>")
   103         .arg(SDL_MAJOR_VERSION)
   104         .arg(sdl_ver->major)
   104         .arg(SDL_MINOR_VERSION)
   105         .arg(sdl_ver->minor)
   105         .arg(SDL_PATCHLEVEL));
   106         .arg(sdl_ver->patch));
   106 
   107 
       
   108     const SDL_version *sdlmixer_ver = Mix_Linked_Version();
   107     libinfo.append(QString("<a href=\"http://www.libsdl.org/\">SDL_mixer</a> version: %1.%2.%3<br>")
   109     libinfo.append(QString("<a href=\"http://www.libsdl.org/\">SDL_mixer</a> version: %1.%2.%3<br>")
   108         .arg(MIX_MAJOR_VERSION)
   110         .arg(sdlmixer_ver->major)
   109         .arg(MIX_MINOR_VERSION)
   111         .arg(sdlmixer_ver->minor)
   110         .arg(MIX_PATCHLEVEL));
   112         .arg(sdlmixer_ver->patch));
   111 
   113 
       
   114     // the remaining sdl modules used only in engine, so instead of needlessly linking them here
       
   115     // we dynamically call the function returning the linked version
   112     void *sdlnet_handle = SDL_LoadObject(sopath("SDL_net"));
   116     void *sdlnet_handle = SDL_LoadObject(sopath("SDL_net"));
   113     if (sdlnet_handle != NULL) {
   117     if (sdlnet_handle != NULL) {
   114         SDL_version *(*sdlnet_ver_get)(void) = NULL;
   118         SDL_version *(*sdlnet_ver_get)(void) = NULL;
   115         sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
   119         sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
   116         if (sdlnet_ver_get != NULL) {
   120         if (sdlnet_ver_get != NULL) {
   164     libinfo.append(QString("<a href=\"http://icculus.org/physfs/\">PhysFS</a> version: %1.%2.%3<br>")
   168     libinfo.append(QString("<a href=\"http://icculus.org/physfs/\">PhysFS</a> version: %1.%2.%3<br>")
   165         .arg(PHYSFS_VER_MAJOR)
   169         .arg(PHYSFS_VER_MAJOR)
   166         .arg(PHYSFS_VER_MINOR)
   170         .arg(PHYSFS_VER_MINOR)
   167         .arg(PHYSFS_VER_PATCH));
   171         .arg(PHYSFS_VER_PATCH));
   168 
   172 
       
   173     // TODO: how to add Lua information?
       
   174 
   169     QLabel * lblLibInfo = new QLabel();
   175     QLabel * lblLibInfo = new QLabel();
   170     lblLibInfo->setOpenExternalLinks(true);
   176     lblLibInfo->setOpenExternalLinks(true);
   171     lblLibInfo->setText(libinfo);
   177     lblLibInfo->setText(libinfo);
   172     lblLibInfo->setWordWrap(true);
   178     lblLibInfo->setWordWrap(true);
   173     lblLibInfo->setMaximumWidth(280);
   179     lblLibInfo->setMaximumWidth(280);