Environment.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #include "il2cpp-config.h"
  2. #if IL2CPP_USE_GENERIC_ENVIRONMENT
  3. #include "os/Environment.h"
  4. #include <cstdlib>
  5. namespace il2cpp
  6. {
  7. namespace os
  8. {
  9. std::string Environment::GetMachineName()
  10. {
  11. return "il2cpp";
  12. }
  13. int32_t Environment::GetProcessorCount()
  14. {
  15. return 1;
  16. }
  17. std::string Environment::GetOsVersionString()
  18. {
  19. return "0.0.0.0";
  20. }
  21. std::string Environment::GetOsUserName()
  22. {
  23. return "Unknown";
  24. }
  25. std::string Environment::GetEnvironmentVariable(const std::string& name)
  26. {
  27. return std::string("<NotImplemented>");
  28. }
  29. void Environment::SetEnvironmentVariable(const std::string& name, const std::string& value)
  30. {
  31. }
  32. std::vector<std::string> Environment::GetEnvironmentVariableNames()
  33. {
  34. IL2CPP_NOT_IMPLEMENTED_ICALL(Environment::GetEnvironmentVariableNames);
  35. return std::vector<std::string>();
  36. }
  37. std::string Environment::GetHomeDirectory()
  38. {
  39. IL2CPP_NOT_IMPLEMENTED_ICALL(Environment::GetHomeDirectory);
  40. return std::string();
  41. }
  42. std::vector<std::string> Environment::GetLogicalDrives()
  43. {
  44. return std::vector<std::string>();
  45. }
  46. void Environment::Exit(int result)
  47. {
  48. IL2CPP_NOT_IMPLEMENTED_ICALL(Environment::Exit);
  49. }
  50. NORETURN void Environment::Abort()
  51. {
  52. abort();
  53. }
  54. utils::Expected<bool> Environment::Is64BitOs()
  55. {
  56. return false;
  57. }
  58. }
  59. }
  60. #endif