mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
SCons: Modernize shader builders
This commit is contained in:
parent
adc63c6149
commit
32de6285a8
8 changed files with 339 additions and 457 deletions
14
methods.py
14
methods.py
|
@ -1503,15 +1503,15 @@ def generated_wrapper(
|
|||
unassigned, the value is determined by file extension.
|
||||
"""
|
||||
|
||||
if guard is None:
|
||||
guard = path.endswith((".h", ".hh", ".hpp", ".hxx", ".inc"))
|
||||
|
||||
with open(path, "wt", encoding="utf-8", newline="\n") as file:
|
||||
file.write(generate_copyright_header(path))
|
||||
file.write("\n/* THIS FILE IS GENERATED. EDITS WILL BE LOST. */\n\n")
|
||||
if not path.endswith(".out"): # For test output, we only care about the content.
|
||||
file.write(generate_copyright_header(path))
|
||||
file.write("\n/* THIS FILE IS GENERATED. EDITS WILL BE LOST. */\n\n")
|
||||
|
||||
if guard:
|
||||
file.write("#pragma once\n\n")
|
||||
if guard is None:
|
||||
guard = path.endswith((".h", ".hh", ".hpp", ".hxx", ".inc"))
|
||||
if guard:
|
||||
file.write("#pragma once\n\n")
|
||||
|
||||
with StringIO(newline="\n") as str_io:
|
||||
yield str_io
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue