From 7aa99599d4fa691c0f28078cdf2a5d5ca023d6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 9 Jun 2025 10:47:24 +0200 Subject: [PATCH] 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. --- core/SCsub | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/SCsub b/core/SCsub index b4c4a691a27..7482262fffd 100644 --- a/core/SCsub +++ b/core/SCsub @@ -185,9 +185,15 @@ gen_hash = env.CommandNoCache( env.add_source_files(env.core_sources, gen_hash) # Generate AES256 script encryption key +encryption_key = os.environ.get("SCRIPT_AES256_ENCRYPTION_KEY") +if encryption_key: + print( + "\n*** IMPORTANT: Compiling Godot with custom `SCRIPT_AES256_ENCRYPTION_KEY` set as environment variable." + "\n*** Make sure to use templates compiled with this key when exporting a project with encryption.\n" + ) gen_encrypt = env.CommandNoCache( "script_encryption_key.gen.cpp", - env.Value(os.environ.get("SCRIPT_AES256_ENCRYPTION_KEY")), + env.Value(encryption_key), env.Run(core_builders.encryption_key_builder), ) env.add_source_files(env.core_sources, gen_encrypt)