SCsub 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env python
  2. Import("env")
  3. import os
  4. from platform_methods import run_in_subprocess
  5. import platform_windows_builders
  6. common_win = [
  7. "godot_windows.cpp",
  8. "context_gl_windows.cpp",
  9. "crash_handler_windows.cpp",
  10. "os_windows.cpp",
  11. "key_mapping_windows.cpp",
  12. "joypad_windows.cpp",
  13. "tts_windows.cpp",
  14. "power_windows.cpp",
  15. "windows_terminal_logger.cpp",
  16. ]
  17. res_file = "godot_res.rc"
  18. res_target = "godot_res" + env["OBJSUFFIX"]
  19. res_obj = env.RES(res_target, res_file)
  20. prog = env.add_program("#bin/godot", common_win + res_obj, PROGSUFFIX=env["PROGSUFFIX"])
  21. # Microsoft Visual Studio Project Generation
  22. if env["vsproj"]:
  23. env.vs_srcs += ["platform/windows/" + res_file]
  24. env.vs_srcs += ["platform/windows/godot.natvis"]
  25. for x in common_win:
  26. env.vs_srcs += ["platform/windows/" + str(x)]
  27. if not os.getenv("VCINSTALLDIR"):
  28. if env["debug_symbols"] and env["separate_debug_symbols"]:
  29. env.AddPostAction(prog, run_in_subprocess(platform_windows_builders.make_debug_mingw))