diff --git a/CMakeLists.txt b/CMakeLists.txt index ef6f4c04993..f0caf09b250 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ qtc_handle_sccache_support() option(WITH_TESTS "Build Tests" OFF) add_feature_info("Build tests" ${WITH_TESTS} "") option(WITH_DEBUG_CMAKE "Enabled CMake project debugging functionality (e.g. source file disk checking)" OFF) +option(SHOW_BUILD_DATE "Show build date in about dialog" OFF) # merge binary directories of sub projects into top level set(QTC_MERGE_BINARY_DIR ON) diff --git a/qtcreator.pro b/qtcreator.pro index d2e9a74728b..56669489192 100644 --- a/qtcreator.pro +++ b/qtcreator.pro @@ -98,16 +98,6 @@ else: PLATFORM = "unknown" BASENAME = $$(INSTALL_BASENAME) isEmpty(BASENAME): BASENAME = qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX) -linux { - appstream.files = share/metainfo/org.qt-project.qtcreator.appdata.xml - appstream.path = $$QTC_PREFIX/share/metainfo/ - - desktop.files = share/applications/org.qt-project.qtcreator.desktop - desktop.path = $$QTC_PREFIX/share/applications/ - - INSTALLS += appstream desktop -} - macx { APPBUNDLE = "$$OUT_PWD/bin/$${IDE_APP_TARGET}.app" BINDIST_SOURCE.release = "$$OUT_PWD/bin/$${IDE_APP_TARGET}.app" diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index b1e61d596ef..575c0aea8ca 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -1,11 +1,23 @@ add_subdirectory(qtcreator) if (NOT APPLE AND NOT WIN32) + set(DATE_ATTRIBUTE) + if(SHOW_BUILD_DATE) + string(TIMESTAMP timestamp "%Y-%m-%d") + set(DATE_ATTRIBUTE " date=\"${timestamp}\"") + endif() + configure_file(metainfo/org.qt-project.qtcreator.appdata.xml.cmakein metainfo/org.qt-project.qtcreator.appdata.xml) + install( DIRECTORY applications - metainfo DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} ) + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/metainfo/org.qt-project.qtcreator.appdata.xml + DESTINATION + ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/ + ) endif() diff --git a/share/metainfo/org.qt-project.qtcreator.appdata.xml b/share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein similarity index 73% rename from share/metainfo/org.qt-project.qtcreator.appdata.xml rename to share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein index 4706e69b228..b721029a0a5 100644 --- a/share/metainfo/org.qt-project.qtcreator.appdata.xml +++ b/share/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein @@ -26,4 +26,20 @@ https://www.qt.io/ide/ Qt + + + + https://doc.qt.io/qtcreator/images/qtcreator-breakdown.png + + + https://doc.qt.io/qtcreator/images/qtcreator-qt-quick-editors.png + + + + + +

Qt Creator v${IDE_VERSION_DISPLAY}

+
+
+
diff --git a/share/share.pro b/share/share.pro index 3fe6c8b32c1..757e0ed595e 100644 --- a/share/share.pro +++ b/share/share.pro @@ -1,6 +1,23 @@ TEMPLATE = subdirs SUBDIRS = qtcreator/static.pro +include(../qtcreator.pri) + +linux { + appdata = $$cat($$PWD/metainfo/org.qt-project.qtcreator.appdata.xml.cmakein, blob) + appdata = $$replace(appdata, \\$\\{IDE_VERSION_DISPLAY\\}, $$QTCREATOR_DISPLAY_VERSION) + appdata = $$replace(appdata, \\$\\{DATE_ATTRIBUTE\\}, "") + write_file($$OUT_PWD/metainfo/org.qt-project.qtcreator.appdata.xml, appdata) + + appstream.files = $$OUT_PWD/metainfo/org.qt-project.qtcreator.appdata.xml + appstream.path = $$QTC_PREFIX/share/metainfo/ + + desktop.files = share/applications/org.qt-project.qtcreator.desktop + desktop.path = $$QTC_PREFIX/share/applications/ + + INSTALLS += appstream desktop +} + defineTest(hasLupdate) { cmd = $$eval(QT_TOOL.lupdate.binary) isEmpty(cmd) { diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index 6b98b63bf9a..8c24055b61a 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -1,5 +1,3 @@ -option(SHOW_BUILD_DATE "Show build date in about dialog" OFF) - add_qtc_plugin(Core DEPENDS Qt5::PrintSupport Qt5::Qml Qt5::Sql Qt5::Gui Qt5::GuiPrivate PUBLIC_DEPENDS Aggregation ExtensionSystem Utils app_version