config.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. def can_build(env, platform):
  2. return True
  3. def configure(env):
  4. if env['platform'] not in ['windows', 'osx', 'x11', 'server', 'android', 'haiku', 'javascript']:
  5. raise RuntimeError('This module does not currently support building for this platform')
  6. env.use_ptrcall = True
  7. env.add_module_version_string('mono')
  8. from SCons.Script import BoolVariable, PathVariable, Variables, Help
  9. envvars = Variables()
  10. envvars.Add(PathVariable('mono_prefix', 'Path to the mono installation directory for the target platform and architecture', '', PathVariable.PathAccept))
  11. envvars.Add(BoolVariable('mono_static', 'Statically link mono', False))
  12. envvars.Add(BoolVariable('mono_glue', 'Build with the mono glue sources', True))
  13. envvars.Add(BoolVariable('copy_mono_root', 'Make a copy of the mono installation directory to bundle with the editor', False))
  14. envvars.Add(BoolVariable('xbuild_fallback', 'If MSBuild is not found, fallback to xbuild', False))
  15. envvars.Update(env)
  16. Help(envvars.GenerateHelpText(env))
  17. if env['platform'] == 'javascript':
  18. # Mono wasm already has zlib builtin, so we need this workaround to avoid symbol collisions
  19. print('Compiling with Mono wasm disables \'builtin_zlib\'')
  20. env['builtin_zlib'] = False
  21. thirdparty_zlib_dir = "#thirdparty/zlib/"
  22. env.Prepend(CPPPATH=[thirdparty_zlib_dir])
  23. def get_doc_classes():
  24. return [
  25. '@C#',
  26. 'CSharpScript',
  27. 'GodotSharp',
  28. ]
  29. def get_doc_path():
  30. return 'doc_classes'
  31. def is_enabled():
  32. # The module is disabled by default. Use module_mono_enabled=yes to enable it.
  33. return False