Browse Source

Fix building with mingw but not for linux+wine usage

tags/1.9.6
falkTX 10 years ago
parent
commit
971c84132e
4 changed files with 7 additions and 9 deletions
  1. +2
    -2
      data/windows/build-win32.sh
  2. +2
    -2
      data/windows/build-win64.sh
  3. +1
    -1
      source/utils/CarlaBridgeUtils.hpp
  4. +2
    -4
      source/utils/CarlaShmUtils.hpp

+ 2
- 2
data/windows/build-win32.sh View File

@@ -23,8 +23,8 @@ export CC=$MINGW-gcc
export CXX=$MINGW-g++ export CXX=$MINGW-g++
export WINDRES=$MINGW-windres export WINDRES=$MINGW-windres


export CFLAGS="-DPTW32_STATIC_LIB"
export CXXFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL"
export CFLAGS="-DBUILDING_CARLA_FOR_WINDOWS -DPTW32_STATIC_LIB"
export CXXFLAGS="$CFLAGS -DFLUIDSYNTH_NOT_A_DLL"
unset CPPFLAGS unset CPPFLAGS
unset LDFLAGS unset LDFLAGS




+ 2
- 2
data/windows/build-win64.sh View File

@@ -24,8 +24,8 @@ export CC=$MINGW-gcc
export CXX=$MINGW-g++ export CXX=$MINGW-g++
export WINDRES=$MINGW-windres export WINDRES=$MINGW-windres


export CFLAGS="-DPTW32_STATIC_LIB"
export CXXFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL"
export CFLAGS="-DBUILDING_CARLA_FOR_WINDOWS -DPTW32_STATIC_LIB"
export CXXFLAGS="$CFLAGS -DFLUIDSYNTH_NOT_A_DLL"
unset CPPFLAGS unset CPPFLAGS
unset LDFLAGS unset LDFLAGS




+ 1
- 1
source/utils/CarlaBridgeUtils.hpp View File

@@ -20,7 +20,7 @@


#include "CarlaRingBuffer.hpp" #include "CarlaRingBuffer.hpp"


#ifdef CARLA_OS_WIN
#if defined(CARLA_OS_WIN) && defined(BUILDING_CARLA_FOR_WINDOWS)
# define PLUGIN_BRIDGE_NAMEPREFIX_AUDIO_POOL "Global\\carla-bridge_shm_ap_" # define PLUGIN_BRIDGE_NAMEPREFIX_AUDIO_POOL "Global\\carla-bridge_shm_ap_"
# define PLUGIN_BRIDGE_NAMEPREFIX_RT_CLIENT "Global\\carla-bridge_shm_rtC_" # define PLUGIN_BRIDGE_NAMEPREFIX_RT_CLIENT "Global\\carla-bridge_shm_rtC_"
# define PLUGIN_BRIDGE_NAMEPREFIX_NON_RT_CLIENT "Global\\carla-bridge_shm_nonrtC_" # define PLUGIN_BRIDGE_NAMEPREFIX_NON_RT_CLIENT "Global\\carla-bridge_shm_nonrtC_"


+ 2
- 4
source/utils/CarlaShmUtils.hpp View File

@@ -88,8 +88,7 @@ shm_t carla_shm_create(const char* const filename) noexcept
::shm_unlink(filename); ::shm_unlink(filename);
ret.fd = -1; ret.fd = -1;
} }
}
CARLA_SAFE_EXCEPTION_RETURN("carla_shm_create", gNullCarlaShm);
} CARLA_SAFE_EXCEPTION_RETURN("carla_shm_create", gNullCarlaShm);
#endif #endif


return ret; return ret;
@@ -114,8 +113,7 @@ shm_t carla_shm_attach(const char* const filename) noexcept
ret.fd = ::shm_open(filename, O_RDWR, 0); ret.fd = ::shm_open(filename, O_RDWR, 0);
ret.filename = nullptr; ret.filename = nullptr;
ret.size = 0; ret.size = 0;
}
CARLA_SAFE_EXCEPTION_RETURN("carla_shm_attach", gNullCarlaShm);
} CARLA_SAFE_EXCEPTION_RETURN("carla_shm_attach", gNullCarlaShm);
#endif #endif


return ret; return ret;


Loading…
Cancel
Save