From 59015f84ae9e0816c45e9b1aaa827a61395aa1a1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 18 Aug 2022 03:23:56 -0400 Subject: Fix fallback configuration on MacOS --- meson.build | 2 +- src/UIFile.hpp | 4 ++-- src/patchage_config.h | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 0ea228a..20642d8 100644 --- a/meson.build +++ b/meson.build @@ -59,7 +59,7 @@ int main(void) { return !!&jack_set_property; }''' if cpp.compiles(dladdr_code, args: platform_defines, name: 'dladdr') platform_defines += [ '-DHAVE_DLADDR=1', - '-DPATCHAGE_BINLOC=1', + '-DPATCHAGE_BUNDLED=1', ] else platform_defines += ['-DHAVE_DLADDR=0'] diff --git a/src/UIFile.hpp b/src/UIFile.hpp index 6eb9d9c..6fc4b94 100644 --- a/src/UIFile.hpp +++ b/src/UIFile.hpp @@ -6,7 +6,7 @@ #include "patchage_config.h" -#ifdef PATCHAGE_BINLOC +#if PATCHAGE_BUNDLED # include "binary_location.h" #endif @@ -37,7 +37,7 @@ public: std::cout << "Base name: " << base_name << std::endl; std::string ui_filename = base_name + ".ui"; -#ifdef PATCHAGE_BINLOC +#if PATCHAGE_BUNDLED const std::string bundle = bundle_location(); if (!bundle.empty()) { const std::string bundle_ui_filename = bundle + "/" + ui_filename; diff --git a/src/patchage_config.h b/src/patchage_config.h index e0d0ff0..1797539 100644 --- a/src/patchage_config.h +++ b/src/patchage_config.h @@ -85,4 +85,12 @@ # define PATCHAGE_USE_LIGHT_THEME 0 #endif +#ifndef PATCHAGE_BUNDLED +# ifdef __APPLE__ +# define PATCHAGE_BUNDLED 1 +# else +# define PATCHAGE_BUNDLED 0 +# endif +#endif + #endif // PATCHAGE_CONFIG_H -- cgit v1.2.1