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:
Robbert van der Helm
2020-06-08 15:59:28 +02:00
parent 9385360331
commit c4842ccda6
7 changed files with 47 additions and 23 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ jobs:
# 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
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
- name: Create an archive for the binaries
run: |
@@ -91,7 +91,7 @@ jobs:
mkdir -p /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
- name: Create an archive for the binaries
run: |
+3
View File
@@ -12,6 +12,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
- When building from source, only statically link Boost when the
`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
+3 -3
View File
@@ -336,9 +336,9 @@ bit versions of the Boost and XCB libraries. This can then be set up as follows:
```shell
# 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
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
```
@@ -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:
```shell
meson configure build --buildtype=debug -Duse-winedbg=true
meson configure build --buildtype=debug -Dwidth-winedbg=true
```
+16 -9
View File
@@ -31,13 +31,20 @@ group_host_name_32bit = 'yabridge-group-32'
# https://github.com/boostorg/asio/issues/312
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
# can be quite a pain to set up
if get_option('use-winedbg')
compiler_options += '-DUSE_WINEDBG'
endif
if get_option('use-bitbridge')
compiler_options += '-DUSE_BITBRIDGE'
if with_winedbg
compiler_options += '-DWITH_WINEDBG'
endif
# 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
# 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',
version : '>=1.66',
modules : ['filesystem'],
static : get_option('with-static-boost')
static : with_static_boost
)
bitsery_dep = subproject('bitsery').get_variable('bitsery_dep')
threads_dep = dependency('threads')
@@ -142,7 +149,7 @@ executable(
link_args : ['-m64']
)
if get_option('use-bitbridge')
if with_bitbridge
message('Bitbridge enabled, configuring a 32-bit host application')
# 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)
boost_filesystem_dep = winegcc.find_library(
'boost_filesystem',
static : get_option('with-static-boost'),
static : with_static_boost,
dirs : [
# Used by Arch based distros
'/usr/local/lib32',
+14
View File
@@ -5,6 +5,13 @@ option(
'use-bitbridge',
type : 'boolean',
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.'
)
@@ -19,5 +26,12 @@ option(
'use-winedbg',
type : 'boolean',
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.'
)
+5 -5
View File
@@ -36,7 +36,7 @@ namespace fs = boost::filesystem;
template <typename... Args>
bp::child launch_host(fs::path host_path, Args&&... args) {
return bp::child(
#ifdef USE_WINEDBG
#ifdef WITH_WINEDBG
// This is set up for KDE Plasma. Other desktop environments and
// window managers require some slight modifications to spawn a
// detached terminal emulator.
@@ -85,7 +85,7 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
plugin_arch(find_vst_architecture(plugin_path)),
host_path(find_vst_host(plugin_arch, false)),
host(launch_host(host_path,
#ifdef USE_WINEDBG
#ifdef WITH_WINEDBG
plugin_path.filename(),
#else
plugin_path,
@@ -94,13 +94,13 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
bp::env = set_wineprefix(),
bp::std_out = stdout_pipe,
bp::std_err = stderr_pipe
#ifdef USE_WINEDBG
#ifdef WITH_WINEDBG
, // winedbg has no reliable way to escape spaces, so
// we'll start the process in the plugin's directory
bp::start_dir = plugin_path.parent_path()
#endif
)) {
#ifdef USE_WINEDBG
#ifdef WITH_WINEDBG
if (plugin_path.string().find(' ') != std::string::npos) {
logger.log("Warning: winedbg does not support paths containing spaces");
}
@@ -135,7 +135,7 @@ GroupHost::GroupHost(
plugin_arch(find_vst_architecture(plugin_path)),
host_path(find_vst_host(plugin_arch, true)),
host_vst_dispatch(host_vst_dispatch) {
#ifdef USE_WINEDBG
#ifdef WITH_WINEDBG
if (plugin_path.string().find(' ') != std::string::npos) {
logger.log("Warning: winedbg does not support paths containing spaces");
}
+4 -4
View File
@@ -78,7 +78,7 @@ PluginBridge::PluginBridge(audioMasterCallback host_callback)
wine_io_handler([&]() { io_context.run(); }) {
log_init_message();
#ifndef USE_WINEDBG
#ifndef WITH_WINEDBG
// 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
// 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
// logs more useful
init_msg << "Enabled features:" << std::endl;
#ifdef USE_BITBRIDGE
#ifdef WITH_BITBRIDGE
init_msg << "- bitbridge support" << std::endl;
#endif
#ifdef USE_WINEDBG
#ifdef WITH_WINEDBG
init_msg << "- winedbg" << std::endl;
#endif
#if !(defined(USE_BITBRIDGE) || defined(USE_WINEDBG))
#if !(defined(WITH_BITBRIDGE) || defined(WITH_WINEDBG))
init_msg << " <none>" << std::endl;
#endif
init_msg << std::endl;