#!/bin/sh

xdg-mime install --novendor "${MESON_SOURCE_ROOT}/lifeograph.xml"

xdg-icon-resource install --context mimetypes --size 16 "${MESON_SOURCE_ROOT}/icons/diary-16.png" application-x-lifeographdiary
xdg-icon-resource install --context mimetypes --size 32 "${MESON_SOURCE_ROOT}/icons/diary-32.png" application-x-lifeographdiary
xdg-icon-resource install --context mimetypes --size 48 "${MESON_SOURCE_ROOT}/icons/diary-48.png" application-x-lifeographdiary
xdg-icon-resource install --context mimetypes --size 64 "${MESON_SOURCE_ROOT}/icons/diary-64.png" application-x-lifeographdiary
xdg-icon-resource install --context mimetypes --size 128 "${MESON_SOURCE_ROOT}/icons/diary-128.png" application-x-lifeographdiary

xdg-desktop-menu install --novendor "${MESON_BUILD_ROOT}/lifeograph.desktop"
xdg-mime default "${MESON_BUILD_ROOT}/lifeograph.desktop" application-x-lifeographdiary

