From ee71f34db54722e5d4be44870ed9148536487a27 Mon Sep 17 00:00:00 2001 From: Mubashshir Date: Mon, 2 Oct 2023 09:42:29 +0600 Subject: Initial Commit Signed-off-by: Mubashshir --- data/com.jadupc.support.appdata.xml.in.in | 9 + data/com.jadupc.support.desktop.in.in | 8 + data/com.jadupc.support.gschema.xml.in.in | 5 + data/icons/meson.build | 13 ++ data/meson.build | 83 ++++++++ data/support.gresource.xml | 6 + data/ui/meson.build | 3 + data/ui/window.ui | 324 ++++++++++++++++++++++++++++++ po/LINGUAS | 0 po/POTFILES.in | 1 + po/meson.build | 15 ++ 11 files changed, 467 insertions(+) create mode 100644 data/com.jadupc.support.appdata.xml.in.in create mode 100644 data/com.jadupc.support.desktop.in.in create mode 100644 data/com.jadupc.support.gschema.xml.in.in create mode 100644 data/icons/meson.build create mode 100644 data/meson.build create mode 100644 data/support.gresource.xml create mode 100644 data/ui/meson.build create mode 100644 data/ui/window.ui create mode 100644 po/LINGUAS create mode 100644 po/POTFILES.in create mode 100644 po/meson.build diff --git a/data/com.jadupc.support.appdata.xml.in.in b/data/com.jadupc.support.appdata.xml.in.in new file mode 100644 index 0000000..bafc901 --- /dev/null +++ b/data/com.jadupc.support.appdata.xml.in.in @@ -0,0 +1,9 @@ + + + @APPLICATION_ID@.desktop + CC0-1.0 + @LICENSE@ + +

@PROJECT_INFO@

+
+
diff --git a/data/com.jadupc.support.desktop.in.in b/data/com.jadupc.support.desktop.in.in new file mode 100644 index 0000000..1bfad53 --- /dev/null +++ b/data/com.jadupc.support.desktop.in.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=@DESKTOP_NAME@ +Exec=@EXEC@ +Icon=@APPLICATION_ID@ +Terminal=false +Type=Application +Categories=GTK; +StartupNotify=true diff --git a/data/com.jadupc.support.gschema.xml.in.in b/data/com.jadupc.support.gschema.xml.in.in new file mode 100644 index 0000000..19f799b --- /dev/null +++ b/data/com.jadupc.support.gschema.xml.in.in @@ -0,0 +1,5 @@ + + + + + diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 0000000..9d44022 --- /dev/null +++ b/data/icons/meson.build @@ -0,0 +1,13 @@ +application_id = 'com.jadupc.support' + +scalable_dir = join_paths('hicolor', 'scalable', 'apps') +install_data( + join_paths(scalable_dir, ('@0@.svg').format(application_id)), + install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir) +) + +symbolic_dir = join_paths('hicolor', 'symbolic', 'apps') +install_data( + join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)), + install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir) +) diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..65ddc4b --- /dev/null +++ b/data/meson.build @@ -0,0 +1,83 @@ +data_config = configuration_data({ + 'PROJECT_NAME': project_name, + 'APPLICATION_ID': application_id, + 'EXEC': application_name, + 'APPLICATION_PATH': application_path, + 'LICENSE': ', '.join(meson.project_license()), + 'PROJECT_INFO': description, + 'DESKTOP_NAME': desktop_name, +}) + +i18n_data += configure_file( + input: '@0@.desktop.in.in'.format(application_id), + output: '@BASENAME@', + configuration: data_config, +) + +desktop_file = i18n.merge_file( + input: i18n_data[-1], + output: '@BASENAME@', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +desktop_utils = find_program('desktop-file-validate', required: false) +if desktop_utils.found() + test('Validate desktop file', desktop_utils, + args: [desktop_file] + ) +endif + +i18n_data += configure_file( + input: '@0@.appdata.xml.in.in'.format(application_id), + output: '@BASENAME@', + configuration: data_config, +) + +appstream_file = i18n.merge_file( + input: i18n_data[-1], + output: '@BASENAME@', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'appdata') +) + +appstream_util = find_program('appstream-util', required: false) +if appstream_util.found() + test('Validate appstream file', appstream_util, + args: ['validate', appstream_file] + ) +endif + +i18n_data += configure_file( + input: '@0@.gschema.xml.in.in'.format(application_id), + output: '@BASENAME@', + configuration: data_config, +) + +gscheme_file = i18n.merge_file( + input: i18n_data[-1], + output: '@BASENAME@', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') +) + +compile_schemas = find_program('glib-compile-schemas', required: false) +if compile_schemas.found() + test('Validate schema file', compile_schemas, + args: ['--strict', '--dry-run', meson.current_source_dir()] + ) +endif + +subdir('icons') +subdir('ui') + +resources = gnome.compile_resources('@0@-resources'.format(project_name), + '@0@.gresource.xml'.format(project_name), + source_dir: meson.current_source_dir(), + c_name: project_name, + dependencies: ui_defs +) diff --git a/data/support.gresource.xml b/data/support.gresource.xml new file mode 100644 index 0000000..8875d59 --- /dev/null +++ b/data/support.gresource.xml @@ -0,0 +1,6 @@ + + + + ui/window.ui + + diff --git a/data/ui/meson.build b/data/ui/meson.build new file mode 100644 index 0000000..b4c5fec --- /dev/null +++ b/data/ui/meson.build @@ -0,0 +1,3 @@ +ui_defs = files( + 'window.ui' +) diff --git a/data/ui/window.ui b/data/ui/window.ui new file mode 100644 index 0000000..14f9138 --- /dev/null +++ b/data/ui/window.ui @@ -0,0 +1,324 @@ + + + + + + + 100 + 1 + 10 + + + diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..657ea12 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +@SOURCES@ diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..cf61bee --- /dev/null +++ b/po/meson.build @@ -0,0 +1,15 @@ +i18n.gettext(project_name, preset: 'glib') + +i18n_sources = [] + +foreach file : srcs + ui_defs + i18n_data + i18n_sources += '@0@'.format(file) +endforeach + +potfiles = configure_file( + input: 'POTFILES.in', + output: '@BASENAME@', + configuration: configuration_data({ + 'SOURCES': '\n'.join(i18n_sources) + }), +) -- cgit v1.2.3