Add native Wine accessibility bridge
This commit is contained in:
+48
@@ -65,6 +65,54 @@ optional_modules = {
|
||||
}
|
||||
|
||||
summary = {}
|
||||
|
||||
wine_access_mode = get_option('wine-access')
|
||||
wine_access_tools = {
|
||||
'cmake': find_program('cmake', required: false),
|
||||
'winegcc': find_program('winegcc', required: false),
|
||||
'wineg++': find_program('wineg++', required: false),
|
||||
'widl': find_program('widl', required: false),
|
||||
}
|
||||
wine_access_enabled = wine_access_mode != 'disabled' and host_machine.cpu_family() == 'x86_64'
|
||||
foreach tool_name, tool : wine_access_tools
|
||||
if not tool.found()
|
||||
wine_access_enabled = false
|
||||
if wine_access_mode == 'enabled'
|
||||
error(f'-Dwine-access=enabled requires @tool_name@')
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
if wine_access_mode == 'enabled' and host_machine.cpu_family() != 'x86_64'
|
||||
error('-Dwine-access=enabled currently requires an x86_64 build host')
|
||||
endif
|
||||
|
||||
if wine_access_enabled
|
||||
wine_access_outputs = custom_target(
|
||||
'wine-access-helper',
|
||||
output: ['cthulhu-wine-access.exe', 'cthulhu-wine-access.exe.so'],
|
||||
command: [
|
||||
find_program('bash'),
|
||||
files('scripts/build-wine-access.sh'),
|
||||
meson.current_source_dir() / 'wine-access',
|
||||
meson.current_build_dir() / 'wine-access-build',
|
||||
'@OUTPUT0@',
|
||||
'@OUTPUT1@',
|
||||
],
|
||||
depend_files: files(
|
||||
'scripts/build-wine-access.sh',
|
||||
'wine-access/CMakeLists.txt',
|
||||
'wine-access/main.cpp',
|
||||
'wine-access/nvdaController.idl',
|
||||
'wine-access/winelib-toolchain.cmake',
|
||||
),
|
||||
build_by_default: true,
|
||||
install: true,
|
||||
install_dir: get_option('libexecdir') / 'cthulhu' / 'wine',
|
||||
)
|
||||
summary += {'Wine accessibility': 'yes (Winelib x86_64 helper)'}
|
||||
else
|
||||
summary += {'Wine accessibility': 'no'}
|
||||
endif
|
||||
foreach module, description : optional_modules
|
||||
result = python.find_installation('python3', modules:[module], required: false)
|
||||
if result.found()
|
||||
|
||||
Reference in New Issue
Block a user