feat: gnome project structure and accessory files

This commit is contained in:
Gabriele Musco 2023-06-18 11:34:04 +02:00
commit 9e90c1b253
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE
21 changed files with 460 additions and 11 deletions

10
data/icons/meson.build Normal file
View file

@ -0,0 +1,10 @@
install_data(
'@0@.svg'.format(application_id),
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps'
)
install_data(
'@0@-symbolic.svg'.format(base_id),
install_dir: iconsdir / 'hicolor' / 'symbolic' / 'apps',
rename: '@0@-symbolic.svg'.format(application_id)
)

View file

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="a" gradientTransform="matrix(1.458807 0 0 1.906515 -415.501769 -150.163364)" gradientUnits="userSpaceOnUse" x1="339.272705" x2="339.272705" y1="83.120338" y2="109.264557">
<stop offset="0" stop-color="#c0bfbc"/>
<stop offset="1" stop-color="#241f31"/>
</linearGradient>
<linearGradient id="b" gradientTransform="matrix(1.589925 0 0 1.907133 -458.59952 -141.699123)" gradientUnits="userSpaceOnUse" x1="339.272705" x2="339.272705" y1="91.225945" y2="113.737442">
<stop offset="0" stop-color="#9a9996"/>
<stop offset="1" stop-color="#3d3846"/>
</linearGradient>
<linearGradient id="c" gradientTransform="matrix(1.589925 0 0 1.745081 -458.59952 -123.465599)" gradientUnits="userSpaceOnUse" x1="293.458923" x2="363.924652" y1="109.130287" y2="109.130287">
<stop offset="0" stop-color="#241f31"/>
<stop offset="0.0479414" stop-color="#77767b"/>
<stop offset="0.0937468" stop-color="#5e5c64"/>
<stop offset="0.8943" stop-color="#5e5c64"/>
<stop offset="0.945474" stop-color="#77767b"/>
<stop offset="1" stop-color="#241f31"/>
</linearGradient>
<linearGradient id="d" gradientTransform="matrix(1.589925 0 0 1.674808 -308.505085 -97.176639)" gradientUnits="userSpaceOnUse" x1="188.163925" x2="280.755829" y1="107.404694" y2="107.404694">
<stop offset="0" stop-color="#3d3846"/>
<stop offset="0.507021" stop-color="#241f31"/>
<stop offset="1" stop-color="#3d3846"/>
</linearGradient>
<linearGradient id="e" gradientUnits="userSpaceOnUse" x1="18.78087990973" x2="106.95173311429" y1="67.63639825207" y2="102.31274676078">
<stop offset="0" stop-color="#33d17a"/>
<stop offset="1" stop-color="#a347ba"/>
</linearGradient>
<clipPath id="f">
<rect height="128" width="128"/>
</clipPath>
<clipPath id="g">
<rect height="128" width="128"/>
</clipPath>
<filter id="h" height="100%" width="100%" x="0%" y="0%">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
</filter>
<mask id="i">
<g clip-path="url(#g)" filter="url(#h)">
<g clip-path="url(#f)">
<path d="m 22.511719 25.277344 c -2.308594 0 -3.390625 5.304687 -4.1875 12.089844 c 7.90625 1.042968 26.65625 10.417968 45.675781 10.425781 c 19.019531 -0.007813 37.769531 -9.382813 45.675781 -10.425781 c -0.796875 -6.785157 -1.882812 -12.089844 -4.1875 -12.089844 c -6.164062 0 -23.695312 9.292968 -41.488281 9.296875 c -17.792969 -0.003907 -35.328125 -9.296875 -41.488281 -9.296875 z m 0 0" fill="url(#a)"/>
<path d="m 18.78125 33.796875 c -4.960938 0 -6.429688 24.6875 -8.800781 36.667969 l 54.019531 -4.039063 l 54.019531 4.039063 c -2.371093 -11.980469 -3.839843 -36.667969 -8.804687 -36.667969 c -6.714844 0 -25.824219 9.296875 -45.214844 9.300781 c -19.390625 -0.003906 -38.5 -9.300781 -45.21875 -9.300781 z m 0 0" fill="url(#b)"/>
<path d="m 47.179688 50.792969 c -18.644532 0.695312 -39.179688 6.8125 -39.179688 22.628906 v 7.484375 c 0 15.816406 20.179688 28.859375 38.824219 29.550781 c 7.980469 0 8.191406 -12.511719 17.175781 -12.511719 c 8.988281 0 9.167969 12.511719 17.148438 12.511719 c 18.648437 -0.691406 38.851562 -13.734375 38.851562 -29.550781 v -7.484375 c 0 -15.816406 -20.535156 -21.933594 -39.179688 -22.628906 z m 0 0" fill="url(#c)"/>
<path d="m 47.179688 56.332031 c -18.644532 0.695313 -39.179688 6.816407 -39.179688 22.628907 v 7.488281 c 0 15.8125 20.179688 28.855469 38.824219 29.550781 c 7.980469 0 8.191406 -12.511719 17.175781 -12.511719 c 8.988281 0 9.167969 12.511719 17.148438 12.511719 c 18.648437 -0.695312 38.851562 -13.738281 38.851562 -29.550781 v -7.488281 c 0 -15.8125 -20.535156 -21.933594 -39.179688 -22.628907 z m 0 0" fill="url(#d)"/>
<path d="m 47.179688 56.335938 c -18.644532 0.691406 -39.179688 6.8125 -39.179688 22.628906 v 7.484375 c 0 15.8125 20.179688 28.855469 38.824219 29.550781 c 7.980469 0 8.191406 -12.511719 17.175781 -12.511719 c 8.988281 0 9.167969 12.511719 17.148438 12.511719 c 18.648437 -0.695312 38.851562 -13.738281 38.851562 -29.550781 v -7.484375 c 0 -15.816406 -20.535156 -21.9375 -39.179688 -22.628906 z m 0.117187 4.035156 h 33.40625 c 17.867187 0.671875 35.261719 6.273437 35.261719 18.59375 v 7.484375 c 0 12.992187 -17.675782 24.808593 -34.847656 25.5 c -4.980469 -0.054688 -5.515626 -12.5 -17.117188 -12.5 c -11.59375 0 -12.160156 12.445312 -17.144531 12.5 c -17.171875 -0.691407 -34.820313 -12.503907 -34.820313 -25.5 v -7.484375 c 0 -12.320313 17.394532 -17.921875 35.261719 -18.59375 z m 0 0" fill="url(#e)"/>
</g>
</g>
</mask>
<mask id="j">
<g filter="url(#h)">
<rect fill-opacity="0.8" height="128" width="128"/>
</g>
</mask>
<linearGradient id="k" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)" gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
<stop offset="0" stop-color="#f9f06b"/>
<stop offset="1" stop-color="#f5c211"/>
</linearGradient>
<clipPath id="l">
<rect height="128" width="128"/>
</clipPath>
<clipPath id="m">
<rect height="128" width="128"/>
</clipPath>
<path d="m 22.511719 25.277344 c -2.308594 0 -3.390625 5.304687 -4.1875 12.089844 c 7.90625 1.042968 26.65625 10.417968 45.675781 10.425781 c 19.019531 -0.007813 37.769531 -9.382813 45.675781 -10.425781 c -0.796875 -6.785157 -1.882812 -12.089844 -4.1875 -12.089844 c -6.164062 0 -23.695312 9.292968 -41.488281 9.296875 c -17.792969 -0.003907 -35.328125 -9.296875 -41.488281 -9.296875 z m 0 0" fill="url(#a)"/>
<path d="m 18.78125 33.796875 c -4.960938 0 -6.429688 24.6875 -8.800781 36.667969 l 54.019531 -4.039063 l 54.019531 4.039063 c -2.371093 -11.980469 -3.839843 -36.667969 -8.804687 -36.667969 c -6.714844 0 -25.824219 9.296875 -45.214844 9.300781 c -19.390625 -0.003906 -38.5 -9.300781 -45.21875 -9.300781 z m 0 0" fill="url(#b)"/>
<path d="m 47.179688 50.792969 c -18.644532 0.695312 -39.179688 6.8125 -39.179688 22.628906 v 7.484375 c 0 15.816406 20.179688 28.859375 38.824219 29.550781 c 7.980469 0 8.191406 -12.511719 17.175781 -12.511719 c 8.988281 0 9.167969 12.511719 17.148438 12.511719 c 18.648437 -0.691406 38.851562 -13.734375 38.851562 -29.550781 v -7.484375 c 0 -15.816406 -20.535156 -21.933594 -39.179688 -22.628906 z m 0 0" fill="url(#c)"/>
<path d="m 47.179688 56.332031 c -18.644532 0.695313 -39.179688 6.816407 -39.179688 22.628907 v 7.488281 c 0 15.8125 20.179688 28.855469 38.824219 29.550781 c 7.980469 0 8.191406 -12.511719 17.175781 -12.511719 c 8.988281 0 9.167969 12.511719 17.148438 12.511719 c 18.648437 -0.695312 38.851562 -13.738281 38.851562 -29.550781 v -7.488281 c 0 -15.8125 -20.535156 -21.933594 -39.179688 -22.628907 z m 0 0" fill="url(#d)"/>
<path d="m 47.179688 56.335938 c -18.644532 0.691406 -39.179688 6.8125 -39.179688 22.628906 v 7.484375 c 0 15.8125 20.179688 28.855469 38.824219 29.550781 c 7.980469 0 8.191406 -12.511719 17.175781 -12.511719 c 8.988281 0 9.167969 12.511719 17.148438 12.511719 c 18.648437 -0.695312 38.851562 -13.738281 38.851562 -29.550781 v -7.484375 c 0 -15.816406 -20.535156 -21.9375 -39.179688 -22.628906 z m 0.117187 4.035156 h 33.40625 c 17.867187 0.671875 35.261719 6.273437 35.261719 18.59375 v 7.484375 c 0 12.992187 -17.675782 24.808593 -34.847656 25.5 c -4.980469 -0.054688 -5.515626 -12.5 -17.117188 -12.5 c -11.59375 0 -12.160156 12.445312 -17.144531 12.5 c -17.171875 -0.691407 -34.820313 -12.503907 -34.820313 -25.5 v -7.484375 c 0 -12.320313 17.394532 -17.921875 35.261719 -18.59375 z m 0 0" fill="url(#e)"/>
<g clip-path="url(#m)" mask="url(#i)">
<g clip-path="url(#l)" mask="url(#j)">
<path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#k)"/>
<path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m 42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v -21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0 0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.3 KiB

77
data/meson.build Normal file
View file

@ -0,0 +1,77 @@
subdir('icons')
# Desktop file
desktop_file = i18n.merge_file(
type: 'desktop',
input: configure_file(
input: '@0@.desktop.in.in'.format(base_id),
output: '@BASENAME@',
configuration: global_conf
),
output: '@0@.desktop'.format(application_id),
po_dir: podir,
install: true,
install_dir: datadir / 'applications'
)
# Validate Desktop file
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop_file.full_path()
],
depends: desktop_file,
)
endif
# Appdata
appdata_file = i18n.merge_file(
input: configure_file(
input: '@0@.metainfo.xml.in.in'.format(base_id),
output: '@BASENAME@',
configuration: global_conf
),
output: '@0@.metainfo.xml'.format(application_id),
po_dir: podir,
install: true,
install_dir: datadir / 'metainfo'
)
# Validate Appdata
if appstream_util.found()
test(
'validate-appdata', appstream_util,
args: [
'validate', '--nonet', appdata_file.full_path()
],
depends: appdata_file,
)
endif
#### Gschema currently disabled, using json config
# GSchema
# configure_file(
# input: '@0@.gschema.xml.in'.format(base_id),
# output: '@0@.gschema.xml'.format(application_id),
# configuration: global_conf,
# install: true,
# install_dir: datadir / 'glib-2.0' / 'schemas'
# )
# Validata GSchema
# if glib_compile_schemas.found()
# test(
# 'validate-gschema', glib_compile_schemas,
# args: [
# '--strict', '--dry-run', meson.current_build_dir()
# ],
# )
# endif
resources = gnome.compile_resources(
'resources',
'resources.gresource.xml',
gresource_bundle: true,
source_dir: meson.current_build_dir(),
install: true,
install_dir: pkgdatadir,
)

View file

@ -0,0 +1,13 @@
[Desktop Entry]
# Translators: Do NOT translate or transliterate this text
Name=@PRETTY_NAME@
Comment=GUI for Monado
Type=Application
Exec=@CMD_NAME@
Terminal=false
Categories=GNOME;GTK;Game;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=vr;virtual;reality;monado;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@APP_ID@
StartupNotify=true

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>@APP_ID@</id>
<metadata_license>CC0</metadata_license>
<project_license>AGPL-3.0</project_license>
<name translatable="no">@PRETTY_NAME@</name>
<summary>GUI for Monado</summary>
<description>
<p>GUI for Monado</p> <!-- temporary -->
</description>
<!--screenshots>
<screenshot type="default">
<image>https://gitlab.com/gabmus/rex2/raw/main/misc/screenshots/screenshot1.png</image>
<caption>Main window</caption>
</screenshot>
</screenshots-->
<url type="homepage">@REPO_URL@</url>
<url type="bugtracker">@REPO_URL@/issues</url>
<content_rating type="oars-1.0" />
<releases>
<release version="0.1.0" date="2032-06-18" />
</releases>
<kudos>
<!--
GNOME Software kudos:
https://gitlab.gnome.org/GNOME/gnome-software/-/blob/main/doc/kudos.md
-->
<kudo>ModernToolkit</kudo>
<kudo>HiDpiIcon</kudo>
</kudos>
<developer_name translatable="no">Gabriele Musco</developer_name>
<update_contact>gabmus@disroot.org</update_contact>
<translation type="gettext">@GETTEXT_PACKAGE@</translation>
<launchable type="desktop-id">@APP_ID@.desktop</launchable>
</component>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gabmus/rex2/">
<file compressed="true">style.css</file>
<file compressed="true" preprocess="xml-stripblanks">icons/org.gabmus.rex2.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/org.gabmus.rex2-symbolic.svg</file>
</gresource>
</gresources>

0
data/style.css Normal file
View file