Make it no longer needed to do "make BUILDING_FOR_WINDOWS=true"

This commit is contained in:
falkTX 2020-12-15 12:05:41 +00:00
parent 626dd57515
commit 8d9e0c13d6
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
7 changed files with 28 additions and 20 deletions

View File

@ -339,10 +339,14 @@ LIBS_WIN32 += $(MODULEDIR)/juce_gui_extra.win32.a
endif
endif
win32: $(LIBS_WIN32)
win32r: $(LIBS_WIN32)
$(MAKE) -C source/bridges-plugin win32
$(MAKE) -C source/discovery win32
win32: $(LIBS_WIN32)
$(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win32
$(MAKE) BUILDING_FOR_WINE=true -C source/discovery win32
# ---------------------------------------------------------------------------------------------------------------------
# Binaries (win64)
@ -368,10 +372,14 @@ LIBS_WIN64 += $(MODULEDIR)/juce_gui_extra.win64.a
endif
endif
win64: $(LIBS_WIN64)
win64r: $(LIBS_WIN64)
$(MAKE) -C source/bridges-plugin win64
$(MAKE) -C source/discovery win64
win64: $(LIBS_WIN64)
$(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
$(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
# ---------------------------------------------------------------------------------------------------------------------
# Binaries (wine)

View File

@ -90,7 +90,7 @@ make ${MAKE_ARGS}
if [ x"${ARCH}" != x"32" ]; then
export_vars "32" "32" "i686"
make ${MAKE_ARGS} win32
make ${MAKE_ARGS} win32r
fi
# Testing:

View File

@ -184,8 +184,8 @@ ifeq ($(WIN32),true)
BASE_OPTS += -fno-rerun-cse-after-loop
# See https://github.com/falkTX/Carla/issues/855
BASE_OPTS += -mstackrealign
ifeq ($(BUILDING_FOR_WINDOWS),true)
BASE_FLAGS += -DBUILDING_CARLA_FOR_WINDOWS
ifeq ($(BUILDING_FOR_WINE),true)
BASE_FLAGS += -DBUILDING_CARLA_FOR_WINE
endif
else
# Not needed for Windows

View File

@ -380,7 +380,7 @@ int main(int argc, char* argv[])
return 1;
}
#if defined(CARLA_OS_WIN) && ! defined(BUILDING_CARLA_FOR_WINDOWS)
#if defined(CARLA_OS_WIN) && defined(BUILDING_CARLA_FOR_WINE)
// ---------------------------------------------------------------------
// Test if bridge is working

View File

@ -1,7 +1,7 @@
/*
* Cross-platform C++ library for Carla, based on Juce v4
* Copyright (C) 2015 ROLI Ltd.
* Copyright (C) 2017-2018 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2017-2020 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -44,7 +44,7 @@ HINSTANCE getCurrentModuleInstanceHandle() noexcept
#include "text/StringArray.cpp"
#include "text/String.cpp"
#if defined(DEBUG) || defined(BUILDING_CARLA_FOR_WINDOWS)
#if defined(DEBUG) || !defined(BUILDING_CARLA_FOR_WINE)
# include "files/FileInputStream.cpp"
# include "files/FileOutputStream.cpp"
# include "files/TemporaryFile.cpp"

View File

@ -1,6 +1,6 @@
/*
* Carla Bridge utils
* Copyright (C) 2013-2017 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2020 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -21,7 +21,7 @@
// must be last
#include "jackbridge/JackBridge.hpp"
#if defined(CARLA_OS_WIN) && defined(BUILDING_CARLA_FOR_WINDOWS)
#if defined(CARLA_OS_WIN) && !defined(BUILDING_CARLA_FOR_WINE)
# define PLUGIN_BRIDGE_NAMEPREFIX_AUDIO_POOL "Local\\carla-bridge_shm_ap_"
# define PLUGIN_BRIDGE_NAMEPREFIX_RT_CLIENT "Local\\carla-bridge_shm_rtC_"
# define PLUGIN_BRIDGE_NAMEPREFIX_NON_RT_CLIENT "Local\\carla-bridge_shm_nonrtC_"

View File

@ -1,6 +1,6 @@
/*
* Carla Plugin UI
* Copyright (C) 2014-2018 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2014-2020 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -750,12 +750,12 @@ public:
// winFlags |= WS_SIZEBOX;
}
#ifdef BUILDING_CARLA_FOR_WINDOWS
const uint winType = WS_EX_TOOLWINDOW;
const HWND parent = (HWND)parentId;
#else
#ifdef BUILDING_CARLA_FOR_WINE
const uint winType = WS_EX_DLGMODALFRAME;
const HWND parent = nullptr;
#else
const uint winType = WS_EX_TOOLWINDOW;
const HWND parent = (HWND)parentId;
#endif
fWindow = CreateWindowEx(winType,
@ -775,14 +775,14 @@ public:
SetWindowLongPtr(fWindow, GWLP_USERDATA, (LONG_PTR)this);
#ifdef BUILDING_CARLA_FOR_WINDOWS
#ifndef BUILDING_CARLA_FOR_WINE
if (parentId != 0)
setTransientWinId(parentId);
#else
return;
// unused
(void)parentId;
#endif
return;
// maybe unused
(void)parentId;
}
~WindowsPluginUI() override