Commit 4b7bd898 authored by Hanspeter Portner's avatar Hanspeter Portner

ui: fixes for updated d2tk.

parent d758cdf9
Pipeline #121717946 failed with stages
in 2 minutes and 7 seconds
stages:
- build
- test
- deploy
.variables_template: &variables_definition
variables:
BASE_NAME: "mephisto.lv2"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
BUILD_OPTS: "-Duse-fontconfig=disabled"
.common_template: &common_definition
<<: *variables_definition
stage: build
artifacts:
name: "${BASE_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
name: "${CI_PROJECT_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
paths:
- "${BASE_NAME}-$(cat VERSION)/"
- "${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
.build_template: &build_definition
<<: *common_definition
script:
- meson --prefix="/opt/${CI_BUILD_NAME}" --libdir="lib" --cross-file "${CI_BUILD_NAME}" build
- sed -i -e '/framework/s/-Wl,-O1//g' -e '/framework/s/-Wl,--start-group//g' -e '/framework/s/-Wl,--end-group//g' -e '/framework/s/-Wl,-soname,.*dylib//g' build/build.ninja
- meson --prefix="${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" -Dlv2libdir="" --cross-file "${CI_BUILD_NAME}" "${BUILD_OPTS}" build
- ninja -C build
- ninja -C build install
- ninja -C build test
- mkdir -p "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/${BASE_NAME}"
- cp -r "/opt/${CI_BUILD_NAME}/lib/lv2/${BASE_NAME}/" "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
- ninja -C build install
.universal_linux_template_bullseye: &universal_linux_definition_bullseye
image: ventosus/universal-linux-gnu:bullseye
......@@ -85,6 +81,6 @@ pack:
script:
- echo 'packing up...'
artifacts:
name: "${BASE_NAME}-$(cat VERSION)"
name: "${CI_PROJECT_NAME}-$(cat VERSION)"
paths:
- "${BASE_NAME}-$(cat VERSION)/"
- "${CI_PROJECT_NAME}-$(cat VERSION)/"
......@@ -641,12 +641,15 @@ _expose_term(plughandle_t *handle, const d2tk_rect_t *rect)
NULL
};
const d2tk_state_t state = d2tk_base_pty(base, D2TK_ID, NULL, args,
handle->font_height, rect, handle->reinit);
if(d2tk_state_is_close(state))
D2TK_BASE_PTY(base, D2TK_ID, args,
handle->font_height, rect, handle->reinit, pty)
{
handle->done = 1;
const d2tk_state_t state = d2tk_pty_get_state(pty);
if(d2tk_state_is_close(state))
{
handle->done = 1;
}
}
handle->reinit = false;
......
......@@ -7,10 +7,14 @@ project('mephisto.lv2', 'c', default_options : [
d2tk = subproject('d2tk')
use_backend = get_option('use-backend')
if use_backend == 'nanovg'
lv2libdir = get_option('lv2libdir')
build_tests = get_option('build-tests')
inst_dir = join_paths(lv2libdir, meson.project_name())
if get_option('use-backend-nanovg').enabled()
d2tk_dep = d2tk.get_variable('d2tk_nanovg')
elif use_backend == 'cairo'
elif get_option('use-backend-cairo').enabled()
d2tk_dep = d2tk.get_variable('d2tk_cairo')
else
error('no valid UI backend given')
......@@ -50,8 +54,6 @@ varchunk_inc = include_directories('varchunk')
d2tk_inc = include_directories(join_paths('subprojects', 'd2tk'))
inc_dir = [props_inc, timely_inc, ser_inc, varchunk_inc, d2tk_inc]
inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
dsp_srcs = ['mephisto.c']
ui_srcs = ['mephisto_ui.c']
......@@ -124,30 +126,6 @@ pset_ttl = configure_file(
install : true,
install_dir : inst_dir)
configure_file(
input : 'FiraCode-Bold.ttf',
output : 'FiraCode-Bold.ttf',
copy : true,
install : true,
install_dir : inst_dir)
configure_file(
input : 'FiraCode-Medium.ttf',
output : 'FiraCode-Medium.ttf',
copy : true,
install : true,
install_dir : inst_dir)
configure_file(
input : 'FiraCode-Regular.ttf',
output : 'FiraCode-Regular.ttf',
copy : true,
install : true,
install_dir : inst_dir)
configure_file(
input : 'FiraCode-Light.ttf',
output : 'FiraCode-Light.ttf',
copy : true,
install : true,
install_dir : inst_dir)
configure_file(
input : 'libre-gui-exclamation-circle.png',
output : 'libre-gui-exclamation-circle.png',
......@@ -155,38 +133,40 @@ configure_file(
install : true,
install_dir : inst_dir)
if lv2_validate.found() and sord_validate.found()
test('LV2 validate', lv2_validate,
args : [manifest_ttl, dsp_ttl, ui_ttl, pset_ttl])
endif
if lv2lint.found()
test('LV2 lint', lv2lint,
args : ['-M', 'pack',
'-E', 'warn',
'-I', join_paths(build_root, ''),
'http://open-music-kontrollers.ch/lv2/mephisto#audio_1x1',
'http://open-music-kontrollers.ch/lv2/mephisto#audio_2x2',
'http://open-music-kontrollers.ch/lv2/mephisto#audio_4x4',
'http://open-music-kontrollers.ch/lv2/mephisto#audio_8x8',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_1x1',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_2x2',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_4x4',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_8x8'
if build_tests
if lv2_validate.found() and sord_validate.found()
test('LV2 validate', lv2_validate,
args : [manifest_ttl, dsp_ttl, ui_ttl, pset_ttl])
endif
if lv2lint.found()
test('LV2 lint', lv2lint,
args : ['-M', 'pack',
'-E', 'warn',
'-I', join_paths(build_root, ''),
'http://open-music-kontrollers.ch/lv2/mephisto#audio_1x1',
'http://open-music-kontrollers.ch/lv2/mephisto#audio_2x2',
'http://open-music-kontrollers.ch/lv2/mephisto#audio_4x4',
'http://open-music-kontrollers.ch/lv2/mephisto#audio_8x8',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_1x1',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_2x2',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_4x4',
'http://open-music-kontrollers.ch/lv2/mephisto#cv_8x8'
])
endif
if faust.found()
test('FAUST bank-filter_through', faust, args : [
join_paths(source_root, 'bank-filter_through.dsp')
])
endif
if faust.found()
test('FAUST bank-filter_through', faust, args : [
join_paths(source_root, 'bank-filter_through.dsp')
])
test('FAUST bank-filter_gain', faust, args : [
join_paths(source_root, 'bank-filter_gain.dsp')
])
test('FAUST bank-time_lfo', faust, args : [
join_paths(source_root, 'bank-time_lfo.dsp')
])
test('FAUST bank-instrument_osc', faust, args : [
join_paths(source_root, 'bank-instrument_osc.dsp')
])
test('FAUST bank-filter_gain', faust, args : [
join_paths(source_root, 'bank-filter_gain.dsp')
])
test('FAUST bank-time_lfo', faust, args : [
join_paths(source_root, 'bank-time_lfo.dsp')
])
test('FAUST bank-instrument_osc', faust, args : [
join_paths(source_root, 'bank-instrument_osc.dsp')
])
endif
endif
option('use-backend', type : 'string', value : 'nanovg')
option('build-debug-overlay',
type : 'boolean',
value : false)
option('build-tests',
type : 'boolean',
value : true)
option('use-backend-cairo',
type : 'feature',
value : 'disabled')
option('use-backend-nanovg',
type : 'feature',
value : 'enabled')
option('use-frontend-pugl',
type : 'feature',
value : 'enabled')
option('use-vterm',
type : 'feature',
value : 'enabled')
option('use-fontconfig',
type : 'feature',
value : 'enabled')
option('lv2libdir',
type : 'string',
value : 'lib/lv2')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment