From 782ebc8721fbe3965f5023e561564cf95eb80d47 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 23 Apr 2021 18:13:13 -0400 Subject: [PATCH] Remove the prior-version OS specific files No longer needed in XT. Closes #4337 --- CMakeLists.txt | 14 +- cmake/versiontools.cmake | 7 - src/common/resource.h | 6 - src/linux/LinuxVST3Helpers.cpp | 247 ------------------------------ src/linux/linux-aeffguieditor.cpp | 230 ---------------------------- src/linux/linux-aeffguieditor.h | 73 --------- src/mac/objc_utils.h | 35 ----- src/mac/objc_utils.mm | 55 ------- src/windows/scalableresource.h | 183 ---------------------- src/windows/surge.rc | 115 -------------- src/windows/surgeversion.rc.in | 31 ---- src/windows/svgresources.rc | 74 --------- 12 files changed, 2 insertions(+), 1068 deletions(-) delete mode 100644 src/linux/LinuxVST3Helpers.cpp delete mode 100644 src/linux/linux-aeffguieditor.cpp delete mode 100644 src/linux/linux-aeffguieditor.h delete mode 100644 src/mac/objc_utils.h delete mode 100644 src/mac/objc_utils.mm delete mode 100644 src/windows/scalableresource.h delete mode 100644 src/windows/surge.rc delete mode 100644 src/windows/surgeversion.rc.in delete mode 100644 src/windows/svgresources.rc diff --git a/CMakeLists.txt b/CMakeLists.txt index 43764ded4c3..51f9023384c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -352,15 +352,11 @@ set(SURGE_GUI_INCLUDES ### OS SPECIFIC SECTION if( APPLE ) - set(SURGE_OS_SOURCES - src/mac/objc_utils.mm - ) + set(SURGE_OS_SOURCES) - set(SURGE_OS_GUI_SOURCES - ) + set(SURGE_OS_GUI_SOURCES) set(OS_INCLUDE_DIRECTORIES - src/mac libs/simde ) set(OS_COMPILE_DEFINITIONS @@ -421,8 +417,6 @@ elseif( UNIX AND NOT APPLE ) ) set(OS_INCLUDE_DIRECTORIES - src/linux - ${CAIRO_INCLUDE_DIRS} ${FONTCONFIG_INCLUDE_DIRS} ${X11_INCLUDE_DIRS} @@ -485,7 +479,6 @@ elseif( WIN32 ) set(OS_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} - src/windows ${CMAKE_BINARY_DIR}/geninclude ) @@ -535,9 +528,6 @@ source_group( "Surge GUI" REGULAR_EXPRESSION "src/common/gui" ) source_group( "Generated Code" REGULAR_EXPRESSION "version.cpp" ) source_group( "AU Plugin" REGULAR_EXPRESSION "src/au" ) source_group( "Headless" REGULAR_EXPRESSION "src/headless" ) -source_group( "Linux" REGULAR_EXPRESSION "src/linux" ) -source_group( "macOS" REGULAR_EXPRESSION "src/mac" ) -source_group( "Windows" REGULAR_EXPRESSION "src/windows" ) source_group( "Surge XT Juce" REGULAR_EXPRESSION "src/surge_synth_juce" ) source_group( "Surge FX Juce" REGULAR_EXPRESSION "src/surge_effects_bank" ) diff --git a/cmake/versiontools.cmake b/cmake/versiontools.cmake index 4009ef791fa..e27fa02aa63 100644 --- a/cmake/versiontools.cmake +++ b/cmake/versiontools.cmake @@ -116,10 +116,3 @@ message( STATUS "Configuring ${SURGEBLD}/geninclude/version.cpp" ) configure_file( ${SURGESRC}/src/common/version.cpp.in ${SURGEBLD}/geninclude/version.cpp ) -if( WIN32 ) - message( STATUS "Configuring surgeversion.rc" ) - configure_file( ${SURGESRC}/src/windows/surgeversion.rc.in - ${SURGEBLD}/geninclude/surgeversion.rc - ) -endif() - diff --git a/src/common/resource.h b/src/common/resource.h index 77858982f55..079e2c6eb38 100644 --- a/src/common/resource.h +++ b/src/common/resource.h @@ -90,9 +90,3 @@ #endif #endif -#if WINDOWS -#define SCALABLE_SVG_OFFSET 80000 - -#include "scalableresource.h" // found in src/windows - -#endif diff --git a/src/linux/LinuxVST3Helpers.cpp b/src/linux/LinuxVST3Helpers.cpp deleted file mode 100644 index 56076ececba..00000000000 --- a/src/linux/LinuxVST3Helpers.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/* -** The various things we need to help with VST3 Linux -*/ - -#if TARGET_VST3 -#include -#include -#include -#include "public.sdk/source/vst/vstguieditor.h" -#include "vstgui/lib/platform/platform_x11.h" -#include "vstgui/lib/platform/linux/x11platform.h" -#include "base/source/updatehandler.h" - -using namespace VSTGUI; - -static int ct = 0; -// Map Steinberg Vst Interface (Steinberg::Linux::IRunLoop) to VSTGUI Interface -// (VSTGUI::X11::RunLoop) -class RunLoop : public X11::IRunLoop, public AtomicReferenceCounted -{ - public: - struct EventHandler : Steinberg::Linux::IEventHandler, public Steinberg::FObject - { - X11::IEventHandler *handler{nullptr}; - - void PLUGIN_API onFDIsSet(Steinberg::Linux::FileDescriptor) override - { - // std::cout << __func__ << " " << handler << " " << ct++ << std::endl; - if (handler) - handler->onEvent(); - // std::cout << __func__ << " END " << handler << std::endl; - } - DELEGATE_REFCOUNT(Steinberg::FObject) - DEFINE_INTERFACES - DEF_INTERFACE(Steinberg::Linux::IEventHandler) - END_DEFINE_INTERFACES(Steinberg::FObject) - }; - - struct TimerHandler : Steinberg::Linux::ITimerHandler, public Steinberg::FObject - { - X11::ITimerHandler *handler{nullptr}; - - void PLUGIN_API onTimer() final - { - // std::cout << __func__ << " " << handler << std::endl; - if (handler) - handler->onTimer(); - // std::cout << __func__ << " END " << handler << std::endl; - } - DELEGATE_REFCOUNT(Steinberg::FObject) - DEFINE_INTERFACES - DEF_INTERFACE(Steinberg::Linux::ITimerHandler) - END_DEFINE_INTERFACES(Steinberg::FObject) - }; - - bool registerEventHandler(int fd, X11::IEventHandler *handler) final - { - if (!runLoop) - return false; - - auto smtgHandler = Steinberg::owned(new EventHandler()); - smtgHandler->handler = handler; - if (runLoop->registerEventHandler(smtgHandler, fd) == Steinberg::kResultTrue) - { - eventHandlers.push_back(smtgHandler); - return true; - } - return false; - } - - bool unregisterEventHandler(X11::IEventHandler *handler) final - { - if (!runLoop) - return false; - - for (auto it = eventHandlers.begin(), end = eventHandlers.end(); it != end; ++it) - { - if ((*it)->handler == handler) - { - runLoop->unregisterEventHandler((*it)); - eventHandlers.erase(it); - return true; - } - } - return false; - } - bool registerTimer(uint64_t interval, X11::ITimerHandler *handler) final - { - if (!runLoop) - return false; - // std::cout << "Have a runloop" << std::endl; - - auto smtgHandler = Steinberg::owned(new TimerHandler()); - smtgHandler->handler = handler; - if (runLoop->registerTimer(smtgHandler, interval) == Steinberg::kResultTrue) - { - timerHandlers.push_back(smtgHandler); - return true; - } - return false; - } - bool unregisterTimer(X11::ITimerHandler *handler) final - { - if (!runLoop) - return false; - - for (auto it = timerHandlers.begin(), end = timerHandlers.end(); it != end; ++it) - { - if ((*it)->handler == handler) - { - runLoop->unregisterTimer((*it)); - timerHandlers.erase(it); - return true; - } - } - return false; - } - - RunLoop(Steinberg::Linux::IRunLoop *_runLoop) : runLoop(_runLoop) - { - // std::cout << "RunLoop is " << runLoop << " " << _runLoop << std::endl; - } - - void idle() - { - // See comment in LInuxVST3Idle below - for (auto h : eventHandlers) - h->handler->onEvent(); - } - - private: - using EventHandlers = std::vector>; - using TimerHandlers = std::vector>; - EventHandlers eventHandlers; - TimerHandlers timerHandlers; - // Steinberg::FUnknownPtr runLoop; - Steinberg::Linux::IRunLoop *runLoop; -}; - -//----------------------------------------------------------------------------- -class UpdateHandlerInit -{ - public: - UpdateHandlerInit() { get(); } - Steinberg::UpdateHandler *get() { return Steinberg::UpdateHandler::instance(); } -}; - -static UpdateHandlerInit gUpdateHandlerInit; - -//----------------------------------------------------------------------------- -class IdleUpdateHandler -{ - public: - std::atomic running; - pthread_t t; - static void start() - { - auto &instance = get(); - if (++instance.users == 1) - { - instance.running = true; - pthread_create(&instance.t, NULL, IdleUpdateHandler::doDefUp, NULL); - } - } - - static void *doDefUp(void *x) - { - while (get().running) - { - // std::cout << "GUpdate" << std::endl; - gUpdateHandlerInit.get()->triggerDeferedUpdates(); - usleep(1000 / 30.0); - } - return nullptr; - } - - static void stop() - { - auto &instance = get(); - if (--instance.users == 0) - { - instance.running = false; - pthread_join(instance.t, NULL); - } - } - - protected: - static IdleUpdateHandler &get() - { - static IdleUpdateHandler gInstance; - return gInstance; - } - - VSTGUI::SharedPointer timer; - std::atomic users{0}; -}; - -void LinuxVST3Init(Steinberg::Linux::IRunLoop *rl) -{ - // std::cout << "irl is " << rl << std::endl; - VSTGUI::X11::RunLoop::init(owned(new RunLoop(rl))); -} - -void LinuxVST3FrameOpen(VSTGUI::CFrame *that, void *parent, const VSTGUI::PlatformType &pt) -{ - IPlatformFrameConfig *config = nullptr; - X11::FrameConfig x11config; - x11config.runLoop = VSTGUI::X11::RunLoop::get(); - config = &x11config; - - // std::cout << "Special Magical VST3 Open " << - // VSTGUI::X11::RunLoop::instance().getXcbConnection() << std::endl; - that->open(parent, pt, config); - // std::cout << "Are we done?" << std::endl; - IdleUpdateHandler::start(); -} - -void LinuxVST3Detatch() -{ - IdleUpdateHandler::stop(); - - // We need to downcount the usage on the RunLoop to allow xcb to restart - VSTGUI::X11::RunLoop::exit(); -} - -void LinuxVST3Idle() -{ - /* - ** Why is this here? With the VST3 runloop we should be - ** parsimoniously notified by file descriptor polls and stuff right? - ** Well, of course, that doesn't work. If you listen to every - ** hover event somewhere in the bowls of vst3sdk, DAW runloops, - ** and so forth, you eventually hang up and lose events. - ** So what this does is, every idle, just give a kick to every - ** FDI poller to go and check. Basically just like VST2. - ** - ** If you decide one day to eliminate this to optimize something - ** or another, make sure that in bitwig and the juce host that - ** as you mouse over hover assets they keep working forever and - ** don't hang up after 10-50 seconds. See #1817 - */ - auto xrlp = VSTGUI::X11::RunLoop::get().get(); - auto rlp = dynamic_cast(xrlp); - if (rlp) - rlp->idle(); -} -#endif diff --git a/src/linux/linux-aeffguieditor.cpp b/src/linux/linux-aeffguieditor.cpp deleted file mode 100644 index aed01a740e6..00000000000 --- a/src/linux/linux-aeffguieditor.cpp +++ /dev/null @@ -1,230 +0,0 @@ -// This file is part of VSTGUI. It is subject to the license terms -// in the LICENSE file found in the top-level directory of this -// distribution and at http://github.com/steinbergmedia/vstgui/LICENSE - -#if TARGET_VST2 - -#include "linux-aeffguieditor.h" -#include "public.sdk/source/vst2.x/audioeffectx.h" -#include "vstgui/lib/platform/platform_x11.h" - -namespace VSTGUI -{ - -/* X11 main loop, triggered by idle() - * No timing guarantees, since the host calls it for us, but better than a black window! - * Adapted from the vstgui gdk main loop code - */ - -//------------------------------------------------------------------------ -struct ExternalEventHandler -{ - X11::IEventHandler *eventHandler{nullptr}; - int fd{-1}; -}; - -//------------------------------------------------------------------------ -struct ExternalTimerHandler -{ - X11::ITimerHandler *timerHandler{nullptr}; - uint64_t interval{0}; -}; - -//------------------------------------------------------------------------ -class LinuxRunLoop : public X11::IRunLoop -{ - public: - using IEventHandler = X11::IEventHandler; - using ITimerHandler = X11::ITimerHandler; - - static LinuxRunLoop &instance(); - - LinuxRunLoop(){}; - - bool registerEventHandler(int fd, IEventHandler *handler) override; - bool unregisterEventHandler(IEventHandler *handler) override; - - bool registerTimer(uint64_t interval, ITimerHandler *handler) override; - bool unregisterTimer(ITimerHandler *handler) override; - - void forget() override {} - void remember() override {} - - void idle(); - - private: - std::vector eventHandlers; - std::vector timerHandlers; -}; - -//------------------------------------------------------------------------ -LinuxRunLoop &LinuxRunLoop::instance() -{ - static LinuxRunLoop instance; - return instance; -} - -//------------------------------------------------------------------------ -bool LinuxRunLoop::registerEventHandler(int fd, IEventHandler *handler) -{ - // printf("%s %i %p\n", __func__, fd, handler); - if (handler == nullptr) - return false; - eventHandlers.push_back({handler, fd}); - return true; -} - -//------------------------------------------------------------------------ -bool LinuxRunLoop::unregisterEventHandler(IEventHandler *handler) -{ - // printf("%s %p\n", __func__, handler); - for (auto it = eventHandlers.begin(); it != eventHandlers.end(); it++) - { - if (it->eventHandler == handler) - { - eventHandlers.erase(it); - return true; - } - } - return false; -} - -//------------------------------------------------------------------------ -bool LinuxRunLoop::registerTimer(uint64_t interval, ITimerHandler *handler) -{ - // printf("%s %lu %p\n", __func__, static_cast(interval), handler); - if (handler == nullptr) - return false; - timerHandlers.push_back({handler, interval}); - return true; -} - -//------------------------------------------------------------------------ -bool LinuxRunLoop::unregisterTimer(ITimerHandler *handler) -{ - // printf("%s %p\n", __func__, handler); - for (auto it = timerHandlers.begin(); it != timerHandlers.end(); it++) - { - if (it->timerHandler == handler) - { - timerHandlers.erase(it); - return true; - } - } - return false; -} - -//------------------------------------------------------------------------ -void LinuxRunLoop::idle() -{ - // TODO check timing in a smart way - - for (auto &timer : timerHandlers) - timer.timerHandler->onTimer(); - - for (auto &timer : eventHandlers) - timer.eventHandler->onEvent(); -} - -//----------------------------------------------------------------------------- -// LinuxAEffGUIEditor Implementation -//----------------------------------------------------------------------------- -LinuxAEffGUIEditor::LinuxAEffGUIEditor(void *pEffect) - : AEffEditor((AudioEffect *)pEffect), inIdle(false) -{ - ((AudioEffect *)pEffect)->setEditor(this); - systemWindow = nullptr; -} - -//----------------------------------------------------------------------------- -LinuxAEffGUIEditor::~LinuxAEffGUIEditor() {} - -//----------------------------------------------------------------------------- -#if VST_2_1_EXTENSIONS -bool LinuxAEffGUIEditor::onKeyDown(VstKeyCode &keyCode) -{ - return frame ? frame->onKeyDown(keyCode) > 0 : false; -} - -//----------------------------------------------------------------------------- -bool LinuxAEffGUIEditor::onKeyUp(VstKeyCode &keyCode) -{ - return frame ? frame->onKeyUp(keyCode) > 0 : false; -} -#endif - -//----------------------------------------------------------------------------- -bool LinuxAEffGUIEditor::open(void *ptr) -{ - frame = new CFrame(CRect(0, 0, 0, 0), this); - getFrame()->setTransparency(true); - - IPlatformFrameConfig *config = nullptr; - X11::FrameConfig x11config; - x11config.runLoop = &LinuxRunLoop::instance(); - config = &x11config; - - // printf("%s %p %p\n", __func__, frame, ptr); - getFrame()->open(ptr, kDefaultNative, config); - - systemWindow = ptr; - return AEffEditor::open(ptr); -} - -//----------------------------------------------------------------------------- -bool LinuxAEffGUIEditor::idle2() -{ - if (inIdle) - { - fprintf(stderr, "%s: Caught recursive idle call\n", __func__); - return false; - } - - inIdle = true; - - AEffEditor::idle(); - if (frame) - frame->idle(); - - LinuxRunLoop::instance().idle(); - - inIdle = false; - return true; -} - -//----------------------------------------------------------------------------- -int32_t LinuxAEffGUIEditor::knobMode = kCircularMode; - -//----------------------------------------------------------------------------- -bool LinuxAEffGUIEditor::setKnobMode(int32_t val) -{ - LinuxAEffGUIEditor::knobMode = val; - return true; -} - -//----------------------------------------------------------------------------- -bool LinuxAEffGUIEditor::getRect(ERect **ppErect) -{ - *ppErect = ▭ - return true; -} - -// ----------------------------------------------------------------------------- -bool LinuxAEffGUIEditor::beforeSizeChange(const CRect &newSize, const CRect &oldSize) -{ - AudioEffectX *eX = (AudioEffectX *)effect; - if (eX && eX->canHostDo((char *)"sizeWindow")) - { - if (eX->sizeWindow((VstInt32)newSize.getWidth(), (VstInt32)newSize.getHeight())) - { - return true; - } - return false; - } - - return true; -} - -} // namespace VSTGUI - -#endif // TARGET_VST guard diff --git a/src/linux/linux-aeffguieditor.h b/src/linux/linux-aeffguieditor.h deleted file mode 100644 index c0dce4495d6..00000000000 --- a/src/linux/linux-aeffguieditor.h +++ /dev/null @@ -1,73 +0,0 @@ -// This file is part of VSTGUI. It is subject to the license terms -// in the LICENSE file found in the top-level directory of this -// distribution and at http://github.com/steinbergmedia/vstgui/LICENSE - -#if TARGET_VST2 - -#ifndef __linux_aeffguieditor__ -#define __linux_aeffguieditor__ - -#ifndef __aeffeditor__ -#include "public.sdk/source/vst2.x/aeffeditor.h" -#endif - -#ifndef __audioeffectx__ -#include "public.sdk/source/vst2.x/audioeffectx.h" -#endif - -#include "vstgui/vstgui.h" - -namespace VSTGUI -{ - -//----------------------------------------------------------------------------- -// LinuxAEffGUIEditor Declaration -//----------------------------------------------------------------------------- -class LinuxAEffGUIEditor : public AEffEditor, public VSTGUIEditorInterface -{ - public: - LinuxAEffGUIEditor(void *pEffect); - - ~LinuxAEffGUIEditor() override; - - virtual void setParameter(VstInt32 index, float value) {} - bool getRect(ERect **ppRect) override; - bool open(void *ptr) override; - bool idle2(); - -#if VST_2_1_EXTENSIONS - bool onKeyDown(VstKeyCode &keyCode) override; - bool onKeyUp(VstKeyCode &keyCode) override; -#endif - - // get the effect attached to this editor - AudioEffect *getEffect() override { return effect; } - - // get version of this VSTGUI - int32_t getVstGuiVersion() { return (VSTGUI_VERSION_MAJOR << 16) + VSTGUI_VERSION_MINOR; } - - // set/get the knob mode - bool setKnobMode(int32_t val) override; - int32_t getKnobMode() const override { return knobMode; } - - bool beforeSizeChange(const CRect &newSize, const CRect &oldSize) override; - -#if VST_2_1_EXTENSIONS - void beginEdit(int32_t index) override { ((AudioEffectX *)effect)->beginEdit(index); } - void endEdit(int32_t index) override { ((AudioEffectX *)effect)->endEdit(index); } -#endif - - //--------------------------------------- - protected: - bool inIdle; - ERect rect; - - private: - static int32_t knobMode; -}; - -} // namespace VSTGUI - -#endif // include guard - -#endif // TARGET VST2 diff --git a/src/mac/objc_utils.h b/src/mac/objc_utils.h deleted file mode 100644 index 7366ad580c8..00000000000 --- a/src/mac/objc_utils.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -** Surge Synthesizer is Free and Open Source Software -** -** Surge is made available under the Gnu General Public License, v3.0 -** https://www.gnu.org/licenses/gpl-3.0.en.html -** -** Copyright 2004-2020 by various individuals as described by the Git transaction log -** -** All source at: https://github.com/surge-synthesizer/surge.git -** -** Surge was a commercial product from 2004-2018, with Copyright and ownership -** in that period held by Claes Johanson at Vember Audio. Claes made Surge -** open source in September 2018. -*/ - -/* - * Sometimes you just need to call some objective C you know, and - * you want a place to hang it. This is that place. - */ - -#pragma once -#include -#include -#include "filesystem/import.h" - -namespace Surge -{ -namespace ObjCUtil -{ -void loadUrlToPath( - const std::string &url, const fs::path &path, - const std::function &onDone, - const std::function &onError); -} -} // namespace Surge diff --git a/src/mac/objc_utils.mm b/src/mac/objc_utils.mm deleted file mode 100644 index 835692b07fb..00000000000 --- a/src/mac/objc_utils.mm +++ /dev/null @@ -1,55 +0,0 @@ -/* -** Surge Synthesizer is Free and Open Source Software -** -** Surge is made available under the Gnu General Public License, v3.0 -** https://www.gnu.org/licenses/gpl-3.0.en.html -** -** Copyright 2004-2020 by various individuals as described by the Git transaction log -** -** All source at: https://github.com/surge-synthesizer/surge.git -** -** Surge was a commercial product from 2004-2018, with Copyright and ownership -** in that period held by Claes Johanson at Vember Audio. Claes made Surge -** open source in September 2018. -*/ - -#include "objc_utils.h" -#include - -namespace Surge -{ -namespace ObjCUtil -{ -void loadUrlToPath( - const std::string &urlS, const fs::path &path, - const std::function &onDone, - const std::function &onError) -{ - NSString *urlns = [NSString stringWithCString:urlS.c_str() - encoding:[NSString defaultCStringEncoding]]; - NSURL *url = [NSURL URLWithString:urlns]; - - // use the error: nullable here - // https://developer.apple.com/documentation/foundation/nsdata/1547238-datawithcontentsofurl?language=objc - NSError *err = nil; - NSData *data = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:&err]; - if (err) - { - onError(urlS, [[err localizedDescription] UTF8String]); - return; - } - - NSString *pathns = [NSString stringWithCString:path_to_string(path).c_str() - encoding:[NSString defaultCStringEncoding]]; - if (![data writeToFile:pathns atomically:NO]) - { - onError(urlS, "Unable to write to file"); - return; - } - - // And if we are all OK - onDone(urlS); -} -} - -} \ No newline at end of file diff --git a/src/windows/scalableresource.h b/src/windows/scalableresource.h deleted file mode 100644 index 9092fe85629..00000000000 --- a/src/windows/scalableresource.h +++ /dev/null @@ -1,183 +0,0 @@ -/* -** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT IT -** -** If you need to modify this file, please read the comment -** in scripts/win/emit-vector-rc.py -** -** This file defined the constants IDB_MAIN_BG_SCALE_300 and the -** like as explicit values so the .rc compiler (which cannot -** add identifiers as integers) can include assets. -** -** You can address these items as IDB_MAIN_BG_SCALE_300 or -** IDB_MAIN_BG + SCALE_OFFSET_300 in your non-rc code. -*/ - -// Offset IDB_MAIN_BG by SCALABLE_100_OFFSET value and so on -#define IDB_MAIN_BG_SCALE_SVG 80102 - -// Offset IDB_MAIN_MENU by SCALABLE_100_OFFSET value and so on -#define IDB_MAIN_MENU_SCALE_SVG 80164 - -// Offset IDB_PREVNEXT_JOG by SCALABLE_100_OFFSET value and so on -#define IDB_PREVNEXT_JOG_SCALE_SVG 80149 - -// Offset IDB_STORE_PATCH by SCALABLE_100_OFFSET value and so on -#define IDB_STORE_PATCH_SCALE_SVG 80148 - -// Offset IDB_OSC_CHARACTER by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_CHARACTER_SCALE_SVG 80161 - -// Offset IDB_ENV_MODE by SCALABLE_100_OFFSET value and so on -#define IDB_ENV_MODE_SCALE_SVG 80162 - -// Offset IDB_ENV_SHAPE by SCALABLE_100_OFFSET value and so on -#define IDB_ENV_SHAPE_SCALE_SVG 80145 - -// Offset IDB_SLIDER_HORIZ_BG by SCALABLE_100_OFFSET value and so on -#define IDB_SLIDER_HORIZ_BG_SCALE_SVG 80154 - -// Offset IDB_SLIDER_HORIZ_HANDLE by SCALABLE_100_OFFSET value and so on -#define IDB_SLIDER_HORIZ_HANDLE_SCALE_SVG 80153 - -// Offset IDB_SLIDER_VERT_BG by SCALABLE_100_OFFSET value and so on -#define IDB_SLIDER_VERT_BG_SCALE_SVG 80105 - -// Offset IDB_SLIDER_VERT_HANDLE by SCALABLE_100_OFFSET value and so on -#define IDB_SLIDER_VERT_HANDLE_SCALE_SVG 80157 - -// Offset IDB_FILTER_CONFIG by SCALABLE_100_OFFSET value and so on -#define IDB_FILTER_CONFIG_SCALE_SVG 80112 - -// Offset IDB_FILTERBUTTONS by SCALABLE_100_OFFSET value and so on -#define IDB_FILTERBUTTONS_SCALE_SVG 80108 - -// Offset IDB_FILTER_SUBTYPE by SCALABLE_100_OFFSET value and so on -#define IDB_FILTER_SUBTYPE_SCALE_SVG 80160 - -// Offset IDB_FILTER_ICONS by SCALABLE_100_OFFSET value and so on -#define IDB_FILTER_ICONS_SCALE_SVG 80169 - -// Offset IDB_OSC_FM_ROUTING by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_FM_ROUTING_SCALE_SVG 80151 - -// Offset IDB_FX_GLOBAL_BYPASS by SCALABLE_100_OFFSET value and so on -#define IDB_FX_GLOBAL_BYPASS_SCALE_SVG 80144 - -// Offset IDB_FX_GRID by SCALABLE_100_OFFSET value and so on -#define IDB_FX_GRID_SCALE_SVG 80137 - -// Offset IDB_FX_TYPE_ICONS by SCALABLE_100_OFFSET value and so on -#define IDB_FX_TYPE_ICONS_SCALE_SVG 80136 - -// Offset IDB_LFO_TRIGGER_MODE by SCALABLE_100_OFFSET value and so on -#define IDB_LFO_TRIGGER_MODE_SCALE_SVG 80146 - -// Offset IDB_LFO_TYPE by SCALABLE_100_OFFSET value and so on -#define IDB_LFO_TYPE_SCALE_SVG 80166 - -// Offset IDB_FILTER_MENU by SCALABLE_100_OFFSET value and so on -#define IDB_FILTER_MENU_SCALE_SVG 80168 - -// Offset IDB_MENU_AS_SLIDER by SCALABLE_100_OFFSET value and so on -#define IDB_MENU_AS_SLIDER_SCALE_SVG 80167 - -// Offset IDB_SURGE_ICON by SCALABLE_100_OFFSET value and so on -#define IDB_SURGE_ICON_SCALE_SVG 80170 - -// Offset IDB_MODSOURCE_BG by SCALABLE_100_OFFSET value and so on -#define IDB_MODSOURCE_BG_SCALE_SVG 80124 - -// Offset IDB_MPE_BUTTON by SCALABLE_100_OFFSET value and so on -#define IDB_MPE_BUTTON_SCALE_SVG 80171 - -// Offset IDB_MSEG_HORIZONTAL_SNAP by SCALABLE_100_OFFSET value and so on -#define IDB_MSEG_HORIZONTAL_SNAP_SCALE_SVG 80304 - -// Offset IDB_MSEG_MOVEMENT_MODE by SCALABLE_100_OFFSET value and so on -#define IDB_MSEG_MOVEMENT_MODE_SCALE_SVG 80302 - -// Offset IDB_MSEG_NODES by SCALABLE_100_OFFSET value and so on -#define IDB_MSEG_NODES_SCALE_SVG 80301 - -// Offset IDB_MSEG_VERTICAL_SNAP by SCALABLE_100_OFFSET value and so on -#define IDB_MSEG_VERTICAL_SNAP_SCALE_SVG 80303 - -// Offset IDB_SCENE_OCTAVE by SCALABLE_100_OFFSET value and so on -#define IDB_SCENE_OCTAVE_SCALE_SVG 80118 - -// Offset IDB_OSC_OCTAVE by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_OCTAVE_SCALE_SVG 80117 - -// Offset IDB_OSC_MENU by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_MENU_SCALE_SVG 80119 - -// Offset IDB_MIXER_OSC_ROUTING by SCALABLE_100_OFFSET value and so on -#define IDB_MIXER_OSC_ROUTING_SCALE_SVG 80143 - -// Offset IDB_OSC_SELECT by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_SELECT_SCALE_SVG 80122 - -// Offset IDB_PLAY_MODE by SCALABLE_100_OFFSET value and so on -#define IDB_PLAY_MODE_SCALE_SVG 80123 - -// Offset IDB_FILTER2_OFFSET by SCALABLE_100_OFFSET value and so on -#define IDB_FILTER2_OFFSET_SCALE_SVG 80121 - -// Offset IDB_SCENE_MODE by SCALABLE_100_OFFSET value and so on -#define IDB_SCENE_MODE_SCALE_SVG 80114 - -// Offset IDB_SCENE_SELECT by SCALABLE_100_OFFSET value and so on -#define IDB_SCENE_SELECT_SCALE_SVG 80113 - -// Offset IDB_OSC_KEYTRACK by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_KEYTRACK_SCALE_SVG 80125 - -// Offset IDB_FILTER2_RESONANCE_LINK by SCALABLE_100_OFFSET value and so on -#define IDB_FILTER2_RESONANCE_LINK_SCALE_SVG 80140 - -// Offset IDB_MIXER_MUTE by SCALABLE_100_OFFSET value and so on -#define IDB_MIXER_MUTE_SCALE_SVG 80134 - -// Offset IDB_OSC_RETRIGGER by SCALABLE_100_OFFSET value and so on -#define IDB_OSC_RETRIGGER_SCALE_SVG 80126 - -// Offset IDB_MIXER_SOLO by SCALABLE_100_OFFSET value and so on -#define IDB_MIXER_SOLO_SCALE_SVG 80132 - -// Offset IDB_TUNE_BUTTON by SCALABLE_100_OFFSET value and so on -#define IDB_TUNE_BUTTON_SCALE_SVG 80173 - -// Offset IDB_LFO_UNIPOLAR by SCALABLE_100_OFFSET value and so on -#define IDB_LFO_UNIPOLAR_SCALE_SVG 80152 - -// Offset IDB_WAVESHAPER_MODE by SCALABLE_100_OFFSET value and so on -#define IDB_WAVESHAPER_MODE_SCALE_SVG 80120 - -// Offset IDB_ZOOM_BUTTON by SCALABLE_100_OFFSET value and so on -#define IDB_ZOOM_BUTTON_SCALE_SVG 80172 - -#define IDB_NUMFIELD_POLY_SPLIT_SCALE_SVG 80174 - -#define IDB_NUMFIELD_PITCHBEND_SCALE_SVG 80175 - -#define IDB_NUMFIELD_KEYTRACK_ROOT_SCALE_SVG 80176 - -#define IDB_MSEG_LOOP_MODE_SCALE_SVG 80305 - -#define IDB_LFO_MSEG_EDIT_SCALE_SVG 80177 - -#define IDB_LFO_PRESET_MENU_SCALE_SVG 80178 - -#define IDB_MSEG_SNAPVALUE_NUMFIELD_SCALE_SVG 80306 - -#define IDB_MODSOURCE_SHOW_LFO_SCALE_SVG 80179 - -#define IDB_MSEG_EDIT_MODE_SCALE_SVG 80307 - -#define IDB_ABOUT_LOGOS_SCALE_SVG 80180 - -#define IDB_ABOUT_BG_SCALE_SVG 80158 - -#define IDB_VUMETER_BARS_SCALE_SVG 80181 - -#define IDB_MIDI_LEARN_SCALE_SVG 80182 diff --git a/src/windows/surge.rc b/src/windows/surge.rc deleted file mode 100644 index def336ee540..00000000000 --- a/src/windows/surge.rc +++ /dev/null @@ -1,115 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -//#include "afxres.h" -#include "winresrc.h" -#define IDC_STATIC -1 - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, - SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -#include "svgresources.rc" - - ///////////////////////////////////////////////////////////////////////////// - // - // Dialog - // - - IDB_ENTER_VALUE_LEGACY DIALOGEX 0, 0, 150, 28 - STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTERMOUSE | WS_POPUP | WS_CAPTION | WS_SYSMENU - EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW - CAPTION "Surge Synthesizer" - FONT 10, "MS Shell Dlg", 400, 0, 0x1 - BEGIN - LTEXT "Enter Value", IDC_TPROMPT, 3, 3, 144, 10 - EDITTEXT IDC_TEDIT, 3, 14, 144, 12, ES_AUTOHSCROLL - END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED - GUIDELINES DESIGNINFO - BEGIN - IDB_ENTER_VALUE_LEGACY, - DIALOG BEGIN LEFTMARGIN, 3 RIGHTMARGIN, 131 TOPMARGIN, 3 BOTTOMMARGIN, 15 - END - END -#endif // APSTUDIO_INVOKED - - ///////////////////////////////////////////////////////////////////////////// - // - // Version - // - -#include "surgeversion.rc" - - ///////////////////////////////////////////////////////////////////////////// - // - // Icon - // - - // Icon with lowest ID value placed first to ensure application icon - // remains consistent on all systems. - IDI_MAIN_MENU ICON "resources/windows-vst2/surge.ico" -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 - LANGUAGE LANG_ENGLISH, - SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED - ///////////////////////////////////////////////////////////////////////////// - // - // TEXTINCLUDE - // - - 1 TEXTINCLUDE BEGIN "resource.h\0" END - - 2 TEXTINCLUDE BEGIN "#include " - "afxres.h" - "\r\n" - "\0" END - - 3 TEXTINCLUDE BEGIN "\r\n" - "\0" END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/src/windows/surgeversion.rc.in b/src/windows/surgeversion.rc.in deleted file mode 100644 index 44347bc624f..00000000000 --- a/src/windows/surgeversion.rc.in +++ /dev/null @@ -1,31 +0,0 @@ - - VS_VERSION_INFO VERSIONINFO - FILEVERSION @SURGE_MAJOR_VERSION@, @SURGE_SUB_VERSION@, @SURGE_RELEASE_NUMBER@, 0 - PRODUCTVERSION @SURGE_MAJOR_VERSION@, @SURGE_SUB_VERSION@, @SURGE_RELEASE_NUMBER@, 0 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L - BEGIN BLOCK "StringFileInfo" - BEGIN BLOCK "000004b0" - BEGIN - VALUE "Comments", "http://surge-synthesizer.github.io" - VALUE "CompanyName", "Surge Synth Team" - VALUE "FileDescription", "Surge VST instrument" - VALUE "FileVersion", "@SURGE_MAJOR_VERSION@, @SURGE_SUB_VERSION@, @SURGE_RELEASE_NUMBER@, 0" - VALUE "InternalName", "Surge" - VALUE "LegalCopyright", "Copyright (C) 2005-2020 Authors as described on GitHub" - VALUE "OriginalFilename", "Surge.dll" - VALUE "ProductName", "Surge" - VALUE "ProductVersion", "@SURGE_MAJOR_VERSION@, @SURGE_SUB_VERSION@, @SURGE_RELEASE_NUMBER@, 0" - END - END - BLOCK "VarFileInfo" - BEGIN VALUE "Translation", 0x0, 1200 - END - END diff --git a/src/windows/svgresources.rc b/src/windows/svgresources.rc deleted file mode 100644 index 62770133faa..00000000000 --- a/src/windows/svgresources.rc +++ /dev/null @@ -1,74 +0,0 @@ - -/* -** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT IT -** -** If you need to modify this file, please read the comment -** in scripts/win/emit-vector-rc.py -** -** This file imports the appropriate scaled SVG files -** for each of the identifiers in scalableresource.h. -** -** You can address these items as IDB_MAIN_BG_SCALE_SVG or -** IDB_MAIN_BG + SCALE_OFFSET_SVG in your non-rc code. -*/ - -IDB_WAVESHAPER_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00120.svg" -IDB_MIXER_MUTE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00134.svg" -IDB_FILTER2_OFFSET_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00121.svg" -IDB_FX_GRID_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00137.svg" -IDB_PLAY_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00123.svg" -IDB_OSC_SELECT_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00122.svg" -IDB_FX_TYPE_ICONS_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00136.svg" -IDB_MIXER_SOLO_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00132.svg" -IDB_OSC_RETRIGGER_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00126.svg" -IDB_OSC_MENU_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00119.svg" -IDB_OSC_KEYTRACK_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00125.svg" -IDB_MODSOURCE_BG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00124.svg" -IDB_SCENE_OCTAVE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00118.svg" -IDB_MIXER_OSC_ROUTING_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00143.svg" -IDB_SLIDER_VERT_HANDLE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00157.svg" -IDB_SLIDER_HORIZ_BG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00154.svg" -IDB_FILTER2_RESONANCE_LINK_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00140.svg" -IDB_FILTER_MENU_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00168.svg" -IDB_FILTER_ICONS_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00169.svg" -IDB_OSC_FM_ROUTING_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00151.svg" -IDB_ENV_SHAPE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00145.svg" -IDB_FX_GLOBAL_BYPASS_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00144.svg" -IDB_LFO_TRIGGER_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00146.svg" -IDB_LFO_UNIPOLAR_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00152.svg" -IDB_SLIDER_HORIZ_HANDLE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00153.svg" -IDB_ENV_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00162.svg" -IDB_OSC_CHARACTER_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00161.svg" -IDB_PREVNEXT_JOG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00149.svg" -IDB_STORE_PATCH_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00148.svg" -IDB_FILTER_SUBTYPE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00160.svg" -IDB_SURGE_ICON_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00170.svg" -IDB_MAIN_MENU_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00164.svg" -IDB_MPE_BUTTON_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00171.svg" -IDB_MENU_AS_SLIDER_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00167.svg" -IDB_TUNE_BUTTON_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00173.svg" -IDB_ZOOM_BUTTON_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00172.svg" -IDB_LFO_TYPE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00166.svg" -IDB_MSEG_VERTICAL_SNAP_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00303.svg" -IDB_SCENE_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00114.svg" -IDB_MSEG_MOVEMENT_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00302.svg" -IDB_MAIN_BG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00102.svg" -IDB_OSC_OCTAVE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00117.svg" -IDB_MSEG_NODES_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00301.svg" -IDB_SCENE_SELECT_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00113.svg" -IDB_FILTER_CONFIG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00112.svg" -IDB_MSEG_HORIZONTAL_SNAP_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00304.svg" -IDB_SLIDER_VERT_BG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00105.svg" -IDB_NUMFIELD_POLY_SPLIT_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00174.svg" -IDB_NUMFIELD_PITCHBEND_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00175.svg" -IDB_NUMFIELD_KEYTRACK_ROOT_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00176.svg" -IDB_MSEG_LOOP_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00305.svg" -IDB_LFO_MSEG_EDIT_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00177.svg" -IDB_LFO_PRESET_MENU_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00178.svg" -IDB_MSEG_SNAPVALUE_NUMFIELD_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00306.svg" -IDB_MODSOURCE_SHOW_LFO_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00179.svg" -IDB_MSEG_EDIT_MODE_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00307.svg" -IDB_ABOUT_LOGOS_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00180.svg" -IDB_ABOUT_BG_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00158.svg" -IDB_VUMETER_BARS_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00181.svg" -IDB_MIDI_LEARN_SCALE_SVG DATA "assets/SurgeClassic/exported/bmp00182.svg"