[vlc-commits] [Git][videolan/vlc][master] qt: fix make clean deletes shaders.qrc

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Sep 21 02:56:01 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5751b4a4 by Yosef Ahmed at 2026-09-21T02:44:46+00:00
qt: fix make clean deletes shaders.qrc

- - - - -


3 changed files:

- modules/gui/qt/Makefile.am
- modules/gui/qt/shaders/meson.build
- − modules/gui/qt/shaders/shaders.qrc


Changes:

=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -1518,11 +1518,13 @@ $(libqt_plugin_la_SHADER_FRAG:.frag=.frag.qsb):
 $(libqt_plugin_la_SHADER_VERT:.vert=.vert.qsb):
 	$(qsb_verbose)PATH="$(QSB_EXTRA_PATH)$$PATH" $(QSB) $(QSB_PARAMS) $(QSB_PARAMS_VERBOSE) -o $@ $(srcdir)/$(@:.qsb=)
 
-shaders/shaders.cpp: $(srcdir)/shaders/shaders.qrc $(libqt_plugin_la_SHADER_FRAG:.frag=.frag.qsb) $(libqt_plugin_la_SHADER_VERT:.vert=.vert.qsb)
-	$(AM_V_GEN) cp -f $< $(builddir)/shaders/shaders.qrc || true
-	$(AM_V_GEN) $(RCC) $(RCC_EXTRA_PARAMS) --name shaders -o $@ $(builddir)/shaders/shaders.qrc
+shaders/shaders.qrc: $(libqt_plugin_la_SHADER) Makefile
+	$(AM_V_GEN)$(PYTHON3) $(srcdir)/scripts/genqrc.py -o $@ --prefix shaders --sources $(libqt_plugin_la_SHADER_FRAG:.frag=.frag.qsb) $(libqt_plugin_la_SHADER_VERT:.vert=.vert.qsb)
 
-libqt_plugin_la_SOURCES += shaders/shaders.qrc $(libqt_plugin_la_SHADER)
+shaders/shaders.cpp: shaders/shaders.qrc $(libqt_plugin_la_SHADER_FRAG:.frag=.frag.qsb) $(libqt_plugin_la_SHADER_VERT:.vert=.vert.qsb)
+	$(AM_V_GEN) $(RCC) $(RCC_EXTRA_PARAMS) --name shaders -o $@ $<
+
+libqt_plugin_la_SOURCES += $(libqt_plugin_la_SHADER)
 CLEANFILES += shaders/shaders.qrc
 
 lib_qt_plugin_la_QRC = assets.qrc


=====================================
modules/gui/qt/shaders/meson.build
=====================================
@@ -1,7 +1,5 @@
 # Shader compilation and resource generation
 
-qt6 = import('qt6')
-
 env = environment()
 # For qsb to locate spirv-opt:
 env.append('PATH', contrib_dir + '/bin')
@@ -41,8 +39,10 @@ elif host_system == 'darwin'
 endif
 
 shader_targets = []
+shader_qsb = []
 foreach shader: shader_sources
     shader_target_name = shader + '.qsb'
+    shader_qsb += shader_target_name
 
     target = custom_target(shader_target_name,
       depend_files: ['Common.glsl'],
@@ -53,8 +53,17 @@ foreach shader: shader_sources
     shader_targets += [target]
 endforeach
 
-build_shaders = configure_file(input: 'shaders.qrc', output: 'shaders.qrc', copy: true)
+build_shaders = configure_file(
+    output: 'shaders.qrc',
+    command: [
+        find_program('python3'),
+        meson.current_source_dir() / '..' / 'scripts' / 'genqrc.py',
+        '-o', '@OUTPUT@',
+        '--prefix', 'shaders',
+        '--sources', shader_qsb,
+    ],
+)
 
 shaders_processed = qt6.preprocess(
         qresources: build_shaders,
-        dependencies: qt6_dep)
+        dependencies: qt6_dep)
\ No newline at end of file


=====================================
modules/gui/qt/shaders/shaders.qrc deleted
=====================================
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<RCC>
-    <qresource prefix="/shaders">
-        <file alias="FadingEdge.frag.qsb">FadingEdge.frag.qsb</file>
-        <file alias="FadingEdgeX.vert.qsb">FadingEdgeX.vert.qsb</file>
-        <file alias="FadingEdgeY.vert.qsb">FadingEdgeY.vert.qsb</file>
-        <file alias="Noise.frag.qsb">Noise.frag.qsb</file>
-        <file alias="RectFilter.frag.qsb">RectFilter.frag.qsb</file>
-        <file alias="SubTexture.vert.qsb">SubTexture.vert.qsb</file>
-        <file alias="SDFAARoundedTexture.frag.qsb">SDFAARoundedTexture.frag.qsb</file>
-        <file alias="SDFAARoundedTexture_cropsupport_bordersupport.frag.qsb">SDFAARoundedTexture_cropsupport_bordersupport.frag.qsb</file>
-        <file alias="DitheredTexture.frag.qsb">DitheredTexture.frag.qsb</file>
-        <file alias="FastBlend.frag.qsb">FastBlend.frag.qsb</file>
-        <file alias="FastBlend_additive.frag.qsb">FastBlend_additive.frag.qsb</file>
-        <file alias="FastBlend_multiply.frag.qsb">FastBlend_multiply.frag.qsb</file>
-        <file alias="FastBlend_screen.frag.qsb">FastBlend_screen.frag.qsb</file>
-        <file alias="RoundedRectangleShadow.frag.qsb">RoundedRectangleShadow.frag.qsb</file>
-        <file alias="RoundedRectangleShadow_hollow.frag.qsb">RoundedRectangleShadow_hollow.frag.qsb</file>
-        <file alias="VoronoiSnow.frag.qsb">VoronoiSnow.frag.qsb</file>
-        <file alias="DualKawaseBlur_upsample.frag.qsb">DualKawaseBlur_upsample.frag.qsb</file>
-        <file alias="DualKawaseBlur_downsample.frag.qsb">DualKawaseBlur_downsample.frag.qsb</file>
-        <file alias="DualKawaseBlur_upsample_postprocess.frag.qsb">DualKawaseBlur_upsample_postprocess.frag.qsb</file>
-    </qresource>
-</RCC>



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5751b4a48706db62f74f6c5fffcdc66ca7b9f3ea

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5751b4a48706db62f74f6c5fffcdc66ca7b9f3ea
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list