Gimp/icons/Color/meson.build
Jehan 407f54f33e icons: more factorization of icon installation/build code.
Though the Color and Symbolic icon themes will have a different build
process and naming scheme for their icons, the base list is meant to be
the same by maintenance principle. So I am moving out the lists to the
icons/ directory's meson file.

Bumping meson requirement to 0.53.0 because I need to ability to use a
variable as dictionary key (not only string literals), which appeared in
this version. Meson 0.53.0 was released 2020-01-07 and seem to be used
in any stable distribution released since 2020. In any case, it seems
widespread enough to bump it now for our dev branch.
2022-02-01 13:07:25 +01:00

89 lines
2.4 KiB
Meson

if have_vector_icons
# Only process the 64x64 icons for the 2 resource icons.
subdir('64')
else
foreach size, source_icons : build_icons
subdir(size)
endforeach
endif
install_data('index.theme',
install_dir: gimpiconsdir / theme,
)
foreach install : install_icons
icons = []
inputs = install['files']
outdir = install['outdir']
indir = install['indir']
suffix = install['suffix']
py_cmd = 'print(",".join(["@0@/" + line.strip() + "@1@" for line in open("@2@") if line.strip() != "" and line.strip()[0] != "#"]))'
dup_icons = []
foreach input : inputs
input = '../icon-lists/@0@.list'.format(input)
cmd = run_command('python3', '-c',
py_cmd.format(indir, suffix, input),
check: true)
dup_icons += cmd.stdout().strip().split(',')
endforeach
foreach icon : dup_icons
if not icons.contains(icon)
# remove duplicates.
icons += [icon]
endif
endforeach
install_data(icons, install_dir: gimpiconsdir / theme / outdir / 'apps')
endforeach
icons_core = [ '64/dialog-question.png', ]
icons_imgs = [ '64/gimp-wilber-eek.png', ]
resourcename = 'gimp-core-pixbufs'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
foreach file : icons_core
xml_content+=' <file preprocess="to-pixdata">'+ file +'</file>\n'
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
xml_file = configure_file(
output: resourcename + '.gresource.xml',
command: [ 'echo', xml_content ],
capture: true,
)
icons_core_sources = gnome.compile_resources(
resourcename,
xml_file,
c_name: resourcename.underscorify(),
dependencies: icon_dialog_question,
source_dir: [meson.current_build_dir()]
)
resourcename = 'gimp-icon-pixbufs'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
foreach file : icons_imgs
xml_content+=' <file preprocess="to-pixdata">'+ file +'</file>\n'
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
xml_file = configure_file(
output: resourcename + '.gresource.xml',
command: [ 'echo', xml_content ],
capture: true,
)
icons_imgs_sources = gnome.compile_resources(
resourcename,
xml_file,
c_name: resourcename.underscorify(),
dependencies: icon_wilber_eek,
source_dir: [meson.current_build_dir()]
)