config.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Prior to .NET Core, we supported these: ["windows", "macos", "linuxbsd", "android", "haiku", "web", "ios"]
  2. # Eventually support for each them should be added back (except Haiku if not supported by .NET Core)
  3. supported_platforms = ["windows", "macos", "linuxbsd"]
  4. def can_build(env, platform):
  5. return not env["arch"].startswith("rv")
  6. def get_opts(platform):
  7. from SCons.Variables import BoolVariable, PathVariable
  8. default_mono_static = platform in ["ios", "web"]
  9. default_mono_bundles_zlib = platform in ["web"]
  10. return [
  11. PathVariable(
  12. "dotnet_root",
  13. "Path to the .NET Sdk installation directory for the target platform and architecture",
  14. "",
  15. PathVariable.PathAccept,
  16. ),
  17. ]
  18. def configure(env):
  19. platform = env["platform"]
  20. if platform not in supported_platforms:
  21. raise RuntimeError("This module does not currently support building for this platform")
  22. env.add_module_version_string("mono")
  23. def get_doc_classes():
  24. return [
  25. "CSharpScript",
  26. "GodotSharp",
  27. ]
  28. def get_doc_path():
  29. return "doc_classes"
  30. def is_enabled():
  31. # The module is disabled by default. Use module_mono_enabled=yes to enable it.
  32. return False