Skip to content

Commit

Permalink
Add information to about page
Browse files Browse the repository at this point in the history
  • Loading branch information
complexlogic committed Oct 26, 2024
1 parent f6718ce commit 94886cf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions:
statuses: read

env:
VCPKG_COMMITTISH: 1de2026f28ead93ff1773e6e680387643e914ea1
VCPKG_COMMITTISH: 10b7a178346f3f0abef60cecd5130e295afd8da4

jobs:
build_windows:
Expand Down
33 changes: 32 additions & 1 deletion src/about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ extern "C" {
#include <libavutil/avutil.h>
}

#include <taglib/taglib.h>
#if TAGLIB_MAJOR_VERSION > 1
#include <taglib/tversionnumber.h>
#endif

#include "ui_about.h"
#include "config.hpp"
#include "about.hpp"
Expand Down Expand Up @@ -51,6 +56,22 @@ ui(std::make_unique<Ui::AboutDialog>())
ffmpeg_version(swresample_version, ui->lswr_ver);
ffmpeg_version(avutil_version, ui->lavu_ver);

#if TAGLIB_MAJOR_VERSION > 1
{
const auto tversion = TagLib::runtimeVersion();
ui->formLayout->addRow(
new QLabel("TagLib:", this),
new QLabel(
QString("%1.%2%3")
.arg(tversion.majorVersion())
.arg(tversion.minorVersion())
.arg(tversion.patchVersion() ? QString(".%1").arg(tversion.patchVersion()) : ""),
this
)
);
}
#endif

// Encoders
#define SUPPORT_FEATURE(feature, label) ui->label->setText(feature ? tr("Yes") : tr( "No"))
SUPPORT_FEATURE(config.has_feature.lame, support_lame);
Expand All @@ -63,7 +84,17 @@ ui(std::make_unique<Ui::AboutDialog>())
// Build info
ui->build_date->setText(BUILD_DATE);
#if defined(__GNUC__) && !defined(__clang__)
ui->compiler->setText(QString("GCC %1.%2").arg(__GNUC__).arg(__GNUC_MINOR__));
ui->compiler->setText(QString("GCC %1.%2"
#if __GNUC_PATCHLEVEL__ > 0
".%3"
#endif
)
.arg(__GNUC__)
.arg(__GNUC_MINOR__)
#if __GNUC_PATCHLEVEL__ > 0
.arg(__GNUC_PATCHLEVEL__)
#endif
);
#endif

#if defined(__clang__)
Expand Down

0 comments on commit 94886cf

Please sign in to comment.