mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
SCons: unify code generations routine and minimize timestamp changes
Previously, all of the code generation routines would just needlessly write the same files over and over, even when not needed. This became a problem with the advent of the experimental ninja backend for SCons, which can be trivially enabled with a few lines of code and relies on timestamp changes, making it thus impractical.
This commit is contained in:
@@ -5,6 +5,7 @@ import platform
|
||||
import uuid
|
||||
import functools
|
||||
import subprocess
|
||||
import methods
|
||||
|
||||
# NOTE: The multiprocessing module is not compatible with SCons due to conflict on cPickle
|
||||
|
||||
@@ -67,8 +68,8 @@ def generate_export_icons(platform_path, platform_name):
|
||||
|
||||
# NOTE: It is safe to generate this file here, since this is still executed serially.
|
||||
wf = export_path + "/" + name + "_svg.gen.h"
|
||||
with open(wf, "w", encoding="utf-8", newline="\n") as svgw:
|
||||
svgw.write(svg_str)
|
||||
|
||||
methods.write_file_if_needed(wf, svg_str)
|
||||
|
||||
|
||||
def get_build_version(short):
|
||||
|
||||
Reference in New Issue
Block a user