mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
SCons: Ensure written files are properly flushed/closed
This broke at least the generation of AndroidManifest.xml with Python 3.13.1.
This commit is contained in:
parent
69d43053de
commit
e6b0829d76
6 changed files with 13 additions and 0 deletions
|
|
@ -43,6 +43,7 @@ def build_shader_header(target, source, env):
|
|||
line = fs.readline()
|
||||
|
||||
fd.write(";\n")
|
||||
fd.close()
|
||||
|
||||
return 0
|
||||
|
||||
|
|
@ -1105,6 +1106,7 @@ def update_version():
|
|||
f.write("#define VERSION_STATUS " + str(version.status) + "\n")
|
||||
import datetime
|
||||
f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n")
|
||||
f.close()
|
||||
|
||||
|
||||
def parse_cg_file(fname, uniforms, sizes, conditionals):
|
||||
|
|
@ -1175,6 +1177,7 @@ def build_cg_shader(sname):
|
|||
fd.write('\t\tVP_%s,\n' % vp_uniforms[i].upper())
|
||||
|
||||
fd.write("\t};\n")
|
||||
fd.close()
|
||||
|
||||
|
||||
import glob
|
||||
|
|
@ -1230,6 +1233,7 @@ void unregister_module_types() {
|
|||
|
||||
f = open("modules/register_module_types.gen.cpp", "w")
|
||||
f.write(modules_cpp)
|
||||
f.close()
|
||||
|
||||
return module_list
|
||||
|
||||
|
|
@ -1464,6 +1468,7 @@ def save_active_platforms(apnames, ap):
|
|||
wf = x + "/logo.gen.h"
|
||||
logow = open(wf, "w")
|
||||
logow.write(str)
|
||||
logow.close()
|
||||
|
||||
|
||||
def no_verbose(sys, env):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue