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.

43 lines
1.0KB

  1. #include <common.hpp>
  2. #include <string.hpp>
  3. namespace rack {
  4. const std::string APP_NAME = "VCV Rack";
  5. const std::string APP_VERSION = TOSTRING(VERSION);
  6. #if defined ARCH_WIN
  7. const std::string APP_ARCH = "win";
  8. #elif ARCH_MAC
  9. const std::string APP_ARCH = "mac";
  10. #elif defined ARCH_LIN
  11. const std::string APP_ARCH = "lin";
  12. #endif
  13. const std::string ABI_VERSION = "2";
  14. const std::string API_URL = "https://api.vcvrack.com";
  15. const std::string API_VERSION = "2";
  16. } // namespace rack
  17. #if defined ARCH_WIN
  18. #include <windows.h>
  19. FILE* fopen_utf8(const char* filename, const char* mode) {
  20. return _wfopen((wchar_t*) rack::string::UTF8toUTF16(filename).c_str(), (wchar_t*) rack::string::UTF8toUTF16(mode).c_str());
  21. }
  22. int remove_utf8(const char* path) {
  23. return _wremove((wchar_t*) rack::string::UTF8toUTF16(path).c_str());
  24. }
  25. int rename_utf8(const char* oldname, const char* newname) {
  26. return _wrename((wchar_t*) rack::string::UTF8toUTF16(oldname).c_str(), (wchar_t*) rack::string::UTF8toUTF16(newname).c_str());
  27. }
  28. #endif