2017-05-04 11:45:11 +00:00
|
|
|
project('rofi', 'c',
|
2023-07-23 12:31:22 +00:00
|
|
|
version: '1.7.5+wayland2-dev',
|
2024-02-27 19:42:50 +00:00
|
|
|
meson_version: '>=0.59.0',
|
2017-05-04 11:45:11 +00:00
|
|
|
license: [ 'MIT' ],
|
|
|
|
default_options: [
|
|
|
|
'c_std=c99',
|
2023-06-29 21:59:25 +00:00
|
|
|
'warning_level=3'
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
c_compiler = meson.get_compiler('c')
|
|
|
|
|
2017-05-04 20:02:57 +00:00
|
|
|
add_project_arguments(
|
2024-02-27 19:42:50 +00:00
|
|
|
'-I@0@'.format(meson.project_build_root()),
|
|
|
|
'-I@0@'.format(join_paths(meson.project_source_root(), 'include')),
|
2020-10-12 18:32:25 +00:00
|
|
|
'-D_DEFAULT_SOURCE=1',
|
2017-05-04 20:02:57 +00:00
|
|
|
language: 'c'
|
|
|
|
)
|
|
|
|
|
|
|
|
flags = [
|
|
|
|
'-Wparentheses',
|
|
|
|
'-Winline',
|
|
|
|
'-Wunreachable-code',
|
|
|
|
'-Werror=missing-prototypes',
|
2024-02-16 17:41:07 +00:00
|
|
|
'-Wno-overlength-strings',
|
2023-06-29 21:59:25 +00:00
|
|
|
'-Wno-inline' # A bit too noisy with Bison…
|
2017-05-04 20:02:57 +00:00
|
|
|
]
|
|
|
|
foreach f : flags
|
|
|
|
if c_compiler.has_argument(f)
|
|
|
|
add_project_arguments(f, language: 'c')
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2022-11-17 11:13:14 +00:00
|
|
|
if get_option('b_lto')
|
2022-11-17 10:25:45 +00:00
|
|
|
add_project_arguments('-Werror=odr', language: 'c')
|
|
|
|
add_project_arguments('-Werror=lto-type-mismatch', language: 'c')
|
|
|
|
add_project_arguments('-Werror=strict-aliasing', language: 'c')
|
|
|
|
endif
|
|
|
|
|
2022-05-25 15:52:14 +00:00
|
|
|
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
|
|
|
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
|
|
|
desktop_install_dir = join_paths(get_option('datadir'), 'applications')
|
|
|
|
icondir = join_paths(get_option('datadir'), 'icons','hicolor', 'scalable', 'apps')
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2019-04-19 08:15:06 +00:00
|
|
|
glib_min_major=2
|
2024-02-27 19:46:34 +00:00
|
|
|
glib_min_minor=72
|
2019-04-19 08:15:06 +00:00
|
|
|
glib_min_version='@0@.@1@'.format(glib_min_major, glib_min_minor)
|
2019-03-26 11:25:40 +00:00
|
|
|
plugins_deps = [
|
2019-04-19 08:15:06 +00:00
|
|
|
dependency('glib-2.0', version: '>= @0@'.format(glib_min_version)),
|
2017-05-04 11:45:11 +00:00
|
|
|
dependency('gmodule-2.0'),
|
|
|
|
dependency('cairo'),
|
2019-03-26 11:25:40 +00:00
|
|
|
]
|
|
|
|
|
2021-02-18 09:41:46 +00:00
|
|
|
dep_lm = c_compiler.find_library('m', required : false)
|
2021-02-18 07:04:50 +00:00
|
|
|
|
2019-03-26 11:25:40 +00:00
|
|
|
deps = [
|
|
|
|
plugins_deps,
|
|
|
|
dependency('gio-unix-2.0'),
|
2017-05-04 11:45:11 +00:00
|
|
|
dependency('pango'),
|
|
|
|
dependency('pangocairo'),
|
2017-05-28 00:18:09 +00:00
|
|
|
dependency('xkbcommon'),
|
2020-10-20 18:38:13 +00:00
|
|
|
dependency('gdk-pixbuf-2.0'),
|
2021-02-18 07:04:50 +00:00
|
|
|
dep_lm,
|
2017-05-04 11:45:11 +00:00
|
|
|
]
|
|
|
|
|
2020-08-01 09:28:48 +00:00
|
|
|
|
2021-09-27 21:19:25 +00:00
|
|
|
xcb_enabled = get_option('xcb').enabled()
|
|
|
|
wayland_enabled = get_option('wayland').enabled()
|
|
|
|
assert(xcb_enabled or wayland_enabled,
|
|
|
|
'At least one of these options must be enabled: wayland, xcb')
|
|
|
|
|
2021-01-20 14:19:03 +00:00
|
|
|
libgwater = subproject('libgwater')
|
2021-09-27 21:19:25 +00:00
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
# XCB stuff
|
2021-09-27 21:19:25 +00:00
|
|
|
if xcb_enabled
|
|
|
|
deps += [
|
|
|
|
libgwater.get_variable('libgwater_xcb'),
|
|
|
|
dependency('xcb'),
|
|
|
|
dependency('xcb-aux'),
|
|
|
|
dependency('xcb-xkb'),
|
|
|
|
dependency('xkbcommon-x11'),
|
|
|
|
dependency('xcb-ewmh'),
|
|
|
|
dependency('xcb-icccm'),
|
|
|
|
dependency('xcb-randr'),
|
|
|
|
dependency('xcb-cursor'),
|
|
|
|
dependency('xcb-xinerama'),
|
|
|
|
dependency('cairo-xcb'),
|
|
|
|
dependency('libstartup-notification-1.0'),
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
wayland_protocols = dependency('wayland-protocols', version: '>= 1.17', required: wayland_enabled)
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2021-09-27 21:19:25 +00:00
|
|
|
if wayland_enabled
|
|
|
|
deps += [
|
|
|
|
dependency('wayland-client'),
|
|
|
|
wayland_protocols,
|
|
|
|
dependency('wayland-cursor'),
|
|
|
|
libgwater.get_variable('libgwater_wayland'),
|
|
|
|
]
|
2020-05-04 17:34:50 +00:00
|
|
|
endif
|
|
|
|
|
2022-11-15 16:18:51 +00:00
|
|
|
header_conf = configuration_data()
|
|
|
|
if get_option('imdkit')
|
|
|
|
imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false)
|
|
|
|
imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false)
|
|
|
|
if imdkit_new.found()
|
|
|
|
deps += imdkit_new
|
|
|
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
|
|
|
|
header_conf.set('XCB_IMDKIT', true)
|
|
|
|
elif imdkit_old.found()
|
|
|
|
deps+= imdkit_old
|
|
|
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true)
|
|
|
|
header_conf.set('XCB_IMDKIT', true)
|
|
|
|
else
|
|
|
|
header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false)
|
|
|
|
header_conf.set('XCB_IMDKIT', false)
|
|
|
|
endif
|
|
|
|
endif
|
2022-11-08 18:18:45 +00:00
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2019-03-26 11:10:09 +00:00
|
|
|
check = dependency('check', version: '>= 0.11.0', required: get_option('check'))
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2022-11-08 18:18:45 +00:00
|
|
|
|
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
header_conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
|
|
|
header_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
2018-03-29 10:46:51 +00:00
|
|
|
header_conf.set_quoted('VERSION', meson.project_version())
|
2017-05-04 11:45:11 +00:00
|
|
|
header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
2019-05-14 09:55:30 +00:00
|
|
|
header_conf.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/davatorium/rofi/')
|
2022-11-11 20:53:20 +00:00
|
|
|
header_conf.set_quoted('PACKAGE_URL', 'https://github.com/davatorium/rofi/discussions')
|
2017-05-04 11:45:11 +00:00
|
|
|
|
|
|
|
header_conf.set('_GNU_SOURCE', true)
|
|
|
|
|
2017-10-15 15:51:45 +00:00
|
|
|
header_conf.set('USE_NK_GIT_VERSION', true)
|
2017-05-04 11:45:11 +00:00
|
|
|
|
2019-04-19 08:15:06 +00:00
|
|
|
header_conf.set('GLIB_VERSION_MIN_REQUIRED', '(G_ENCODE_VERSION(@0@,@1@))'.format(glib_min_major, glib_min_minor))
|
|
|
|
header_conf.set('GLIB_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(@0@,@1@))'.format(glib_min_major, glib_min_minor))
|
|
|
|
|
2019-03-26 11:10:09 +00:00
|
|
|
header_conf.set('ENABLE_DRUN', get_option('drun'))
|
2022-09-01 06:29:29 +00:00
|
|
|
header_conf.set('WINDOW_MODE', get_option('window'))
|
2020-05-04 21:31:23 +00:00
|
|
|
|
2021-09-27 21:19:25 +00:00
|
|
|
header_conf.set('ENABLE_WAYLAND', wayland_enabled)
|
|
|
|
header_conf.set('ENABLE_XCB', xcb_enabled)
|
2017-05-04 11:45:11 +00:00
|
|
|
|
|
|
|
header_conf.set_quoted('MANPAGE_PATH', join_paths(get_option('prefix'), get_option('mandir')))
|
|
|
|
header_conf.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
|
2019-03-26 11:25:40 +00:00
|
|
|
header_conf.set_quoted('PLUGIN_PATH', join_paths(get_option('prefix'), plugindir))
|
|
|
|
header_conf.set_quoted('THEME_DIR', join_paths(get_option('prefix'), themedir))
|
2017-05-04 11:45:11 +00:00
|
|
|
|
|
|
|
config_h = configure_file(output: 'config.h', configuration: header_conf)
|
|
|
|
|
2017-10-15 15:51:45 +00:00
|
|
|
nk_options = [
|
2017-05-28 00:18:09 +00:00
|
|
|
'bindings=true',
|
2024-02-27 19:42:50 +00:00
|
|
|
'git-work-tree=@0@'.format(meson.project_source_root()),
|
2017-05-28 00:18:09 +00:00
|
|
|
]
|
2017-10-15 15:51:45 +00:00
|
|
|
nk = subproject('libnkutils', default_options: nk_options)
|
|
|
|
nk_subproject_options = nk.get_variable('nk_options')
|
|
|
|
foreach o : nk_options + nk_subproject_options
|
2022-02-26 15:58:56 +00:00
|
|
|
if ( o.startswith('git-work-tree=') )
|
|
|
|
continue
|
|
|
|
elif not nk_options.contains(o) or not nk_subproject_options.contains(o)
|
2017-10-15 15:51:45 +00:00
|
|
|
error('You must not change libnkutils options @0@ != @1@'.format('|'.join(nk_options), '|'.join(nk_subproject_options)))
|
2017-05-28 00:18:09 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
deps += nk.get_variable('libnkutils')
|
2018-07-10 11:03:52 +00:00
|
|
|
deps += nk.get_variable('libnkutils_bindings')
|
2017-05-04 11:45:11 +00:00
|
|
|
|
|
|
|
install_headers([
|
|
|
|
'include/mode.h',
|
|
|
|
'include/mode-private.h',
|
|
|
|
'include/helper.h',
|
2017-10-15 09:13:53 +00:00
|
|
|
'include/rofi-types.h',
|
2018-07-14 16:05:34 +00:00
|
|
|
'include/rofi-icon-fetcher.h'
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
subdir: meson.project_name(),
|
|
|
|
)
|
|
|
|
install_data(
|
|
|
|
'script/rofi-sensible-terminal',
|
|
|
|
'script/rofi-theme-selector',
|
|
|
|
install_dir: join_paths(get_option('prefix'), get_option('bindir'))
|
|
|
|
)
|
|
|
|
|
2022-05-25 15:52:14 +00:00
|
|
|
install_data(
|
|
|
|
'data/rofi-theme-selector.desktop',
|
|
|
|
'data/rofi.desktop',
|
|
|
|
install_dir: desktop_install_dir
|
|
|
|
)
|
|
|
|
install_data(
|
|
|
|
'data/rofi.svg',
|
|
|
|
install_dir: icondir
|
|
|
|
)
|
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
flex = generator(find_program('flex'),
|
|
|
|
output: '@BASENAME@.c',
|
|
|
|
arguments: [ '-o', '@OUTPUT@', '@INPUT@' ]
|
|
|
|
)
|
|
|
|
bison = generator(find_program('bison'),
|
|
|
|
output: [ '@BASENAME@.c', '@BASENAME@.h' ],
|
2022-04-14 20:50:38 +00:00
|
|
|
arguments: [ '--report=all', '--report-file=bison.log', '-Wall', '--verbose', '-d', '@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@' ]
|
2017-05-04 11:45:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
rofi_sources = files(
|
|
|
|
'source/rofi.c',
|
|
|
|
'source/mode.c',
|
|
|
|
'source/keyb.c',
|
|
|
|
'config/config.c',
|
2020-06-02 19:29:28 +00:00
|
|
|
'source/display.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/timings.c',
|
|
|
|
'source/history.c',
|
|
|
|
'source/theme.c',
|
2018-06-09 17:13:57 +00:00
|
|
|
'source/rofi-icon-fetcher.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2020-06-02 19:29:28 +00:00
|
|
|
'source/view.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/widgets/box.c',
|
2018-06-09 17:13:57 +00:00
|
|
|
'source/widgets/icon.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/widgets/container.c',
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/widgets/listview.c',
|
|
|
|
'source/widgets/scrollbar.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2022-02-23 22:18:53 +00:00
|
|
|
'source/modes/run.c',
|
|
|
|
'source/modes/ssh.c',
|
|
|
|
'source/modes/drun.c',
|
|
|
|
'source/modes/dmenu.c',
|
|
|
|
'source/modes/combi.c',
|
|
|
|
'source/modes/script.c',
|
|
|
|
'source/modes/help-keys.c',
|
|
|
|
'source/modes/filebrowser.c',
|
2023-06-12 17:07:00 +00:00
|
|
|
'source/modes/recursivebrowser.c',
|
2017-06-01 12:55:17 +00:00
|
|
|
'include/display.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
'include/xcb.h',
|
|
|
|
'include/rofi.h',
|
|
|
|
'include/mode.h',
|
|
|
|
'include/mode-private.h',
|
|
|
|
'include/settings.h',
|
|
|
|
'include/keyb.h',
|
|
|
|
'include/view.h',
|
|
|
|
'include/view-internal.h',
|
2018-06-09 17:13:57 +00:00
|
|
|
'include/rofi-icon-fetcher.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
'include/helper.h',
|
|
|
|
'include/helper-theme.h',
|
|
|
|
'include/timings.h',
|
|
|
|
'include/history.h',
|
|
|
|
'include/theme.h',
|
2017-06-20 19:02:13 +00:00
|
|
|
'include/rofi-types.h',
|
2017-05-27 22:21:57 +00:00
|
|
|
'include/css-colors.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
'include/widgets/box.h',
|
2018-06-09 17:13:57 +00:00
|
|
|
'include/widgets/icon.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
'include/widgets/container.h',
|
|
|
|
'include/widgets/widget.h',
|
|
|
|
'include/widgets/widget-internal.h',
|
|
|
|
'include/widgets/textbox.h',
|
|
|
|
'include/widgets/listview.h',
|
|
|
|
'include/widgets/scrollbar.h',
|
|
|
|
'include/xrmoptions.h',
|
2022-02-23 22:18:53 +00:00
|
|
|
'include/modes/ssh.h',
|
|
|
|
'include/modes/run.h',
|
|
|
|
'include/modes/drun.h',
|
|
|
|
'include/modes/dmenu.h',
|
|
|
|
'include/modes/combi.h',
|
|
|
|
'include/modes/script.h',
|
|
|
|
'include/modes/modes.h',
|
|
|
|
'include/modes/help-keys.h',
|
|
|
|
'include/modes/filebrowser.h',
|
|
|
|
'include/modes/dmenuscriptshared.h',
|
2017-05-04 11:45:11 +00:00
|
|
|
)
|
2021-09-27 21:19:25 +00:00
|
|
|
if xcb_enabled
|
|
|
|
rofi_sources += files(
|
2022-04-17 09:19:36 +00:00
|
|
|
'source/modes/window.c',
|
2021-09-27 21:19:25 +00:00
|
|
|
'source/xcb/display.c',
|
|
|
|
'source/xcb/view.c',
|
2022-04-17 09:19:36 +00:00
|
|
|
'include/modes/window.h',
|
2021-09-27 21:19:25 +00:00
|
|
|
'include/xcb-internal.h',
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
theme_lexer_sources = files('lexer/theme-lexer.l')
|
|
|
|
theme_parser_sources = files('lexer/theme-parser.y')
|
|
|
|
|
|
|
|
theme_lexer = flex.process(theme_lexer_sources)
|
|
|
|
theme_parser = bison.process(theme_parser_sources)
|
2017-10-31 17:16:08 +00:00
|
|
|
|
2021-09-27 21:19:25 +00:00
|
|
|
if wayland_enabled
|
2024-02-26 22:39:05 +00:00
|
|
|
fs = import('fs')
|
|
|
|
wayland_sys_protocols_dir = wayland_protocols.get_variable(pkgconfig: 'pkgdatadir')
|
2020-05-04 17:34:50 +00:00
|
|
|
wayland_scanner = find_program('wayland-scanner')
|
|
|
|
protocols = files(
|
|
|
|
wayland_sys_protocols_dir + '/stable/xdg-shell/xdg-shell.xml',
|
2021-09-06 12:50:54 +00:00
|
|
|
wayland_sys_protocols_dir + '/unstable/primary-selection/primary-selection-unstable-v1.xml',
|
2024-02-27 13:09:18 +00:00
|
|
|
wayland_sys_protocols_dir + '/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml',
|
2022-09-01 06:29:29 +00:00
|
|
|
'protocols/wlr-foreign-toplevel-management-unstable-v1.xml',
|
2020-05-04 17:34:50 +00:00
|
|
|
'protocols/wlr-layer-shell-unstable-v1.xml',
|
|
|
|
)
|
2024-01-08 03:11:51 +00:00
|
|
|
|
|
|
|
if wayland_protocols.version().version_compare('>=1.32')
|
|
|
|
add_project_arguments('-DHAVE_WAYLAND_CURSOR_SHAPE', language: 'c')
|
|
|
|
protocols += files(
|
|
|
|
wayland_sys_protocols_dir + '/staging/cursor-shape/cursor-shape-v1.xml',
|
|
|
|
wayland_sys_protocols_dir + '/unstable/tablet/tablet-unstable-v2.xml',
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2020-05-04 17:34:50 +00:00
|
|
|
proto_srcs = []
|
|
|
|
proto_headers = []
|
|
|
|
foreach p : protocols
|
|
|
|
proto_srcs += custom_target(
|
2024-02-26 22:39:05 +00:00
|
|
|
fs.stem(p).underscorify() + '_protocol_c',
|
2020-05-04 17:34:50 +00:00
|
|
|
input: p,
|
|
|
|
output: '@BASENAME@-protocol.c',
|
|
|
|
command: [wayland_scanner, 'public-code', '@INPUT@', '@OUTPUT@'],
|
|
|
|
)
|
|
|
|
proto_headers += custom_target(
|
2024-02-26 22:39:05 +00:00
|
|
|
fs.stem(p).underscorify() + '_protocol_h',
|
2020-05-04 17:34:50 +00:00
|
|
|
input: p,
|
|
|
|
output: '@BASENAME@-protocol.h',
|
|
|
|
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
rofi_sources += proto_srcs
|
|
|
|
rofi_sources += proto_headers
|
2020-06-02 19:29:28 +00:00
|
|
|
rofi_sources += files(
|
2022-09-01 06:29:29 +00:00
|
|
|
'source/modes/wayland-window.c',
|
2020-06-02 19:29:28 +00:00
|
|
|
'source/wayland/view.c',
|
|
|
|
'source/wayland/display.c',
|
2022-09-01 06:29:29 +00:00
|
|
|
'include/modes/wayland-window.h',
|
2020-06-02 19:29:28 +00:00
|
|
|
'include/wayland-internal.h',
|
|
|
|
)
|
2020-05-04 17:34:50 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2017-10-31 17:16:08 +00:00
|
|
|
gnome = import('gnome')
|
|
|
|
default_theme = gnome.compile_resources('resources', files('resources/resources.xml'))
|
|
|
|
|
2017-05-04 11:45:11 +00:00
|
|
|
rofi = executable('rofi', rofi_sources + [
|
|
|
|
theme_lexer,
|
|
|
|
theme_parser,
|
2017-10-31 17:16:08 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
dependencies: deps,
|
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
subdir('doc')
|
|
|
|
install_man(
|
|
|
|
'doc/rofi.1',
|
2017-11-05 14:28:17 +00:00
|
|
|
'doc/rofi-theme-selector.1',
|
2017-05-04 11:45:11 +00:00
|
|
|
'doc/rofi-sensible-terminal.1',
|
2020-09-19 14:49:50 +00:00
|
|
|
'doc/rofi-script.5',
|
2017-08-04 14:50:51 +00:00
|
|
|
'doc/rofi-theme.5',
|
2022-04-11 09:19:34 +00:00
|
|
|
'doc/rofi-debugging.5',
|
2021-12-17 10:13:29 +00:00
|
|
|
'doc/rofi-dmenu.5',
|
2021-12-15 20:31:44 +00:00
|
|
|
'doc/rofi-keys.5',
|
2017-05-04 11:45:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
'themes/Adapta-Nokto.rasi',
|
|
|
|
'themes/Arc.rasi',
|
2018-02-25 14:18:37 +00:00
|
|
|
'themes/Arc-Dark.rasi',
|
2017-05-04 11:45:11 +00:00
|
|
|
'themes/DarkBlue.rasi',
|
|
|
|
'themes/Indego.rasi',
|
|
|
|
'themes/Monokai.rasi',
|
|
|
|
'themes/Paper.rasi',
|
|
|
|
'themes/android_notification.rasi',
|
|
|
|
'themes/arthur.rasi',
|
|
|
|
'themes/blue.rasi',
|
|
|
|
'themes/c64.rasi',
|
2017-06-05 18:31:32 +00:00
|
|
|
'themes/dmenu.rasi',
|
2021-02-14 12:31:47 +00:00
|
|
|
'themes/docu.rasi',
|
2017-05-04 11:45:11 +00:00
|
|
|
'themes/glue_pro_blue.rasi',
|
2022-12-30 10:54:15 +00:00
|
|
|
'themes/gruvbox-common.rasinc',
|
2017-05-04 11:45:11 +00:00
|
|
|
'themes/gruvbox-dark-hard.rasi',
|
|
|
|
'themes/gruvbox-dark-soft.rasi',
|
|
|
|
'themes/gruvbox-dark.rasi',
|
|
|
|
'themes/gruvbox-light-hard.rasi',
|
|
|
|
'themes/gruvbox-light-soft.rasi',
|
|
|
|
'themes/gruvbox-light.rasi',
|
|
|
|
'themes/lb.rasi',
|
|
|
|
'themes/paper-float.rasi',
|
|
|
|
'themes/purple.rasi',
|
|
|
|
'themes/sidebar.rasi',
|
2022-06-27 14:56:59 +00:00
|
|
|
'themes/sidebar-v2.rasi',
|
2017-05-04 11:45:11 +00:00
|
|
|
'themes/solarized.rasi',
|
|
|
|
'themes/solarized_alternate.rasi',
|
2019-05-14 09:35:30 +00:00
|
|
|
'themes/fancy.rasi',
|
2022-12-31 22:54:14 +00:00
|
|
|
'themes/fancy2.rasi',
|
2021-08-17 10:04:16 +00:00
|
|
|
'themes/iggy.rasi',
|
2022-12-31 22:21:03 +00:00
|
|
|
'themes/material.rasi',
|
2021-08-17 10:04:16 +00:00
|
|
|
'themes/iggy.jpg',
|
2023-01-09 23:48:52 +00:00
|
|
|
'themes/fullscreen-preview.rasi',
|
2017-05-04 11:45:11 +00:00
|
|
|
install_dir: themedir
|
|
|
|
)
|
|
|
|
|
2017-10-16 17:18:19 +00:00
|
|
|
pkg = import('pkgconfig')
|
|
|
|
|
2019-03-26 11:25:40 +00:00
|
|
|
pkg.generate(
|
|
|
|
filebase: 'rofi',
|
|
|
|
name: 'rofi',
|
2021-10-03 22:59:51 +00:00
|
|
|
version: meson.project_version().split('+')[0],
|
2019-03-26 11:25:40 +00:00
|
|
|
description: 'Header files for rofi plugins',
|
|
|
|
variables: [
|
|
|
|
'pluginsdir=@0@'.format(join_paths('${libdir}', meson.project_name())),
|
|
|
|
],
|
|
|
|
requires_private: plugins_deps,
|
2017-06-20 12:57:25 +00:00
|
|
|
)
|
2017-05-04 11:45:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
test('history test', executable('history.test', [
|
|
|
|
'test/history-test.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/history.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_pidfile test', executable('helper_pidfile.test', [
|
|
|
|
'test/helper-pidfile.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
test('widget test', executable('widget.test', [
|
|
|
|
'test/widget-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('box test', executable('box.test', [
|
|
|
|
'test/box-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/box.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('scrollbar test', executable('scrollbar.test', [
|
|
|
|
'test/scrollbar-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/scrollbar.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('textbox test', executable('textbox.test', [
|
|
|
|
'test/textbox-test.c',
|
|
|
|
theme_parser,
|
|
|
|
theme_lexer,
|
2021-08-24 16:19:25 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'source/widgets/widget.c',
|
|
|
|
'source/widgets/textbox.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'config/config.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper test', executable('helper.test', [
|
|
|
|
'test/helper-test.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_expand test', executable('helper_expand.test', [
|
|
|
|
'test/helper-expand.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('helper_config_cmdline_parser test', executable('helper_config_cmdline_parser.test', [
|
|
|
|
'test/helper-config-cmdline-parser.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
2021-06-01 12:21:21 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
if check.found()
|
|
|
|
deps+= [ check ]
|
|
|
|
|
|
|
|
test('theme_parser test', executable('theme_parser.test', [
|
|
|
|
'test/theme-parser-test.c',
|
|
|
|
theme_lexer,
|
|
|
|
theme_parser,
|
2021-08-24 16:22:46 +00:00
|
|
|
default_theme,
|
2017-05-04 11:45:11 +00:00
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-27 22:21:57 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
|
|
|
|
|
|
|
test('mode test', executable('mode.test', [
|
|
|
|
'test/mode-test.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
2022-02-23 22:18:53 +00:00
|
|
|
'source/modes/help-keys.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/helper.c',
|
2021-06-05 10:58:07 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/mode.c',
|
|
|
|
'source/xrmoptions.c',
|
2017-06-20 19:02:13 +00:00
|
|
|
'source/rofi-types.c',
|
2017-05-04 11:45:11 +00:00
|
|
|
'source/keyb.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-10-15 09:13:53 +00:00
|
|
|
|
|
|
|
test('helper_tokenize test', executable('helper_tokenize.test', [
|
|
|
|
'test/helper-tokenize.c',
|
|
|
|
],
|
|
|
|
objects: rofi.extract_objects([
|
|
|
|
'config/config.c',
|
|
|
|
'source/helper.c',
|
2021-06-05 10:58:07 +00:00
|
|
|
'source/theme.c',
|
2021-09-20 17:57:12 +00:00
|
|
|
'source/css-colors.c',
|
2017-10-15 09:13:53 +00:00
|
|
|
'source/xrmoptions.c',
|
|
|
|
'source/rofi-types.c',
|
|
|
|
]),
|
|
|
|
dependencies: deps,
|
|
|
|
))
|
2017-05-04 11:45:11 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
rofi_sources += theme_lexer_sources
|
|
|
|
rofi_sources += theme_parser_sources
|
|
|
|
|
|
|
|
cppcheck = find_program('cppcheck', required: false)
|
|
|
|
if cppcheck.found()
|
|
|
|
run_target('cppcheck',
|
|
|
|
command: [
|
|
|
|
cppcheck,
|
|
|
|
'--std=@0@'.format(get_option('c_std')),
|
|
|
|
'--platform=unix64',
|
|
|
|
'--enable=all',
|
|
|
|
'-Uerror_dialog',
|
|
|
|
'--inconclusive',
|
2024-02-27 19:42:50 +00:00
|
|
|
'-I@0@'.format(join_paths(meson.project_source_root(), 'include')),
|
2017-05-04 11:45:11 +00:00
|
|
|
rofi_sources
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ohcount = find_program('ohcount', required: false)
|
|
|
|
if ohcount.found()
|
|
|
|
run_target('ohcount',
|
|
|
|
command: [
|
|
|
|
ohcount,
|
|
|
|
rofi_sources
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|