mirror of
https://github.com/ankitects/anki.git
synced 2025-11-18 10:37:12 -05:00
Means URLs like :/icons/foo.jpg should become icons:foo.jpg This is part of the prep work for a PyQt6 update. PyQt6 has dropped pyrcc, so we can longer generate the icons_qrc.py file we did previously. Qt Designer expects us to use the resource system, so we continue to generate the icons.qrc file to make editing the UI files easier. But at runtime, we no longer use that file.
27 lines
665 B
Text
27 lines
665 B
Text
load("@rules_python//python:defs.bzl", "py_binary")
|
|
|
|
py_binary(
|
|
name = "build_qrc",
|
|
srcs = ["build_qrc.py"],
|
|
legacy_create_init = False,
|
|
)
|
|
|
|
genrule(
|
|
name = "icons_qrc",
|
|
srcs = ["//qt/aqt/data/qt/icons"],
|
|
outs = ["icons.qrc"],
|
|
cmd = "$(location build_qrc) $(location icons.qrc) $(SRCS)",
|
|
tools = ["build_qrc"],
|
|
visibility = ["//qt/aqt:__pkg__"],
|
|
)
|
|
|
|
filegroup(
|
|
name = "qt",
|
|
srcs = [
|
|
"//qt/aqt/data/qt/icons",
|
|
# not needed at runtime, but including it here ensures
|
|
# it's up to date when a dev opens Qt Designer after a ./run
|
|
":icons_qrc",
|
|
],
|
|
visibility = ["//qt:__subpackages__"],
|
|
)
|