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.

common.cpp 923B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. const std::string APP_ARCH =
  16. #if defined ARCH_WIN
  17. "win"
  18. #elif defined ARCH_MAC
  19. "mac"
  20. #elif defined ARCH_LIN
  21. "lin"
  22. #endif
  23. "-"
  24. #if defined ARCH_X64
  25. "x64"
  26. #elif defined ARCH_ARM64
  27. "arm64"
  28. #endif
  29. ;
  30. const std::string API_URL = "https://api.vcvrack.com";
  31. Exception::Exception(const char* format, ...) {
  32. va_list args;
  33. va_start(args, format);
  34. msg = string::fV(format, args);
  35. va_end(args);
  36. }
  37. } // namespace rack