diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dad2ce..34ecf96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,10 @@ if (USE_QTEXTCODEC) target_link_libraries(${EXE_NAME} PRIVATE Qt6::Core5Compat) endif() +target_compile_definitions(${EXE_NAME} PRIVATE + PMUSIC_VERSION_STRING="${CMAKE_PROJECT_VERSION}" +) + # Install settings if (WIN32) set_target_properties(${EXE_NAME} PROPERTIES diff --git a/mainwindow.cpp b/mainwindow.cpp index 62b2e49..f8437a5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -785,7 +785,7 @@ void MainWindow::on_actionHelp_triggered() infoBox.setWindowTitle(tr("About")); infoBox.setStandardButtons(QMessageBox::Ok); infoBox.setText( - tr("Pineapple Music") % + QString("%1 %2").arg(tr("Pineapple Music")).arg(PMUSIC_VERSION_STRING) % "\n\n" % tr("Based on the following free software libraries:") % "\n\n" % @@ -806,7 +806,7 @@ void MainWindow::on_actionHelp_triggered() "\n" "[Source Code](https://github.com/BLumia/pineapple-music)\n" "\n" - "Copyright © 2025 [BLumia](https://github.com/BLumia/)" + "Copyright © 2026 [BLumia](https://github.com/BLumia/)" ); infoBox.setTextFormat(Qt::MarkdownText); infoBox.exec();