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.

52 lines
1.2KB

  1. #include <common.hpp>
  2. #include <string.hpp>
  3. #if defined ARCH_WIN
  4. #include <windows.h>
  5. FILE* fopen_u8(const char* filename, const char* mode) {
  6. return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str());
  7. }
  8. #endif
  9. namespace rack {
  10. const std::string APP_NAME = "VCV Rack";
  11. const std::string APP_EDITION = "Free";
  12. const std::string APP_EDITION_NAME = "Free";
  13. const std::string APP_VERSION_MAJOR = "2";
  14. const std::string APP_VERSION = TOSTRING(_APP_VERSION);
  15. #if defined ARCH_WIN
  16. const std::string APP_OS = "win";
  17. const std::string APP_OS_NAME = "Windows";
  18. #elif defined ARCH_MAC
  19. const std::string APP_OS = "mac";
  20. const std::string APP_OS_NAME = "macOS";
  21. #elif defined ARCH_LIN
  22. const std::string APP_OS = "lin";
  23. const std::string APP_OS_NAME = "Linux";
  24. #endif
  25. #if defined ARCH_X64
  26. const std::string APP_CPU = "x64";
  27. const std::string APP_CPU_NAME = "x64";
  28. #elif defined ARCH_ARM64
  29. const std::string APP_CPU = "arm64";
  30. const std::string APP_CPU_NAME = "ARM64";
  31. #endif
  32. const std::string API_URL = "https://api.vcvrack.com";
  33. Exception::Exception(const char* format, ...) {
  34. va_list args;
  35. va_start(args, format);
  36. msg = string::fV(format, args);
  37. va_end(args);
  38. }
  39. } // namespace rack