From 68bc2136444f4b940a142c9a650a69c15d496c02 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 22 Jun 2023 15:07:50 +0200 Subject: [PATCH] Move app logo to main executable Moves more branding information out of the plugins. Change-Id: I71575f268dd8f2860f4da56101b0e3d9442df367 Reviewed-by: Reviewed-by: Alessandro Portale --- cmake/QtCreatorIDEBranding.cmake | 2 +- src/app/CMakeLists.txt | 16 ++++++++++++++++ src/app/app.qbs | 1 + .../core_logo.qrc => app/app_logo.qrc} | 0 .../app_logo.qrc.cmakein} | 0 .../images/logo/128/QtProject-qtcreator.png | Bin .../images/logo/16/QtProject-qtcreator.png | Bin .../images/logo/24/QtProject-qtcreator.png | Bin .../images/logo/256/QtProject-qtcreator.png | Bin .../images/logo/32/QtProject-qtcreator.png | Bin .../images/logo/48/QtProject-qtcreator.png | Bin .../images/logo/512/QtProject-qtcreator.png | Bin .../images/logo/64/QtProject-qtcreator.png | Bin .../coreplugin => app}/images/logo/logo.qbs | 0 src/plugins/coreplugin/CMakeLists.txt | 16 ---------------- src/plugins/coreplugin/coreplugin.qbs | 1 - src/plugins/plugins.qbs | 1 - src/src.qbs | 1 + 18 files changed, 19 insertions(+), 19 deletions(-) rename src/{plugins/coreplugin/core_logo.qrc => app/app_logo.qrc} (100%) rename src/{plugins/coreplugin/core_logo.qrc.cmakein => app/app_logo.qrc.cmakein} (100%) rename src/{plugins/coreplugin => app}/images/logo/128/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/16/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/24/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/256/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/32/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/48/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/512/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/64/QtProject-qtcreator.png (100%) rename src/{plugins/coreplugin => app}/images/logo/logo.qbs (100%) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 171b65ded2b..e5ef7a4b73d 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -16,6 +16,6 @@ set(IDE_DOC_FILE_ONLINE "qtcreator/qtcreator-online.qdocconf") # Absolute, or relative to /src/app # Should contain qtcreator.ico, qtcreator.xcassets set(IDE_ICON_PATH "") -# Absolute, or relative to /src/plugins/coreplugin +# Absolute, or relative to /src/app # Should contain images/logo/(16|24|32|48|64|128|256|512)/QtProject-qtcreator.png set(IDE_LOGO_PATH "") diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 2d39c219f99..8e19bacc680 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -4,11 +4,17 @@ if(NOT IS_ABSOLUTE "${IDE_ICON_PATH}") set(IDE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_ICON_PATH}") endif() +if (NOT IS_ABSOLUTE ${IDE_LOGO_PATH}) + set(IDE_LOGO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_LOGO_PATH}") +endif() +configure_file(app_logo.qrc.cmakein app_logo_cmake.qrc) + add_qtc_executable(qtcreator DEFINES IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\" DEPENDS Aggregation ExtensionSystem Qt::Core Qt::Widgets Utils shared_qtsingleapplication app_version SOURCES main.cpp + ${CMAKE_CURRENT_BINARY_DIR}/app_logo_cmake.qrc ../tools/qtcreatorcrashhandler/crashhandlersetup.cpp ../tools/qtcreatorcrashhandler/crashhandlersetup.h PROPERTIES WIN32_EXECUTABLE ON @@ -145,3 +151,13 @@ if(BUILD_WITH_CRASHPAD) DESTINATION "${IDE_LIBEXEC_PATH}" ) endif() + +if ((NOT WIN32) AND (NOT APPLE)) + # install logo + foreach(size 16 24 32 48 64 128 256 512) + install( + FILES ${IDE_LOGO_PATH}/images/logo/${size}/QtProject-qtcreator.png + DESTINATION share/icons/hicolor/${size}x${size}/apps + ) + endforeach() +endif() diff --git a/src/app/app.qbs b/src/app/app.qbs index a0b30ae2ae4..8bce23f6424 100644 --- a/src/app/app.qbs +++ b/src/app/app.qbs @@ -52,6 +52,7 @@ QtcProduct { files: [ "app-Info.plist", + "app_logo.qrc", "main.cpp", "qtcreator.xcassets", "../shared/qtsingleapplication/qtsingleapplication.h", diff --git a/src/plugins/coreplugin/core_logo.qrc b/src/app/app_logo.qrc similarity index 100% rename from src/plugins/coreplugin/core_logo.qrc rename to src/app/app_logo.qrc diff --git a/src/plugins/coreplugin/core_logo.qrc.cmakein b/src/app/app_logo.qrc.cmakein similarity index 100% rename from src/plugins/coreplugin/core_logo.qrc.cmakein rename to src/app/app_logo.qrc.cmakein diff --git a/src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.png b/src/app/images/logo/128/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/128/QtProject-qtcreator.png rename to src/app/images/logo/128/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.png b/src/app/images/logo/16/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/16/QtProject-qtcreator.png rename to src/app/images/logo/16/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.png b/src/app/images/logo/24/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/24/QtProject-qtcreator.png rename to src/app/images/logo/24/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.png b/src/app/images/logo/256/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/256/QtProject-qtcreator.png rename to src/app/images/logo/256/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.png b/src/app/images/logo/32/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/32/QtProject-qtcreator.png rename to src/app/images/logo/32/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.png b/src/app/images/logo/48/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/48/QtProject-qtcreator.png rename to src/app/images/logo/48/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.png b/src/app/images/logo/512/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/512/QtProject-qtcreator.png rename to src/app/images/logo/512/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.png b/src/app/images/logo/64/QtProject-qtcreator.png similarity index 100% rename from src/plugins/coreplugin/images/logo/64/QtProject-qtcreator.png rename to src/app/images/logo/64/QtProject-qtcreator.png diff --git a/src/plugins/coreplugin/images/logo/logo.qbs b/src/app/images/logo/logo.qbs similarity index 100% rename from src/plugins/coreplugin/images/logo/logo.qbs rename to src/app/images/logo/logo.qbs diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index 36c13206eed..a37b2f216ca 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -1,13 +1,7 @@ -if (NOT IS_ABSOLUTE ${IDE_LOGO_PATH}) - set(IDE_LOGO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${IDE_LOGO_PATH}") -endif() -configure_file(core_logo.qrc.cmakein core_logo_cmake.qrc) - add_qtc_plugin(Core DEPENDS Qt::PrintSupport Qt::Qml Qt::Sql Qt::Gui Qt::GuiPrivate PUBLIC_DEPENDS Aggregation ExtensionSystem Utils SOURCES - ${CMAKE_CURRENT_BINARY_DIR}/core_logo_cmake.qrc actionmanager/actioncontainer.cpp actionmanager/actioncontainer.h actionmanager/actioncontainer_p.h @@ -343,16 +337,6 @@ extend_qtc_plugin(Core DEFINES ENABLE_CRASHPAD ) -if ((NOT WIN32) AND (NOT APPLE)) - # install logo - foreach(size 16 24 32 48 64 128 256 512) - install( - FILES ${IDE_LOGO_PATH}/images/logo/${size}/QtProject-qtcreator.png - DESTINATION share/icons/hicolor/${size}x${size}/apps - ) - endforeach() -endif() - set(FONTS_BASE "${QtCreator_SOURCE_DIR}/src/share/3rdparty/studiofonts/") qt_add_resources(Core CoreWelcomeScreenFonts_rcc diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index 61d1b21a90c..1cd3fcb7b31 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -37,7 +37,6 @@ Project { "basefilewizardfactory.h", "core.qrc", "core_global.h", - "core_logo.qrc", "coreconstants.h", "coreicons.cpp", "coreicons.h", diff --git a/src/plugins/plugins.qbs b/src/plugins/plugins.qbs index 6deee972959..9f4ab0a2fad 100644 --- a/src/plugins/plugins.qbs +++ b/src/plugins/plugins.qbs @@ -26,7 +26,6 @@ Project { "conan/conan.qbs", "copilot/copilot.qbs", "coreplugin/coreplugin.qbs", - "coreplugin/images/logo/logo.qbs", "cpaster/cpaster.qbs", "cpaster/frontend/frontend.qbs", "cppcheck/cppcheck.qbs", diff --git a/src/src.qbs b/src/src.qbs index b59d8843236..3d39fb7fcd6 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -8,6 +8,7 @@ Project { references: [ "app/app.qbs", "app/app_version_header.qbs", + "app/images/logo/logo.qbs", "libs/libs.qbs", "plugins/plugins.qbs", "tools/tools.qbs",