Commit 3290ca42 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui
Browse files

Init

parents
Pipeline #98438 passed with stages
in 14 minutes and 42 seconds
root = true
[*]
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
[*.{build,xml.in,xml.in.in,xml}]
indent_size = 2
[*.{json,py}]
indent_size = 4
.vscode/
target/
build/
_build/
build-aux/app
build-aux/.flatpak-builder/
src/config.rs
src/static_resources.rs
*.*.in~
*.*~
stages:
- lint
- test
- review
variables:
BUNDLE: "color-contrast-nightly.flatpak"
flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
stage: "test"
variables:
MANIFEST_PATH: "build-aux/org.gnome.design.ColorContrastDevel.json"
FLATPAK_MODULE: "color-contrast"
MESON_ARGS: "-Dprofile=development"
APP_ID: "org.gnome.design.ColorContrastDevel"
script:
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
# Build the flatpak repo
- flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app ${MESON_ARGS} _build
- flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
- flatpak-builder --finish-only app ${MANIFEST_PATH}
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak build
--env=LANG=C.UTF-8
--env=NO_AT_BRIDGE=1
app
dbus-run-session
meson test -C _build --no-stdsplit --print-errorlogs
# Create a flatpak bundle
- flatpak build-export repo app
- flatpak build-bundle repo ${BUNDLE} ${APP_ID}
artifacts:
paths:
- $BUNDLE
expire_in: 5 days
cache:
key: "flatpak"
paths:
- .flatpak-builder/downloads/
- .flatpak-builder/git/
- target/
- target_test/
review:
stage: review
dependencies:
- flatpak
script:
- echo "Generating flatpak deployment"
artifacts:
paths:
- $BUNDLE
expire_in: 30 days
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
on_stop: stop_review
stop_review:
stage: review
script:
- echo "Stopping flatpak deployment"
when: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
# Configure and run rustfmt
# Exits and builds fails if on bad format
rustfmt:
image: "rust:slim"
stage: "lint"
script:
- rustup component add rustfmt
# Create blank versions of our configured files
# so rustfmt does not yell about non-existent files or completely empty files
- echo -e "" >> src/config.rs
- echo -e "" >> src/static_resources.rs
- rustc -Vv && cargo -Vv
- cargo fmt --version
- cargo fmt --all -- --color=always --check
This diff is collapsed.
[package]
name = "color-contrast"
version = "0.0.1"
authors = ["Bilal Elmoussaoui <bilal.elmoussaoui@gnome.org>"]
edition = "2018"
[dependencies]
gtk = { version = "0.7.0", features = ["v3_24"] }
glib = "0.8.1"
gio = "0.7.0"
gdk = "0.11.0"
log = "0.4"
gettext-rs= { version = "0.4.1", features = ["gettext-system"] }
libhandy = "0.4.0"
This diff is collapsed.
<a href="https://flathub.org/apps/details/org.gnome.design.ColorContrast">
<img src="https://flathub.org/assets/badges/flathub-badge-i-en.png" width="190px" />
</a>
# Color Contrast
<img src="https://gitlab.gnome.org/World/design/color-contrast/raw/master/data/icons/org.gnome.design.ColorContrast.svg" width="128" height="128" />
<p>Find the right icon to use on your GNOME application.</p>
## Screenshots
<div align="center">
![screenshot](data/resources/screenshots/screenshot1.png)
</div>
## Hack on Color Contrast
To build the development version of Color Contrast and hack on the code
see the [general guide](https://wiki.gnome.org/Newcomers/BuildProject)
for building GNOME apps with Flatpak and GNOME Builder.
You are expected to follow our [Code of Conduct](/code-of-conduct.md) when participating in project
spaces.
#!/bin/sh
export MESON_BUILD_ROOT="$1"
export MESON_SOURCE_ROOT="$2"
export CARGO_TARGET_DIR="$MESON_BUILD_ROOT"/target
export CARGO_HOME="$CARGO_TARGET_DIR"/cargo-home
if [[ $4 = "Devel" ]]
Please register or sign in to reply
then
echo "DEBUG MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --verbose && \
cp "$CARGO_TARGET_DIR"/debug/color-contrast $3
else
echo "RELEASE MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --release && \
cp "$CARGO_TARGET_DIR"/release/color-contrast $3
fi
#!/bin/sh
export DIST="$1"
export SOURCE_ROOT="$2"
cd "$SOURCE_ROOT"
mkdir "$DIST"/.cargo
cargo vendor | sed 's/^directory = ".*"/directory = "vendor"/g' > $DIST/.cargo/config
# Move vendor into dist tarball directory
mv vendor "$DIST"
#!/usr/bin/env python3
from os import environ, path
from subprocess import call
if not environ.get('DESTDIR', ''):
PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
DATA_DIR = path.join(PREFIX, 'share')
print('Updating icon cache...')
call(['gtk-update-icon-cache', '-qtf', path.join(DATA_DIR, 'icons/hicolor')])
print("Compiling new schemas...")
call(["glib-compile-schemas", path.join(DATA_DIR, 'glib-2.0/schemas')])
print("Updating desktop database...")
call(["update-desktop-database", path.join(DATA_DIR, 'applications')])
{
"app-id": "org.gnome.design.ColorContrastDevel",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command": "color-contrast",
"tags": [
"nightly"
],
"desktop-file-name-prefix": "(Development) ",
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--device=dri",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"build-options": {
"append-path": "/usr/lib/sdk/rust-stable/bin",
"build-args": [
"--share=network"
],
"env": {
"RUSTFLAGS": "--remap-path-prefix =../ --error-format=human",
"CARGO_HOME": "/run/build/color-contrast/cargo",
"RUST_BACKTRACE": "1",
"RUST_LOG": "color-contrast=debug"
}
},
"modules": [{
"name": "libhandy",
"buildsystem": "meson",
"config-opts": [
"-Dintrospection=disabled",
"-Dgtk_doc=false",
"-Dtests=false",
"-Dexamples=false",
"-Dvapi=false",
"-Dglade_catalog=disabled"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [{
"type": "git",
"url": "https://source.puri.sm/Librem5/libhandy.git"
}]
},
{
"name": "color-contrast",
"buildsystem": "meson",
"config-opts": [
"-Dprofile=development"
],
"sources": [{
"type": "git",
"url": "https://gitlab.gnome.org/World/design/color-contrast.git"
}]
}
]
}
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project maintainer at bilal.elmoussaoui@gnome.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
<?xml version="1.0" encoding="UTF-8"?>
<Project
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">Color Contrast</name>
<shortdesc xml:lang="en">
Color Contrast
</shortdesc>
<description xml:lang="en">
Check the contrast between a foreground and background color
</description>
<bug-database rdf:resource="https://gitlab.gnome.org/World/design/color-contrast" />
<category rdf:resource="http://api.gnome.org/doap-extensions#apps" />
<programming-language>Rust</programming-language>
<maintainer>
<foaf:Person>
<foaf:name>Bilal Elmoussaoui</foaf:name>
<foaf:mbox rdf:resource="mailto:bilal.elmoussaoui@gnome.org" />
<gnome:userid>bilelmoussaoui</gnome:userid>
</foaf:Person>
</maintainer>
</Project>
install_data(
'org.gnome.design.ColorContrast.svg',
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps',
rename: '@0@.svg'.format(application_id)
)
install_data(
'org.gnome.design.ColorContrast-symbolic.svg',
install_dir: iconsdir / 'hicolor' / 'symbolic' / 'apps',
rename: '@0@-symbolic.svg'.format(application_id)
)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="15.999999"
height="16"
viewBox="0 0 11.999999 12"
version="1.1"
id="svg17"
sodipodi:docname="icon-symbolic.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata23">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs21" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1016"
id="namedview19"
showgrid="false"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.3828125"
inkscape:cx="81.014036"
inkscape:cy="74.66666"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg17" />
<g
id="surface341689"
transform="matrix(0.10373822,0,0,0.10714286,-0.44858678,-0.85714288)">
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 60.367188,23.039062 C 60.367188,14.734375 53.613281,8 45.28125,8 39.789062,8 34.988281,10.921875 32.347656,15.292969 29.707031,10.921875 24.902344,8 19.414062,8 11.082031,8 4.324219,14.734375 4.324219,23.039062 4.324219,27.363281 6.15625,31.253906 9.085938,34 H 9.082031 L 32,56 55.613281,34 h -0.0078 C 58.535168,31.253906 60.3672,27.363281 60.3672,23.039062"
id="path2"
inkscape:connector-curvature="0" />
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 96,8 C 82.839844,8 72,18.839844 72,32 72,45.160156 82.839844,56 96,56 109.16016,56 120,45.160156 120,32 120,18.839844 109.16016,8 96,8 Z m 0,16 c 4.51172,0 8,3.488281 8,8 0,4.511719 -3.48828,8 -8,8 -4.511719,0 -8,-3.488281 -8,-8 0,-4.511719 3.488281,-8 8,-8 z m 0,0"
id="path4"
inkscape:connector-curvature="0" />
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 8,64 H 32 V 88 H 8 Z m 0,0"
id="path6"
inkscape:connector-curvature="0" />
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 40,64 H 64 V 88 H 40 Z m 0,0"
id="path8"
inkscape:connector-curvature="0" />
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 8,96 h 24 v 24 H 8 Z m 0,0"
id="path10"
inkscape:connector-curvature="0" />
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 40,96 h 24 v 24 H 40 Z m 0,0"
id="path12"
inkscape:connector-curvature="0" />
<path
style="fill:#3a3545;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 80,72 40,24 -40,24"
id="path14"
inkscape:connector-curvature="0" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128pt" height="128pt" viewBox="0 0 128 128" version="1.1">
<defs>
<linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="384" y1="120" x2="416" y2="120" gradientTransform="matrix(0.25,0,0,0.25,12.000009,49.000002)">
<stop offset="0" style="stop-color:rgb(90.980393%,90.588236%,89.411765%);stop-opacity:1;"/>
<stop offset="0.511049" style="stop-color:rgb(100%,100%,100%);stop-opacity:1;"/>
<stop offset="1" style="stop-color:rgb(76.078433%,74.901962%,72.941178%);stop-opacity:1;"/>
</linearGradient>
</defs>
<g id="surface341677">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(23.921569%,21.960784%,27.450982%);fill-opacity:1;" d="M 12 32 L 12 116 L 108 116 C 112.433594 116 116 112.433594 116 108 L 116 40 C 116 35.566406 112.433594 32 108 32 Z M 12 32 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 14 44 L 14 114 L 108 114 C 112.433594 114 116 110.433594 116 106 L 116 52 C 116 47.566406 112.433594 44 108 44 Z M 14 44 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(60.392159%,60.000002%,58.823532%);fill-opacity:1;" d="M 12 14 L 12 102 L 108 102 C 112.433594 102 116 98.433594 116 94 L 116 22 C 116 17.566406 112.433594 14 108 14 Z M 12 14 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(75.294119%,74.901962%,73.725492%);fill-opacity:1;" d="M 12 12 L 12 100 L 108 100 C 112.433594 100 116 96.433594 116 92 L 116 20 C 116 15.566406 112.433594 12 108 12 Z M 12 12 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(23.921569%,21.960784%,27.450982%);fill-opacity:1;" d="M 12 12 L 24 12 L 24 102 L 12 102 Z M 12 12 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(14.117648%,12.156863%,19.215687%);fill-opacity:1;" d="M 12 100 L 12 116 L 24 116 L 24 114 L 14 114 L 14 102 L 24 102 L 24 100 Z M 12 100 "/>
<path style="fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(36.862746%,36.078432%,39.215687%);stroke-opacity:1;stroke-miterlimit:4;" d="M 6.286058 282.30493 L 6.286058 194.30493 " transform="matrix(1,0,0,1,8.713942,-182.30493)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(23.921569%,21.960784%,27.450982%);fill-opacity:1;" d="M 68 58 L 68 102 L 110 102 C 113.324219 102 116 99.324219 116 96 L 116 58 Z M 68 58 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;" d="M 68 56 L 68 100 L 110 100 C 113.324219 100 116 97.324219 116 94 L 116 56 Z M 68 56 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(87.058824%,86.666667%,85.490197%);fill-opacity:1;" d="M 68 56 L 68 12 L 110 12 C 113.324219 12 116 14.675781 116 18 L 116 56 Z M 68 56 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;" d="M 24 12 L 68 12 L 68 56 L 24 56 Z M 24 12 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(87.058824%,86.666667%,85.490197%);fill-opacity:1;" d="M 58.25 30.089844 C 58.25 26.460938 55.296875 23.515625 51.652344 23.515625 C 49.253906 23.515625 47.152344 24.792969 46 26.703125 C 44.847656 24.792969 42.746094 23.515625 40.347656 23.515625 C 36.703125 23.515625 33.75 26.460938 33.75 30.089844 C 33.75 31.980469 34.550781 33.683594 35.832031 34.882812 L 35.828125 34.882812 L 45.847656 44.5 L 56.171875 34.882812 L 56.167969 34.882812 C 57.449219 33.683594 58.25 31.980469 58.25 30.089844 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(87.058824%,86.666667%,85.490197%);fill-opacity:1;" d="M 24 56 L 68 56 L 68 100 L 24 100 Z M 24 56 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(96.470588%,38.039216%,31.764707%);fill-opacity:1;" d="M 24 106 L 40 106 L 40 122 L 32 116 L 24 122 Z M 24 106 "/>
<path style="fill:none;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(36.862746%,36.078432%,39.215687%);stroke-opacity:1;stroke-miterlimit:4;" d="M 100 206 C 100 210.417969 96.417969 214 92 214 C 87.582031 214 84 210.417969 84 206 C 84 201.582031 87.582031 198 92 198 C 96.417969 198 100 201.582031 100 206 Z M 100 206 " transform="matrix(1,0,0,1,0,-172)"/>
<path style="fill:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke:rgb(87.058824%,86.666667%,85.490197%);stroke-opacity:1;stroke-miterlimit:4;" d="M 89 240 L 98 249 L 89 258 " transform="matrix(1,0,0,1,3,-172)"/>
<path style="fill:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke:rgb(87.058824%,86.666667%,85.490197%);stroke-opacity:1;stroke-miterlimit:4;" d="M 98 249 L 78 249 " transform="matrix(1,0,0,1,3,-172)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;" d="M 39 66 C 41.761719 66 44 68.238281 44 71 C 44 73.761719 41.761719 76 39 76 C 36.238281 76 34 73.761719 34 71 C 34 68.238281 36.238281 66 39 66 Z M 39 66 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;" d="M 53 66 C 55.761719 66 58 68.238281 58 71 C 58 73.761719 55.761719 76 53 76 C 50.238281 76 48 73.761719 48 71 C 48 68.238281 50.238281 66 53 66 Z M 53 66 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;" d="M 39 80 C 41.761719 80 44 82.238281 44 85 C 44 87.761719 41.761719 90 39 90 C 36.238281 90 34 87.761719 34 85 C 34 82.238281 36.238281 80 39 80 Z M 39 80 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(36.862746%,36.078432%,39.215687%);fill-opacity:1;" d="M 53 80 C 55.761719 80 58 82.238281 58 85 C 58 87.761719 55.761719 90 53 90 C 50.238281 90 48 87.761719 48 85 C 48 82.238281 50.238281 80 53 80 Z M 53 80 "/>
</g>
</svg>
\ No newline at end of file
subdir('icons')
# Desktop file
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file (
type: 'desktop',
input: configure_file(
input: 'org.gnome.design.ColorContrast.desktop.in.in',
output: '@BASENAME@',
configuration: desktop_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()
]
)
endif
# Appdata
appdata_conf = configuration_data()
appdata_conf.set('app-id', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_file = i18n.merge_file (
input: configure_file(
input: 'org.gnome.design.ColorContrast.appdata.xml.in.in',
output: '@BASENAME@',
configuration: appdata_conf
),
output: '@0@.appdata.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-relax', '--nonet', appdata_file.full_path()
]
)
endif
# GSchema
gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
gschema_conf.set('gettext-package', gettext_package)
configure_file(
input: 'org.gnome.design.ColorContrast.gschema.xml.in',
output: '@0@.gschema.xml'.format(application_id),
configuration: gschema_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_source_dir()
]
)
endif
# Resources
ui_config = configuration_data()
ui_config.set('app-id', application_id)
ui_config.set('version', meson.project_version() + version_suffix)
ui_config.set('name-prefix', name_prefix)
ui_preconfigured_files = files(
'resources/ui/about_dialog.ui.in',
'resources/ui/window.ui.in',
)
ui_dependencies = []
foreach ui_file: ui_preconfigured_files
ui_dependencies += configure_file(
input: ui_file,
output: '@BASENAME@',
configuration: ui_config
)
endforeach
resources = gnome.compile_resources(
'resources',
'resources.gresource.xml',
gresource_bundle: true,
source_dir: meson.current_build_dir(),
dependencies: ui_dependencies
)