Browse Source

Adjust installed utils to work without any special macros

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
2a96e743b0
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 9 additions and 3 deletions
  1. +2
    -0
      source/backend/utils/CarlaUtils.cpp
  2. +7
    -3
      source/utils/CarlaBinaryUtils.hpp

+ 2
- 0
source/backend/utils/CarlaUtils.cpp View File

@@ -17,6 +17,8 @@


#include "CarlaUtils.hpp" #include "CarlaUtils.hpp"


#include "CarlaProcessUtils.cpp"

#ifndef CARLA_OS_WASM #ifndef CARLA_OS_WASM
# include "CarlaBridgeUtils.cpp" # include "CarlaBridgeUtils.cpp"
#endif #endif


+ 7
- 3
source/utils/CarlaBinaryUtils.hpp View File

@@ -21,11 +21,11 @@
#include "CarlaBackend.h" #include "CarlaBackend.h"
#include "CarlaScopeUtils.hpp" #include "CarlaScopeUtils.hpp"


#if defined(CARLA_UTILS_USE_QT)
#if defined(BUILDING_CARLA)
# include "water/files/FileInputStream.h"
#elif defined(CARLA_UTILS_USE_QT)
# include <QtCore/QFile> # include <QtCore/QFile>
# include <QtCore/QString> # include <QtCore/QString>
#else
# include "water/files/FileInputStream.h"
#endif #endif


#if defined(HAVE_LIBMAGIC) && ! defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) #if defined(HAVE_LIBMAGIC) && ! defined(BUILD_BRIDGE_ALTERNATIVE_ARCH)
@@ -132,6 +132,7 @@ BinaryType getBinaryTypeFromFile(const char* const filename)
} }
#endif #endif


#if defined(BUILDING_CARLA) || defined(CARLA_UTILS_USE_QT)
#if defined(CARLA_UTILS_USE_QT) #if defined(CARLA_UTILS_USE_QT)
QFile file(QString::fromUtf8(filename)); QFile file(QString::fromUtf8(filename));
CARLA_SAFE_ASSERT_RETURN(file.open(QIODevice::ReadOnly), BINARY_NATIVE); CARLA_SAFE_ASSERT_RETURN(file.open(QIODevice::ReadOnly), BINARY_NATIVE);
@@ -192,6 +193,9 @@ BinaryType getBinaryTypeFromFile(const char* const filename)
default: default:
return BINARY_NATIVE; return BINARY_NATIVE;
} }
#else
return BINARY_NATIVE;
#endif
} }


// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------


Loading…
Cancel
Save