msvs.py 754 B

12345678910111213141516171819202122232425
  1. import methods
  2. # Tuples with the name of the arch that will be used in VS, mapped to our internal arch names.
  3. # For Windows platforms, Win32 is what VS wants. For other platforms, it can be different.
  4. def get_platforms():
  5. return [("Win32", "x86_32"), ("x64", "x86_64")]
  6. def get_configurations():
  7. return ["editor", "template_debug", "template_release"]
  8. def get_build_prefix(env):
  9. if not env.msvc:
  10. return []
  11. batch_file = methods.find_visual_c_batch_file(env)
  12. return [
  13. "cmd /V /C",
  14. "set "plat=$(PlatformTarget)"",
  15. "^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64"))",
  16. f"^& call "{batch_file}" !plat!",
  17. "^&",
  18. ]