The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. #pragma once
  14. #include "../../juce_core/system/juce_TargetPlatform.h"
  15. #include "../utility/juce_CheckSettingMacros.h"
  16. #if JucePlugin_Build_RTAS
  17. #include "../utility/juce_IncludeSystemHeaders.h"
  18. #include "juce_RTAS_DigiCode_Header.h"
  19. #ifdef __clang__
  20. #pragma clang diagnostic push
  21. #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
  22. #pragma clang diagnostic ignored "-Wextra-tokens"
  23. #pragma clang diagnostic ignored "-Wreorder"
  24. #endif
  25. /*
  26. This file is used to include and build the required digidesign CPP files without your project
  27. needing to reference the files directly. Because these files will be found via your include path,
  28. this means that the project doesn't have to change to cope with people's SDKs being in different
  29. locations.
  30. Important note on Windows: In your project settings for the three juce_RTAS_DigiCode.cpp files and
  31. the juce_RTAS_Wrapper.cpp file, you need to set the calling convention to "__stdcall".
  32. If you don't do this, you'll get some unresolved externals and will spend a long time wondering what's
  33. going on... All the other files in your project can be set to use the normal __cdecl convention.
  34. If you get an error building the includes statements below, check your paths - there's a full
  35. list of the necessary Digidesign paths in juce_RTAS_Wrapper.cpp
  36. */
  37. #if WINDOWS_VERSION
  38. #undef _UNICODE
  39. #undef UNICODE
  40. #define DllMain DllMainRTAS
  41. #include <DLLMain.cpp>
  42. #undef DllMain
  43. #include <DefaultSwap.cpp>
  44. #else
  45. #include <PlugInInitialize.cpp>
  46. #include <Dispatcher.cpp>
  47. #endif
  48. #ifdef __clang__
  49. #pragma clang diagnostic pop
  50. #endif
  51. #else
  52. #if _MSC_VER
  53. short __stdcall NewPlugIn (void*) { return 0; }
  54. short __stdcall _PI_GetRoutineDescriptor (long, void*) { return 0; }
  55. #endif
  56. #endif