SCsub 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env python
  2. Import("env")
  3. from platform_methods import run_in_subprocess
  4. import main_builders
  5. env.main_sources = []
  6. env.add_source_files(env.main_sources, "*.cpp")
  7. # Order matters here. Higher index controller database files write on top of lower index database files.
  8. controller_databases = ["gamecontrollerdb.txt", "godotcontrollerdb.txt"]
  9. gensource = env.CommandNoCache(
  10. "default_controller_mappings.gen.cpp",
  11. controller_databases,
  12. run_in_subprocess(main_builders.make_default_controller_mappings),
  13. )
  14. env.add_source_files(env.main_sources, gensource)
  15. env.Depends("#main/splash.gen.h", "#main/splash.png")
  16. env.CommandNoCache("#main/splash.gen.h", "#main/splash.png", run_in_subprocess(main_builders.make_splash))
  17. if not env["no_editor_splash"]:
  18. env.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png")
  19. env.CommandNoCache(
  20. "#main/splash_editor.gen.h", "#main/splash_editor.png", run_in_subprocess(main_builders.make_splash_editor)
  21. )
  22. env.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
  23. env.CommandNoCache("#main/app_icon.gen.h", "#main/app_icon.png", run_in_subprocess(main_builders.make_app_icon))
  24. if env["tools"]:
  25. SConscript("tests/SCsub")
  26. lib = env.add_library("main", env.main_sources)
  27. env.Prepend(LIBS=[lib])