Separate functionality from UI
Hi, I am an application developer. I would like to delete the exported/generated icons from my git repo and only have the source icon there. And generate/export required icons during build.
This would be very easy if 'App Icon Preview' was divided into two separate projects;
- app-icon-generator (command-line program + shared library)
- App Icon Preview (just the UI that requires
app-icon-generator
to generate actual app icons)
This way, I could add something like below in my project's data/meson.build
app_icon_generator = find_program('app-icon-generator')
icon_source = 'app_id.Source.svg'
hicolor_dir = get_option('datadir')/'icons/hicolor'
custom_target('regular_icon',
input: icon_source,
output: 'app_id.svg',
command: [app_icon_generator, '--type=regular', '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: hicolor_dir/'scalable/apps',
)
custom_target('symbolic_icon',
input: icon_source,
output: 'app_id-symbolic.svg',
command: [app_icon_generator, '--type=symbolic', '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: hicolor_dir/'symbolic/apps',
)
If this happens, it will make it more likely for a function like generate_app_icons(source: str, install: bool)
to be added to GNOME module of the meson build system which will make things even easier.
Edited by Mazhar Hussain