Skip to content

Build: sim/help/img.qrc not regenerated when a help image is added or renamed #1712

Description

@Wiljea

The pattern rule that generates the simulator image resource — sim/%.qrc: $(MIQ_MAKEDEPS) (Makefile:544) — builds its <file> list with $(wildcard $(QRC_EXT_$*:%=$*/%)), i.e. it enumerates help/img/* at generation time, but the image files are not prerequisites of the target. So once sim/help/img.qrc exists, adding or renaming a file under help/img/ doesn't make it out-of-date: make sim leaves the .qrc untouched and the new image is never embedded in the Qt resource (the figure then only resolves via the persistent data-dir copy, not the built-in resource).
Repro:

# add a new image, or rename one
mv "help/img/Foo Bar.bmp" help/img/FooBar.bmp     # or: touch help/img/Foo.bmp
make NAME=db48x sim
# => sim/help/img.qrc is unchanged; the new image is absent from the compiled resource

Found while fixing the Hall Effect figure (Hall Effect VH.bmpHallEffectVH.bmp): the renamed BMP wasn't embedded until img.qrc was force-regenerated (rm -f sim/help/img.qrc).
Surfaced via Equation Library figures, but the issue is general to all embedded help images.
Suggestion: add the wildcard image list as a prerequisite of sim/%.qrc (at least for the help/img case) so the resource is rebuilt when its inputs change.

Written by @Wiljea with the help of Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions