Add another flag for enabling a bit bridge build

This commit is contained in:
Robbert van der Helm
2020-04-29 16:54:26 +02:00
parent 7ce42e4306
commit c9060e984d
7 changed files with 118 additions and 43 deletions
+30
View File
@@ -0,0 +1,30 @@
// yabridge: a Wine VST bridge
// Copyright (C) 2020 Robbert van der Helm
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#pragma once
/**
* The name of the wine host name, e.g. `yabridge-host.exe` for the regular 64
* bit build.
*/
constexpr char yabridge_wine_host_name[] = "@host_binary_64bit@";
/**
* The name of the 32-bit wine host name, e.g. `yabridge-host-32.exe`.` This is
* used as a bitbridge to be able to load legacy 32-bit only Windows plugins
* from a 64-bit Linux host.
*/
constexpr char yabridge_wine_host_name_32bit[] = "@host_binary_32bit@";
+13
View File
@@ -1,3 +1,16 @@
# Contains constants determined while configuring the build. As an alternative
# to preprocessor macros.
config_header = configure_file(
input : 'config.h.in',
output : 'config.h',
configuration : configuration_data(
{
'host_binary_32bit': host_name_32bit + '.exe',
'host_binary_64bit': host_name_64bit + '.exe',
}
)
)
# Generate a file containing the last annotated git tag and possibly also the
# amount of commits since then and the hash of the last commit
version_header = vcs_tag(
+3 -5
View File
@@ -30,6 +30,7 @@
#endif
// Generated inside of build directory
#include <src/common/config/config.h>
#include <src/common/config/version.h>
#include "../common/communication.h"
@@ -40,11 +41,6 @@ namespace bp = boost::process;
// boost::filesystem
namespace fs = boost::filesystem;
/**
* The name of the wine VST host binary.
*/
constexpr auto yabridge_wine_host_name = "yabridge-host.exe";
/**
* Used for generating random identifiers.
*/
@@ -500,6 +496,8 @@ fs::path find_wine_vst_host() {
return host_path;
}
// TODO: First, check whether the plugin is 32-bit or 64-bit, and then
// search for the correct binary accordingly
// Bosot will return an empty path if the file could not be found in the
// search path
const fs::path vst_host_path = bp::search_path(yabridge_wine_host_name);