summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-04-04 14:31:24 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-04-04 14:31:24 +0200
commit7fa97f37fba8aebbf11f646596b218c59d5ed561 (patch)
treec10739f689580ce1f27bfe3980e53c923e0074bd /core
parenta28be933eea39b9969b201d90c19e1f4ab822ab5 (diff)
parent55558fb17574ddcbf0dcbba3f90a1aa880907f28 (diff)
downloadredot-engine-7fa97f37fba8aebbf11f646596b218c59d5ed561.tar.gz
Merge pull request #89452 from Riteo/name-a-better-duo
SCons: Enable the experimental Ninja backend and minimize timestamp changes to generated code
Diffstat (limited to 'core')
-rw-r--r--core/SCsub9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/SCsub b/core/SCsub
index 7edf8ea88d..f7b733a221 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -3,6 +3,7 @@
Import("env")
import core_builders
+import methods
env.core_sources = []
@@ -35,10 +36,12 @@ if "SCRIPT_AES256_ENCRYPTION_KEY" in os.environ:
)
Exit(255)
-# NOTE: It is safe to generate this file here, since this is still executed serially
-with open("script_encryption_key.gen.cpp", "w", encoding="utf-8", newline="\n") as f:
- f.write('#include "core/config/project_settings.h"\nuint8_t script_encryption_key[32]={' + txt + "};\n")
+script_encryption_key_contents = (
+ '#include "core/config/project_settings.h"\nuint8_t script_encryption_key[32]={' + txt + "};\n"
+)
+
+methods.write_file_if_needed("script_encryption_key.gen.cpp", script_encryption_key_contents)
# Add required thirdparty code.