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
1.9KB

  1. /*
  2. * DISTRHO Cardinal Plugin
  3. * Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 3 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the LICENSE file.
  16. */
  17. /**
  18. * This file is an edited version of VCVRack's common.cpp
  19. * Copyright (C) 2016-2021 VCV.
  20. *
  21. * This program is free software: you can redistribute it and/or
  22. * modify it under the terms of the GNU General Public License as
  23. * published by the Free Software Foundation; either version 3 of
  24. * the License, or (at your option) any later version.
  25. */
  26. #include <common.hpp>
  27. #include <string.hpp>
  28. #ifdef NDEBUG
  29. # undef DEBUG
  30. #endif
  31. #include "DistrhoPluginUtils.hpp"
  32. #if defined ARCH_WIN
  33. #include <windows.h>
  34. FILE* fopen_u8(const char* filename, const char* mode) {
  35. return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str());
  36. }
  37. #endif
  38. namespace rack {
  39. const std::string APP_NAME = "Cardinal";
  40. const std::string APP_EDITION = getPluginFormatName();
  41. const std::string APP_EDITION_NAME = "Audio Plugin";
  42. const std::string APP_VERSION_MAJOR = "2";
  43. const std::string APP_VERSION = "2.0";
  44. #if defined ARCH_WIN
  45. const std::string APP_OS = "win";
  46. #elif ARCH_MAC
  47. const std::string APP_OS = "mac";
  48. #elif defined ARCH_LIN
  49. const std::string APP_OS = "lin";
  50. #else
  51. #error ARCH_LIN undefined
  52. #endif
  53. const std::string API_URL = "";
  54. Exception::Exception(const char* format, ...) {
  55. va_list args;
  56. va_start(args, format);
  57. msg = string::fV(format, args);
  58. va_end(args);
  59. }
  60. } // namespace rack