Skip to content

Commit

Permalink
Added icons and desktop file for distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
karurochari committed Dec 16, 2024
1 parent 2ba1262 commit 31d1304
Show file tree
Hide file tree
Showing 7 changed files with 313 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip install meson ninja
#python3 -m pip uninstall cmake
#python3 -m pip install cmake==3.30.5 # workaround https://github.com/mesonbuild/meson/issues/13888
- name: Configure and build
run: |
meson setup build/
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Is there a SAX implementation?

No, there is not.
Some features don't strictly require a DOM, but they don't really translate well in terms of a pull parsers.
Some features don't strictly require a DOM, but they don't really translate well in terms of a pull parser.
The memory peak usage would not be much better either for many reasonable templates, so there is no real incentive to implement this preprocessor based on a different backend for now.
Still, if you want to do so you are very welcome!
6 changes: 4 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ project(
default_options: ['cpp_std=c++20'],
)

pugixml_dep = dependency('pugixml', version : '>=1.14',required: false)
pugixml_dep = dependency('pugixml', version: '>=1.14', required: false)
if pugixml_dep.found() == false
pugixml_proj = subproject('pugixml')
pugixml_dep = pugixml_proj.get_variable('pugixml_dep')
endif
endif

vs_templ_lib = library(
'vs-templ-lib',
Expand Down Expand Up @@ -67,6 +67,8 @@ if get_option('tests')
subdir(['./test/'])
endif

subdir(['./metadata/'])

pconf = import('pkgconfig')
pconf.generate(
vs_templ_lib,
Expand Down
37 changes: 37 additions & 0 deletions metadata/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
metainfo_file = 'metainfo.xml'
ascli_exe = find_program('appstreamcli', required: false)
if ascli_exe.found()
test(
'validate metainfo file',
ascli_exe,
args: ['validate', '--no-net', '--pedantic', metainfo_file],
)
endif

ascli_exe = find_program('appstreamcli')
custom_target(
'gen-desktop-entry',
input: [metainfo_file],
output: ['com.karurochari.vs.templ.desktop'],
command: [ascli_exe, 'make-desktop-file', '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: join_paths(get_option('datadir'), 'applications'),
)

install_data(
sources: ['vs.templ.light.svg'],
rename: ['vs.templ.svg'],
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', 'scalable', 'apps'),
)

#i18n = import('i18n')

# NOTE: Remember to add the XML file to POTFILES.in!
#i18n.merge_file(
# input: metainfo_file,
# output: 'com.karurochari.vs.templ.metainfo.xml',
# type: 'xml',
# po_dir: join_paths(meson.project_source_root(), 'po'),
# install: true,
# install_dir: join_paths (get_option ('datadir'), 'metainfo')
#)
29 changes: 29 additions & 0 deletions metadata/metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="console-application">
<id>com.karurochari.vs.templ</id>

<name>vs.templ</name>
<summary>A simple static XML template builder</summary>

<metadata_license>CC-BY-SA-4.0</metadata_license>
<project_license>multiple, check docs</project_license>

<description>
<p>
A simple static XML template builde
</p>
</description>

<launchable type="desktop-id">com.karurochari.vs.templ.desktop</launchable>

<icon type="stock">vs.templ</icon>

<categories>
<category>Utility</category>
<category>Construction</category>
</categories>

<provides>
<binary>vs.templ</binary>
</provides>
</component>
121 changes: 121 additions & 0 deletions metadata/vs.templ.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 31d1304

Please sign in to comment.