diff --git a/Makefile b/Makefile index b9e0a1815..255beda6f 100644 --- a/Makefile +++ b/Makefile @@ -340,6 +340,10 @@ else $(MAKE) -C source/discovery win64 endif +mingw64: + $(MAKE) AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ win32 + $(MAKE) AR=x86_64-w64-mingw32-ar CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ win64 + # --------------------------------------------------------------------------------------------------------------------- # Binaries (wine) diff --git a/source/backend/utils/PluginDiscovery.cpp b/source/backend/utils/PluginDiscovery.cpp index b34943ca3..78f34125f 100644 --- a/source/backend/utils/PluginDiscovery.cpp +++ b/source/backend/utils/PluginDiscovery.cpp @@ -448,7 +448,7 @@ private: if (envWinePrefix != nullptr && envWinePrefix[0] != '\0') winePrefix = envWinePrefix; - else if (options.wine.fallbackPrefix.isNotEmpty() && options.wine.fallbackPrefix[0] != '\0') + else if (options.wine.fallbackPrefix.isNotEmpty()) winePrefix = options.wine.fallbackPrefix.buffer(); else winePrefix = File::getSpecialLocation(File::userHomeDirectory).getFullPathName() + "/.wine"; @@ -713,6 +713,9 @@ CarlaPluginDiscoveryHandle carla_plugin_discovery_start(const char* const discov CARLA_SAFE_ASSERT_RETURN(ptype != CB::PLUGIN_NONE, nullptr); CARLA_SAFE_ASSERT_RETURN(discoveryTool != nullptr && discoveryTool[0] != '\0', nullptr); CARLA_SAFE_ASSERT_RETURN(discoveryCb != nullptr, nullptr); + carla_debug("carla_plugin_discovery_start(%s, %d:%s, %d:%s, %s, %p, %p, %p)", + discoveryTool, btype, BinaryType2Str(btype), ptype, PluginType2Str(ptype), pluginPath, + discoveryCb, checkCacheCb, callbackPtr); bool directories = false; const char* wildcard = nullptr; diff --git a/source/frontend/carla_shared.py b/source/frontend/carla_shared.py index e22b64ac6..decb4a305 100644 --- a/source/frontend/carla_shared.py +++ b/source/frontend/carla_shared.py @@ -525,11 +525,14 @@ if not WINDOWS: if os.path.exists(winePrefix): DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files/VstPlugins" + DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files/VSTPlugins" + DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST2" DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3" DEFAULT_CLAP_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/CLAP" if kIs64bit and os.path.exists(winePrefix + "/drive_c/Program Files (x86)"): DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins" + DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VSTPlugins" DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3" DEFAULT_CLAP_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/CLAP" diff --git a/source/frontend/pluginlist/pluginlistdialog.cpp b/source/frontend/pluginlist/pluginlistdialog.cpp index 3799a9892..3d5a20ac9 100644 --- a/source/frontend/pluginlist/pluginlistdialog.cpp +++ b/source/frontend/pluginlist/pluginlistdialog.cpp @@ -693,7 +693,7 @@ struct PluginListDialog::PrivateData { handle = nullptr; } - if (!usePluginBridges) + if (! usePluginBridges) return false; #ifdef CARLA_OS_WIN @@ -729,7 +729,7 @@ struct PluginListDialog::PrivateData { } #endif - if (!useWineBridges) + if (! useWineBridges) return false; // try wine bridges @@ -1294,23 +1294,13 @@ void PluginListDialog::timerEvent(QTimerEvent* const event) #endif default: // discovery complete? - for (;;) - { - #ifndef CARLA_FRONTEND_ONLY_EMBEDDABLE_PLUGINS - if (p->discovery.nextTool()) - { - // tool has nothing to search, go to next one - if (p->discovery.ptype == PLUGIN_NONE) - continue; - - // there is still to do, break out of loop - break; - } - #endif - - refreshPluginsStop(); - break; - } + #ifndef CARLA_FRONTEND_ONLY_EMBEDDABLE_PLUGINS + if (p->discovery.nextTool()) + continue; + #endif + + refreshPluginsStop(); + break; } if (p->timerId == 0) diff --git a/source/jackbridge/Makefile b/source/jackbridge/Makefile index 2294e2581..88cc2bdfa 100644 --- a/source/jackbridge/Makefile +++ b/source/jackbridge/Makefile @@ -24,15 +24,17 @@ BUILD_CXX_FLAGS += -I../modules endif endif -WINE_32BIT_FLAGS = $(32BIT_FLAGS) -fpermissive -WINE_64BIT_FLAGS = $(64BIT_FLAGS) -fpermissive -WINE_BUILD_FLAGS = $(filter-out -flto,$(BUILD_CXX_FLAGS)) -WINE_LINK_FLAGS = $(filter-out -flto -static-libgcc -static-libstdc++,$(LINK_FLAGS)) -WINE_LINK_FLAGS += -nostartfiles -WINE_LINK_FLAGS += $(LIBDL_LIBS) -WINE_LINK_FLAGS += -pthread -WINE_LINK_FLAGS += -lpthread -WINE_LINK_FLAGS += -lstdc++ +WINE_32BIT_FLAGS = $(32BIT_FLAGS) -fpermissive +WINE_64BIT_FLAGS = $(64BIT_FLAGS) -fpermissive +WINE_BUILD_FLAGS = $(filter-out -flto,$(BUILD_CXX_FLAGS)) +WINE_BUILD_FLAGS += -fno-use-cxa-atexit +WINE_LINK_FLAGS = $(filter-out -flto -static-libgcc -static-libstdc++,$(LINK_FLAGS)) +WINE_LINK_FLAGS += -fno-use-cxa-atexit +WINE_LINK_FLAGS += -nostartfiles +WINE_LINK_FLAGS += $(LIBDL_LIBS) +WINE_LINK_FLAGS += -pthread +WINE_LINK_FLAGS += -lpthread +WINE_LINK_FLAGS += -lstdc++ ifneq ($(MACOS),true) WINE_32BIT_FLAGS += -I/usr/include/wine/wine/windows