diff --git a/po/POTFILES.in b/po/POTFILES.in index 499d3a700..765dbb72d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -94,5 +94,6 @@ subprojects/extensions-tool/src/command-prefs.c subprojects/extensions-tool/src/command-reset.c subprojects/extensions-tool/src/command-uninstall.c subprojects/extensions-tool/src/main.c +subprojects/extensions-tool/src/templates/00-plain.desktop.in # Please do not remove this file from POTFILES.in. Run "git submodule init && git submodule update" to get it. subprojects/gvc/gvc-mixer-control.c diff --git a/subprojects/extensions-tool/meson.build b/subprojects/extensions-tool/meson.build index 0e95edd98..0832bf085 100644 --- a/subprojects/extensions-tool/meson.build +++ b/subprojects/extensions-tool/meson.build @@ -35,6 +35,8 @@ cc = meson.get_compiler('c') bash_completion = dependency('bash-completion', required: get_option('bash_completion')) +po_dir = meson.source_root() + '/po' + subdir('src') if bash_completion.found() diff --git a/subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml b/subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml index dce8d5c66..684358c13 100644 --- a/subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml +++ b/subprojects/extensions-tool/src/gnome-extensions-tool.gresource.xml @@ -1,6 +1,7 @@ + templates/00-plain.desktop templates/plain/extension.js templates/plain/stylesheet.css diff --git a/subprojects/extensions-tool/src/meson.build b/subprojects/extensions-tool/src/meson.build index 77d62b5e9..a855fef97 100644 --- a/subprojects/extensions-tool/src/meson.build +++ b/subprojects/extensions-tool/src/meson.build @@ -22,9 +22,12 @@ sources = [ 'main.c' ] +subdir('templates') + resources = gnome.compile_resources('resources', 'gnome-extensions-tool.gresource.xml', - source_dir: '.' + source_dir: ['.', meson.current_build_dir()], + dependencies: template_deps, ) executable('gnome-extensions', diff --git a/subprojects/extensions-tool/src/templates/00-plain.desktop.in b/subprojects/extensions-tool/src/templates/00-plain.desktop.in new file mode 100644 index 000000000..36ddf807c --- /dev/null +++ b/subprojects/extensions-tool/src/templates/00-plain.desktop.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Application +Name=Plain +Comment=An empty extension +Path=plain diff --git a/subprojects/extensions-tool/src/templates/meson.build b/subprojects/extensions-tool/src/templates/meson.build new file mode 100644 index 000000000..4f86ad4e2 --- /dev/null +++ b/subprojects/extensions-tool/src/templates/meson.build @@ -0,0 +1,12 @@ +template_metas = [ + '00-plain.desktop', +] +template_deps = [] +foreach template : template_metas + template_deps += i18n.merge_file(template, + input: template + '.in', + output: template, + po_dir: po_dir, + type: 'desktop', + ) +endforeach