Browse Source

Fix lv2 ttl generation for static builds

Signed-off-by: falkTX <falktx@falktx.com>
pull/367/head
falkTX 3 years ago
parent
commit
e9f41ad997
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 15 additions and 1 deletions
  1. +15
    -1
      distrho/src/DistrhoPluginLV2export.cpp

+ 15
- 1
distrho/src/DistrhoPluginLV2export.cpp View File

@@ -42,6 +42,10 @@
# include "mod-license.h"
#endif

#ifndef DISTRHO_OS_WINDOWS
# include <unistd.h>
#endif

#include <fstream>
#include <iostream>

@@ -225,7 +229,17 @@ void lv2_generate_ttl(const char* const basename)
USE_NAMESPACE_DISTRHO

String bundlePath(getBinaryFilename());
bundlePath.truncate(bundlePath.rfind(DISTRHO_OS_SEP));
if (bundlePath.isNotEmpty())
{
bundlePath.truncate(bundlePath.rfind(DISTRHO_OS_SEP));
}
#ifndef DISTRHO_OS_WINDOWS
else if (char* const cwd = ::getcwd(nullptr, 0))
{
bundlePath = cwd;
std::free(cwd);
}
#endif
d_nextBundlePath = bundlePath.buffer();

// Dummy plugin to get data from


Loading…
Cancel
Save