From c89a5959522a3f050d692704b9d56662ad9c8627 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 9 Jan 2019 14:37:53 +1100 Subject: [PATCH] isolate winvst to windows --- olive.pro | 5 +++-- project/effect.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/olive.pro b/olive.pro index 08c6e558a..b514c823f 100644 --- a/olive.pro +++ b/olive.pro @@ -118,7 +118,6 @@ SOURCES += \ project/keyframe.cpp \ ui/rectangleselect.cpp \ dialogs/actionsearch.cpp \ - effects/internal/vsthostwin.cpp \ ui/embeddedfilechooser.cpp \ effects/internal/fillleftrighteffect.cpp @@ -208,7 +207,6 @@ HEADERS += \ project/keyframe.h \ ui/rectangleselect.h \ dialogs/actionsearch.h \ - effects/internal/vsthostwin.h \ ui/embeddedfilechooser.h \ effects/internal/fillleftrighteffect.h @@ -217,6 +215,9 @@ FORMS += win32 { RC_FILE = packaging/windows/resources.rc LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 -luser32 + + SOURCES += effects/internal/vsthostwin.cpp + HEADERS += effects/internal/vsthostwin.h } mac { diff --git a/project/effect.cpp b/project/effect.cpp index 64ccefbc5..9a872d57f 100644 --- a/project/effect.cpp +++ b/project/effect.cpp @@ -28,7 +28,9 @@ #include "effects/internal/paneffect.h" #include "effects/internal/shakeeffect.h" #include "effects/internal/cornerpineffect.h" +#ifdef _WIN32 #include "effects/internal/vsthostwin.h" +#endif #include "effects/internal/fillleftrighteffect.h" #include @@ -63,7 +65,9 @@ Effect* create_effect(Clip* c, const EffectMeta* em) { case EFFECT_INTERNAL_SHAKE: return new ShakeEffect(c, em); case EFFECT_INTERNAL_CORNERPIN: return new CornerPinEffect(c, em); case EFFECT_INTERNAL_FILLLEFTRIGHT: return new FillLeftRightEffect(c, em); +#ifdef _WIN32 case EFFECT_INTERNAL_VST: return new VSTHostWin(c, em); +#endif } } else { dout << "[ERROR] Invalid effect data"; @@ -96,9 +100,11 @@ void load_internal_effects() { em.internal = EFFECT_INTERNAL_PAN; effects.append(em); +#ifdef _WIN32 em.name = "VST Plugin 2.x"; em.internal = EFFECT_INTERNAL_VST; effects.append(em); +#endif em.name = "Tone"; em.internal = EFFECT_INTERNAL_TONE;