Debugger: Generate qrc files at build time

Change-Id: I9d837e70d4b78809e48d3c8872a1ee2ec67e6508
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2025-04-14 16:17:49 +02:00
parent 1f6fb901fc
commit e724e3e316
4 changed files with 22 additions and 102 deletions

View File

@@ -28,7 +28,6 @@ add_qtc_plugin(Debugger
dap/gdbdapengine.cpp dap/gdbdapengine.h
dap/lldbdapengine.cpp dap/lldbdapengine.h
dap/pydapengine.cpp dap/pydapengine.h
debugger.qrc
debugger_global.h
debuggeractions.cpp debuggeractions.h
debuggerconstants.h
@@ -106,9 +105,16 @@ extend_qtc_plugin(Debugger
DEFINES UNICODE _UNICODE
)
extend_qtc_plugin(Debugger
CONDITION WITH_TESTS
SOURCES
debuggerunittests.qrc
unit-tests/simple/main.cpp
file(GLOB_RECURSE images RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} images/*)
qtc_add_resources(Debugger "images"
PREFIX "/debugger"
BASE "."
FILES ${images}
)
file(GLOB_RECURSE test_cases RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} unit-tests/*)
qtc_add_resources(Debugger "testcases"
CONDITION WITH_TESTS
PREFIX "/debugger"
BASE "."
FILES ${test_cases}
)

View File

@@ -23,13 +23,15 @@ QtcPlugin {
cpp.includePaths: base.concat([project.sharedSourcesDir + "/registryaccess"])
cpp.enableExceptions: true
Qt.core.resourcePrefix: "debugger"
Qt.core.resourceSourceBase: sourceDirectory
Group {
name: "General"
files: [
"breakhandler.cpp", "breakhandler.h",
"breakpoint.cpp", "breakpoint.h",
"commonoptionspage.cpp", "commonoptionspage.h",
"debugger.qrc",
"debugger_global.h", "debuggertr.h",
"debuggeractions.cpp", "debuggeractions.h",
"debuggerconstants.h",
@@ -179,18 +181,6 @@ QtcPlugin {
]
}
Group {
name: "Images"
prefix: "images/"
files: ["*.png"]
}
Group {
name: "Images/qml"
prefix: "images/qml/"
files: ["*.png"]
}
Group {
name: "RegistryAccess"
condition: qbs.targetOS.contains("windows")
@@ -229,19 +219,19 @@ QtcPlugin {
]
}
QtcTestFiles {
files: [
"debuggerunittests.qrc",
]
}
Group {
name: "Unit test resources"
prefix: "unit-tests/"
fileTags: []
fileTags: qtc.withPluginTests ? ["qt.core.resource_data"] : []
files: ["**/*"]
}
Group {
name: "images"
files: "images/*.png"
fileTags: "qt.core.resource_data"
}
Export {
Depends { name: "CPlusPlus" }
}

View File

@@ -1,70 +0,0 @@
<RCC>
<qresource prefix="/debugger">
<file>images/settingscategory_analyzer.png</file>
<file>images/settingscategory_analyzer@2x.png</file>
<file>images/settingscategory_debugger.png</file>
<file>images/settingscategory_debugger@2x.png</file>
<file>images/debugger_breakpoints.png</file>
<file>images/debugger_continue.png</file>
<file>images/debugger_continue@2x.png</file>
<file>images/debugger_continue_1_mask.png</file>
<file>images/debugger_continue_1_mask@2x.png</file>
<file>images/debugger_continue_2_mask.png</file>
<file>images/debugger_continue_2_mask@2x.png</file>
<file>images/debugger_empty_14.png</file>
<file>images/debugger_interrupt.png</file>
<file>images/debugger_interrupt@2x.png</file>
<file>images/debugger_interrupt_mask.png</file>
<file>images/debugger_interrupt_mask@2x.png</file>
<file>images/debugger_stop.png</file>
<file>images/debugger_stop@2x.png</file>
<file>images/debugger_stop_mask.png</file>
<file>images/debugger_stop_mask@2x.png</file>
<file>images/debugger_reversemode.png</file>
<file>images/debugger_reversemode@2x.png</file>
<file>images/debugger_reversemode_background.png</file>
<file>images/debugger_reversemode_background@2x.png</file>
<file>images/debugger_singleinstructionmode.png</file>
<file>images/debugger_singleinstructionmode@2x.png</file>
<file>images/debugger_stepinto_small.png</file>
<file>images/debugger_stepinto_small@2x.png</file>
<file>images/debugger_stepout_small.png</file>
<file>images/debugger_stepout_small@2x.png</file>
<file>images/debugger_stepover_small.png</file>
<file>images/debugger_stepover_small@2x.png</file>
<file>images/breakpoint_disabled.png</file>
<file>images/breakpoint_disabled@2x.png</file>
<file>images/breakpoint_pending_overlay.png</file>
<file>images/breakpoint_pending_overlay@2x.png</file>
<file>images/location.png</file>
<file>images/location@2x.png</file>
<file>images/location_background.png</file>
<file>images/location_background@2x.png</file>
<file>images/mode_debug.png</file>
<file>images/mode_debug@2x.png</file>
<file>images/mode_debug_mask.png</file>
<file>images/mode_debug_mask@2x.png</file>
<file>images/debugger_restart_small.png</file>
<file>images/debugger_restart_small@2x.png</file>
<file>images/recordfill.png</file>
<file>images/recordfill@2x.png</file>
<file>images/recordoutline.png</file>
<file>images/recordoutline@2x.png</file>
<file>images/tracepointoverlay.png</file>
<file>images/tracepointoverlay@2x.png</file>
<file>images/macos_touchbar_debug.png</file>
<file>images/macos_touchbar_debug@2x.png</file>
<file>images/macos_touchbar_debug_continue.png</file>
<file>images/macos_touchbar_debug_continue@2x.png</file>
<file>images/macos_touchbar_debug_interrupt.png</file>
<file>images/macos_touchbar_debug_interrupt@2x.png</file>
<file>images/macos_touchbar_debug_exit.png</file>
<file>images/macos_touchbar_debug_exit@2x.png</file>
<file>images/macos_touchbar_debug_step_into.png</file>
<file>images/macos_touchbar_debug_step_into@2x.png</file>
<file>images/macos_touchbar_debug_step_out.png</file>
<file>images/macos_touchbar_debug_step_out@2x.png</file>
<file>images/macos_touchbar_debug_step_over.png</file>
<file>images/macos_touchbar_debug_step_over@2x.png</file>
</qresource>
</RCC>

View File

@@ -1,6 +0,0 @@
<RCC>
<qresource prefix="/debugger">
<file>unit-tests/simple/main.cpp</file>
<file>unit-tests/simple/simple.pro</file>
</qresource>
</RCC>