Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add meson build system for building the packages from the sources. #147

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions demo/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
state_files = files('Clarett Plus 2Pre.state',
'Clarett Plus 4Pre.state',
'Clarett Plus 8Pre.state',
'Scarlett Gen 2 18i20.state',
'Scarlett Gen 2 18i8.state',
'Scarlett Gen 2 6i6.state',
'Scarlett Gen 3 18i20.state',
'Scarlett Gen 3 18i8.state',
'Scarlett Gen 3 2i2.state',
'Scarlett Gen 3 4i4.state',
'Scarlett Gen 3 8i6.state',
'Scarlett Gen 3 Solo.state',
'Scarlett Gen 4 2i2.state',
'Scarlett Gen 4 4i4.state',
'Scarlett Gen 4 Solo.state',
'Vocaster One.state',
'Vocaster Two.state')

install_data(
state_files,
install_dir: datadir / 'alsa-scarlett-gui/demo',
)

12 changes: 12 additions & 0 deletions docs/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
docs = files('INSTALL.md',
'OLDKERNEL.md',
'USAGE.md',
'iface-4th-gen.md',
'iface-large.md',
'iface-small.md')

install_data(
docs,
install_dir: datadir / 'alsa-scarlett-gui/docs',
)

31 changes: 31 additions & 0 deletions img/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
images = files('demo.gif',
'firmware-missing.png',
'firmware-update-required.png',
'firmware-updating.png',
'iface-4th-gen.png',
'iface-msd.png',
'iface-none.png',
'iface-small-gen3.png',
'main-global.png',
'main-inputs.png',
'main-outputs.png',
'routing-direct.png',
'scarlett-4th-gen-2i2-monitor.gif',
'scarlett-4th-gen-2i2-routing.png',
'scarlett-4th-gen-4i4-routing.png',
'scarlett-4th-gen-solo-mix-e-f.png',
'scarlett-4th-gen-solo-mix.gif',
'scarlett-4th-gen-solo-monitor.gif',
'window-levels-3rd-gen.png',
'window-levels-4th-gen.gif',
'window-main.png',
'window-mixer.png',
'window-routing.png',
'window-startup.png')

install_data(
images ,
install_dir: datadir / 'alsa-scarlett-gui/img',
)


35 changes: 35 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
project('alsa-scarlett-gui','c',
version: run_command('git', 'describe', '--abbrev=4', '--dirty', '--always', check: true).stdout().strip(),
license: 'GPLv3, LGPLv3',
meson_version: '>= 1.0.0',
)

#add_global_arguments( '-DSOME_TOKEN=value', language : 'c')
add_project_arguments( '-DVERSION="@0@"'.format(meson.project_version()), language : 'c')

gnome = import('gnome')

cc = meson.get_compiler('c')

prefix = get_option('prefix')

bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
localedir = join_paths(prefix, get_option('localedir'))

# Compile time and link time dependencies.
m_dep = cc.find_library('m', required : false)
crypto_dep = dependency('libcrypto', required : true)

glib_dep = dependency('glib-2.0', version : '>= 2.56.0')
gtk4_dep = dependency('gtk4', version : '>= 4.5.0')
alsa_dep = dependency('alsa', version : '>= 1.2.0')

root_inc = include_directories('.')

subdir('src')
subdir('demo')
subdir('img')
subdir('docs')

98 changes: 98 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
sources = ['about.c',
'about.h',
'alsa-sim.c',
'alsa-sim.h',
'alsa.c',
'alsa.h',
'const.h',
'device-reset-config.c',
'device-reset-config.h',
'device-update-firmware.c',
'device-update-firmware.h',
'error.c',
'error.h',
'file.c',
'file.h',
'gtkdial.c',
'gtkdial.h',
'gtkhelper.c',
'gtkhelper.h',
'hardware.c',
'hardware.h',
'iface-mixer.c',
'iface-mixer.h',
'iface-no-mixer.c',
'iface-no-mixer.h',
'iface-none.c',
'iface-none.h',
'iface-unknown.c',
'iface-unknown.h',
'iface-update.c',
'iface-update.h',
'main.c',
'main.h',
'menu.c',
'menu.h',
'routing-drag-line.c',
'routing-drag-line.h',
'routing-lines.c',
'routing-lines.h',
'scarlett2-firmware.c',
'scarlett2-firmware.h',
'scarlett2-ioctls.c',
'scarlett2-ioctls.h',
'scarlett2.h',
'stringhelper.c',
'stringhelper.h',
'tooltips.c',
'tooltips.h',
'widget-boolean.c',
'widget-boolean.h',
'widget-drop-down.c',
'widget-drop-down.h',
'widget-dual.c',
'widget-dual.h',
'widget-gain.c',
'widget-gain.h',
'widget-input-select.c',
'widget-input-select.h',
'widget-label.c',
'widget-label.h',
'widget-sample-rate.c',
'widget-sample-rate.h',
'window-hardware.c',
'window-hardware.h',
'window-helper.c',
'window-helper.h',
'window-iface.c',
'window-iface.h',
'window-levels.c',
'window-levels.h',
'window-mixer.c',
'window-mixer.h',
'window-modal.c',
'window-modal.h',
'window-routing.c',
'window-routing.h',
'window-startup.c',
'window-startup.h']


resources = gnome.compile_resources('alsa-scarlett-gui-resources',
'alsa-scarlett-gui-resources.xml',
source_dir: '.',
c_name: 'resources')

executable( 'alsa-scarlett-gui' , sources + resources ,
dependencies: [
m_dep,
crypto_dep,
glib_dep,
gtk4_dep,
alsa_dep
],
pie: true,
install: true )

#alsa-scarlett-gui.css
#vu.b4.alsa-scarlett-gui.desktop.template