mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 03:26:10 +08:00
Add .desktop file
This adds a .desktop file (without icon for now), which will automatically be installed when `meson install` is run.
This commit is contained in:
12
build-aux/meson_post_install.py
Normal file
12
build-aux/meson_post_install.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/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("Updating desktop database...")
|
||||
call(["update-desktop-database", path.join(DATA_DIR, 'applications')])
|
||||
16
data/meson.build
Normal file
16
data/meson.build
Normal file
@@ -0,0 +1,16 @@
|
||||
desktop_file = '@0@.desktop'.format(base_id)
|
||||
|
||||
if desktop_file_validate.found()
|
||||
test(
|
||||
'validate-desktop',
|
||||
desktop_file_validate,
|
||||
args: [
|
||||
desktop_file
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
install_data(
|
||||
desktop_file,
|
||||
install_dir: datadir / 'applications'
|
||||
)
|
||||
8
data/org.freedesktop.ryuukyu.Helvum.desktop
Normal file
8
data/org.freedesktop.ryuukyu.Helvum.desktop
Normal file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Helvum
|
||||
GenericName=Patchbay
|
||||
Comment=A patchbay for pipewire
|
||||
Type=Application
|
||||
Exec=helvum
|
||||
Terminal=false
|
||||
Categories=AudioVideo;Audio;Video;Midi;Settings;GNOME;GTK;
|
||||
@@ -6,6 +6,8 @@ project(
|
||||
meson_version: '>=0.50.0'
|
||||
)
|
||||
|
||||
base_id = 'org.freedesktop.ryuukyu.Helvum'
|
||||
|
||||
dependency('glib-2.0', version: '>= 2.48')
|
||||
dependency('gtk4', version: '>= 4.0.0')
|
||||
dependency('libpipewire-0.3')
|
||||
@@ -16,11 +18,13 @@ if rust_version < min_rust_version
|
||||
error('Rust version too old: Required version is ' + min_rust_version + ' but actual version is ' + rust_version)
|
||||
endif
|
||||
|
||||
desktop_file_validate = find_program('desktop-file-validate', required: false)
|
||||
cargo = find_program('cargo', required: true)
|
||||
cargo_script = find_program('build-aux/cargo.sh')
|
||||
|
||||
prefix = get_option('prefix')
|
||||
bindir = prefix / get_option('bindir')
|
||||
datadir = prefix / get_option('datadir')
|
||||
|
||||
cargo_sources = files(
|
||||
'Cargo.toml',
|
||||
@@ -28,3 +32,6 @@ cargo_sources = files(
|
||||
)
|
||||
|
||||
subdir('src')
|
||||
subdir('data')
|
||||
|
||||
meson.add_install_script('build-aux/meson_post_install.py')
|
||||
|
||||
Reference in New Issue
Block a user