mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Make use-* aliases for new with-* build options
The 'use-*' variants will be marked as deprecated in a future version.
This commit is contained in:
@@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
# Statically link to libstdc++ on Ubuntu 18.04 as we're compiling
|
# Statically link to libstdc++ on Ubuntu 18.04 as we're compiling
|
||||||
# with a newer version of g++ than what's in the default repos
|
# with a newer version of g++ than what's in the default repos
|
||||||
meson setup --buildtype=release --cross-file cross-wine.conf -Dwith-static-boost=true -Duse-bitbridge=true -Dcpp_link_args='-static-libstdc++' -Dbuild.cpp_link_args='-static-libstdc++' build
|
meson setup --buildtype=release --cross-file cross-wine.conf -Dwith-static-boost=true -Dwidth-bitbridge=true -Dcpp_link_args='-static-libstdc++' -Dbuild.cpp_link_args='-static-libstdc++' build
|
||||||
ninja -C build
|
ninja -C build
|
||||||
- name: Create an archive for the binaries
|
- name: Create an archive for the binaries
|
||||||
run: |
|
run: |
|
||||||
@@ -91,7 +91,7 @@ jobs:
|
|||||||
mkdir -p /tmp/prefix
|
mkdir -p /tmp/prefix
|
||||||
export WINEPREFIX=/tmp/prefix
|
export WINEPREFIX=/tmp/prefix
|
||||||
|
|
||||||
meson setup --buildtype=release --cross-file cross-wine.conf -Dwith-static-boost=true -Duse-bitbridge=true build
|
meson setup --buildtype=release --cross-file cross-wine.conf -Dwith-static-boost=true -Dwidth-bitbridge=true build
|
||||||
ninja -C build
|
ninja -C build
|
||||||
- name: Create an archive for the binaries
|
- name: Create an archive for the binaries
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
- When building from source, only statically link Boost when the
|
- When building from source, only statically link Boost when the
|
||||||
`with-static-boost` option is enabled.
|
`with-static-boost` option is enabled.
|
||||||
|
- The `use-bitbridge` and `use-winedbg` options have been replaced by
|
||||||
|
`with-bitbridge` and `with-winedbg` for consistency's sake. The old options
|
||||||
|
will be marked as deprecated in the next minor release.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -336,9 +336,9 @@ bit versions of the Boost and XCB libraries. This can then be set up as follows:
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Enable the bitbridge on an existing build
|
# Enable the bitbridge on an existing build
|
||||||
meson configure build -Duse-bitbridge=true
|
meson configure build -Dwidth-bitbridge=true
|
||||||
# Or configure a new build from scratch
|
# Or configure a new build from scratch
|
||||||
meson setup --buildtype=release --cross-file cross-wine.conf -Duse-bitbridge=true build
|
meson setup --buildtype=release --cross-file cross-wine.conf -Dwidth-bitbridge=true build
|
||||||
|
|
||||||
ninja -C build
|
ninja -C build
|
||||||
```
|
```
|
||||||
@@ -401,5 +401,5 @@ Other desktop environments and window managers will require some slight
|
|||||||
modifications in `src/plugin/plugin-bridge.cpp`. To enable this, simply run:
|
modifications in `src/plugin/plugin-bridge.cpp`. To enable this, simply run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
meson configure build --buildtype=debug -Duse-winedbg=true
|
meson configure build --buildtype=debug -Dwidth-winedbg=true
|
||||||
```
|
```
|
||||||
|
|||||||
+16
-9
@@ -31,13 +31,20 @@ group_host_name_32bit = 'yabridge-group-32'
|
|||||||
# https://github.com/boostorg/asio/issues/312
|
# https://github.com/boostorg/asio/issues/312
|
||||||
compiler_options = ['-DBOOST_ASIO_DISABLE_CONCEPTS']
|
compiler_options = ['-DBOOST_ASIO_DISABLE_CONCEPTS']
|
||||||
|
|
||||||
|
# TODO: Mark the `use-` versions of these options as deprecated in the next
|
||||||
|
# minor version
|
||||||
|
with_bitbridge = get_option('use-bitbridge') or get_option('with-bitbridge')
|
||||||
|
with_static_boost = get_option('with-static-boost')
|
||||||
|
with_winedbg = get_option('use-winedbg') or get_option('with-winedbg')
|
||||||
|
|
||||||
|
if with_bitbridge
|
||||||
|
compiler_options += '-DWITH_BITBRIDGE'
|
||||||
|
endif
|
||||||
|
|
||||||
# This provides an easy way to start the Wine VST host using winedbg since it
|
# This provides an easy way to start the Wine VST host using winedbg since it
|
||||||
# can be quite a pain to set up
|
# can be quite a pain to set up
|
||||||
if get_option('use-winedbg')
|
if with_winedbg
|
||||||
compiler_options += '-DUSE_WINEDBG'
|
compiler_options += '-DWITH_WINEDBG'
|
||||||
endif
|
|
||||||
if get_option('use-bitbridge')
|
|
||||||
compiler_options += '-DUSE_BITBRIDGE'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Generate header files for configuration variables such as the current git tag
|
# Generate header files for configuration variables such as the current git tag
|
||||||
@@ -46,12 +53,12 @@ subdir('src/common/config')
|
|||||||
|
|
||||||
# Statically link against Boost.Filesystem, otherwise it would become impossible
|
# Statically link against Boost.Filesystem, otherwise it would become impossible
|
||||||
# to distribute a prebuilt version of yabridge
|
# to distribute a prebuilt version of yabridge
|
||||||
boost_dep = dependency('boost', version : '>=1.66', static : get_option('with-static-boost'))
|
boost_dep = dependency('boost', version : '>=1.66', static : with_static_boost)
|
||||||
boost_filesystem_dep = dependency(
|
boost_filesystem_dep = dependency(
|
||||||
'boost',
|
'boost',
|
||||||
version : '>=1.66',
|
version : '>=1.66',
|
||||||
modules : ['filesystem'],
|
modules : ['filesystem'],
|
||||||
static : get_option('with-static-boost')
|
static : with_static_boost
|
||||||
)
|
)
|
||||||
bitsery_dep = subproject('bitsery').get_variable('bitsery_dep')
|
bitsery_dep = subproject('bitsery').get_variable('bitsery_dep')
|
||||||
threads_dep = dependency('threads')
|
threads_dep = dependency('threads')
|
||||||
@@ -142,7 +149,7 @@ executable(
|
|||||||
link_args : ['-m64']
|
link_args : ['-m64']
|
||||||
)
|
)
|
||||||
|
|
||||||
if get_option('use-bitbridge')
|
if with_bitbridge
|
||||||
message('Bitbridge enabled, configuring a 32-bit host application')
|
message('Bitbridge enabled, configuring a 32-bit host application')
|
||||||
|
|
||||||
# I honestly have no idea what the correct way is to have `dependency()` or
|
# I honestly have no idea what the correct way is to have `dependency()` or
|
||||||
@@ -153,7 +160,7 @@ if get_option('use-bitbridge')
|
|||||||
winegcc = meson.get_compiler('cpp', native : false)
|
winegcc = meson.get_compiler('cpp', native : false)
|
||||||
boost_filesystem_dep = winegcc.find_library(
|
boost_filesystem_dep = winegcc.find_library(
|
||||||
'boost_filesystem',
|
'boost_filesystem',
|
||||||
static : get_option('with-static-boost'),
|
static : with_static_boost,
|
||||||
dirs : [
|
dirs : [
|
||||||
# Used by Arch based distros
|
# Used by Arch based distros
|
||||||
'/usr/local/lib32',
|
'/usr/local/lib32',
|
||||||
|
|||||||
@@ -5,6 +5,13 @@ option(
|
|||||||
'use-bitbridge',
|
'use-bitbridge',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : false,
|
||||||
|
description : 'Alias for `with-bitbridge`, will be marked as deprecated in the next minor version.'
|
||||||
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
'with-bitbridge',
|
||||||
|
type : 'boolean',
|
||||||
|
value : false,
|
||||||
description : 'Build a 32-bit host application for hosting 32-bit plugins. See the readme for full instructions on how to use this.'
|
description : 'Build a 32-bit host application for hosting 32-bit plugins. See the readme for full instructions on how to use this.'
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -19,5 +26,12 @@ option(
|
|||||||
'use-winedbg',
|
'use-winedbg',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : false,
|
||||||
|
description : 'Alias for `with-winedbg`, will be marked as deprecated in the next minor version.'
|
||||||
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
'with-winedbg',
|
||||||
|
type : 'boolean',
|
||||||
|
value : false,
|
||||||
description : 'Whether to run the Wine VST host with GDB attached. Might not always be reliable.'
|
description : 'Whether to run the Wine VST host with GDB attached. Might not always be reliable.'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace fs = boost::filesystem;
|
|||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
bp::child launch_host(fs::path host_path, Args&&... args) {
|
bp::child launch_host(fs::path host_path, Args&&... args) {
|
||||||
return bp::child(
|
return bp::child(
|
||||||
#ifdef USE_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
// This is set up for KDE Plasma. Other desktop environments and
|
// This is set up for KDE Plasma. Other desktop environments and
|
||||||
// window managers require some slight modifications to spawn a
|
// window managers require some slight modifications to spawn a
|
||||||
// detached terminal emulator.
|
// detached terminal emulator.
|
||||||
@@ -85,7 +85,7 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
|
|||||||
plugin_arch(find_vst_architecture(plugin_path)),
|
plugin_arch(find_vst_architecture(plugin_path)),
|
||||||
host_path(find_vst_host(plugin_arch, false)),
|
host_path(find_vst_host(plugin_arch, false)),
|
||||||
host(launch_host(host_path,
|
host(launch_host(host_path,
|
||||||
#ifdef USE_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
plugin_path.filename(),
|
plugin_path.filename(),
|
||||||
#else
|
#else
|
||||||
plugin_path,
|
plugin_path,
|
||||||
@@ -94,13 +94,13 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
|
|||||||
bp::env = set_wineprefix(),
|
bp::env = set_wineprefix(),
|
||||||
bp::std_out = stdout_pipe,
|
bp::std_out = stdout_pipe,
|
||||||
bp::std_err = stderr_pipe
|
bp::std_err = stderr_pipe
|
||||||
#ifdef USE_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
, // winedbg has no reliable way to escape spaces, so
|
, // winedbg has no reliable way to escape spaces, so
|
||||||
// we'll start the process in the plugin's directory
|
// we'll start the process in the plugin's directory
|
||||||
bp::start_dir = plugin_path.parent_path()
|
bp::start_dir = plugin_path.parent_path()
|
||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
#ifdef USE_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
if (plugin_path.string().find(' ') != std::string::npos) {
|
if (plugin_path.string().find(' ') != std::string::npos) {
|
||||||
logger.log("Warning: winedbg does not support paths containing spaces");
|
logger.log("Warning: winedbg does not support paths containing spaces");
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ GroupHost::GroupHost(
|
|||||||
plugin_arch(find_vst_architecture(plugin_path)),
|
plugin_arch(find_vst_architecture(plugin_path)),
|
||||||
host_path(find_vst_host(plugin_arch, true)),
|
host_path(find_vst_host(plugin_arch, true)),
|
||||||
host_vst_dispatch(host_vst_dispatch) {
|
host_vst_dispatch(host_vst_dispatch) {
|
||||||
#ifdef USE_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
if (plugin_path.string().find(' ') != std::string::npos) {
|
if (plugin_path.string().find(' ') != std::string::npos) {
|
||||||
logger.log("Warning: winedbg does not support paths containing spaces");
|
logger.log("Warning: winedbg does not support paths containing spaces");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ PluginBridge::PluginBridge(audioMasterCallback host_callback)
|
|||||||
wine_io_handler([&]() { io_context.run(); }) {
|
wine_io_handler([&]() { io_context.run(); }) {
|
||||||
log_init_message();
|
log_init_message();
|
||||||
|
|
||||||
#ifndef USE_WINEDBG
|
#ifndef WITH_WINEDBG
|
||||||
// If the Wine process fails to start, then nothing will connect to the
|
// If the Wine process fails to start, then nothing will connect to the
|
||||||
// sockets and we'll be hanging here indefinitely. To prevent this, we'll
|
// sockets and we'll be hanging here indefinitely. To prevent this, we'll
|
||||||
// periodically poll whether the Wine process is still running, and throw
|
// periodically poll whether the Wine process is still running, and throw
|
||||||
@@ -622,13 +622,13 @@ void PluginBridge::log_init_message() {
|
|||||||
// Include a list of enabled compile-tiem features, mostly to make debug
|
// Include a list of enabled compile-tiem features, mostly to make debug
|
||||||
// logs more useful
|
// logs more useful
|
||||||
init_msg << "Enabled features:" << std::endl;
|
init_msg << "Enabled features:" << std::endl;
|
||||||
#ifdef USE_BITBRIDGE
|
#ifdef WITH_BITBRIDGE
|
||||||
init_msg << "- bitbridge support" << std::endl;
|
init_msg << "- bitbridge support" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
init_msg << "- winedbg" << std::endl;
|
init_msg << "- winedbg" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
#if !(defined(USE_BITBRIDGE) || defined(USE_WINEDBG))
|
#if !(defined(WITH_BITBRIDGE) || defined(WITH_WINEDBG))
|
||||||
init_msg << " <none>" << std::endl;
|
init_msg << " <none>" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
init_msg << std::endl;
|
init_msg << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user