Browse Source

hardcode flatpak plugin paths

audio_region_bpm_change_fix
parent
commit
e2615094dc
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      data/meson.build
  2. 3
      data/zrythm_launch.in
  3. 8
      meson.build
  4. 6
      meson_options.txt
  5. 20
      src/plugins/plugin_manager.c

2
data/meson.build

@ -55,7 +55,7 @@ zrythm_launcher_config.set ('LIBDIR', libdir) @@ -55,7 +55,7 @@ zrythm_launcher_config.set ('LIBDIR', libdir)
zrythm_launcher_config.set (
'LD_LIBRARY_PATH_ENV',
os_darwin ? 'DYLD_LIBRARY_PATH' : 'LD_LIBRARY_PATH')
zrythm_launcher_config.set ('FLATPAK_BUILD', get_option ('for_flathub') ? '1' : '0')
zrythm_launcher_config.set ('FLATPAK_BUILD', flatpak_build ? '1' : '0')
# install desktop file and launcher scripts
if os_gnu or os_freebsd or os_darwin

3
data/zrythm_launch.in

@ -17,7 +17,8 @@ @@ -17,7 +17,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
if [ "@FLATPAK_BUILD@" != "1" ]; then
flatpak_build="@FLATPAK_BUILD@"
if [ "$flatpak_build" != "1" ]; then
jack_path=$(dirname $(ldconfig -p | grep 'libjack.so ' | head -n 1 | cut -d ' ' -f 4))
export @LD_LIBRARY_PATH_ENV@="@ZRYTHM_CARLA_LIBDIR@:@ZRYTHM_LIBDIR@:$jack_path:@LIBDIR@:$@LD_LIBRARY_PATH_ENV@"

8
meson.build

@ -130,6 +130,8 @@ sourceviewstylesdir = zrythmdatadir / 'sourceview-styles' @@ -130,6 +130,8 @@ sourceviewstylesdir = zrythmdatadir / 'sourceview-styles'
resources_dir = meson_src_root / 'resources'
data_dir = meson_src_root / 'data'
flatpak_build = get_option ('for_flathub') or get_option ('flatpak')
# Used for building manpages, manual, etc., using
# foreach.
# The actual languages to use are specified in
@ -414,6 +416,12 @@ cdata.set_quoted ('CONFIGURE_BINDIR', bindir) @@ -414,6 +416,12 @@ cdata.set_quoted ('CONFIGURE_BINDIR', bindir)
cdata.set_quoted ('LIB_SUFFIX', lib_suffix)
cdata.set_quoted ('BIN_SUFFIX', bin_suffix)
cdata.set_quoted ('GSCHEMAS_DIR', schemasdir)
if flatpak_build
cdata.set ('FLATPAK_BUILD', 1)
endif
if get_option ('for_flathub')
cdata.set ('FOR_FLATHUB', 1)
endif
if get_option ('dseg_font')
cdata.set ('HAVE_BUNDLED_DSEG', 1)
endif

6
meson_options.txt

@ -253,3 +253,9 @@ option ( @@ -253,3 +253,9 @@ option (
type: 'boolean',
value: false,
description: 'Whether building for Flathub.')
option (
'flatpak',
type: 'boolean',
value: false,
description: 'Whether building a Flatpak package.')

20
src/plugins/plugin_manager.c

@ -228,6 +228,14 @@ create_and_load_lilv_word ( @@ -228,6 +228,14 @@ create_and_load_lilv_word (
}
else
{
#ifdef FLATPAK_BUILD
self->lv2_path =
g_strdup_printf (
"%s/.lv2:/app/lib/lv2:"
"/app/extensions/Plugins/lv2:%s",
g_get_home_dir (),
builtin_plugins_path);
#else
if (string_is_equal (LIBDIR_NAME, "lib"))
{
self->lv2_path =
@ -249,7 +257,9 @@ create_and_load_lilv_word ( @@ -249,7 +257,9 @@ create_and_load_lilv_word (
g_get_home_dir (),
builtin_plugins_path);
}
#endif /* flatpak build */
}
g_return_if_fail (self->lv2_path);
/* add zrythm custom path for installer */
@ -461,6 +471,10 @@ get_vst_paths ( @@ -461,6 +471,10 @@ get_vst_paths (
g_strdup (getenv ("VST_PATH"));
if (!vst_path || (strlen (vst_path) == 0))
{
#ifdef FLATPAK_BUILD
vst_path =
g_strdup ("/app/extensions/Plugins/lxvst");
#else
if (string_is_equal (LIBDIR_NAME, "lib"))
{
vst_path =
@ -481,6 +495,7 @@ get_vst_paths ( @@ -481,6 +495,7 @@ get_vst_paths (
"/usr/local/" LIBDIR_NAME "/vst",
g_get_home_dir (), g_get_home_dir ());
}
#endif
g_message (
"Using standard VST paths: %s", vst_path);
@ -523,6 +538,10 @@ get_vst3_paths ( @@ -523,6 +538,10 @@ get_vst3_paths (
g_strdup (getenv ("VST3_PATH"));
if (!vst_path || (strlen (vst_path) == 0))
{
#ifdef FLATPAK_BUILD
vst_path =
g_strdup ("/app/extensions/Plugins/vst3");
#else
if (string_is_equal (LIBDIR_NAME, "lib"))
{
vst_path =
@ -543,6 +562,7 @@ get_vst3_paths ( @@ -543,6 +562,7 @@ get_vst3_paths (
"/usr/local/" LIBDIR_NAME "/vst3",
g_get_home_dir ());
}
#endif
g_message (
"Using standard VST3 paths: %s", vst_path);

Loading…
Cancel
Save