Skip to content

Commit 7aa9959

Browse files
committed
SCons: Identify build clearly when using AES256 encryption key
It seems to be a common pitfall that users try to build custom templates with a key but somehow it doesn't get picked up as they expect it to.
1 parent 9e02194 commit 7aa9959

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/SCsub

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,15 @@ gen_hash = env.CommandNoCache(
185185
env.add_source_files(env.core_sources, gen_hash)
186186

187187
# Generate AES256 script encryption key
188+
encryption_key = os.environ.get("SCRIPT_AES256_ENCRYPTION_KEY")
189+
if encryption_key:
190+
print(
191+
"\n*** IMPORTANT: Compiling Godot with custom `SCRIPT_AES256_ENCRYPTION_KEY` set as environment variable."
192+
"\n*** Make sure to use templates compiled with this key when exporting a project with encryption.\n"
193+
)
188194
gen_encrypt = env.CommandNoCache(
189195
"script_encryption_key.gen.cpp",
190-
env.Value(os.environ.get("SCRIPT_AES256_ENCRYPTION_KEY")),
196+
env.Value(encryption_key),
191197
env.Run(core_builders.encryption_key_builder),
192198
)
193199
env.add_source_files(env.core_sources, gen_encrypt)

0 commit comments

Comments
 (0)