Open enxas opened 1 year ago
Does it work if you don't set up rcedit, so that it doesn't modify the executable?
Removing rcedit path from Editor Settings -> Export -> Windows still produces this error. Also unchecking "Modify Resources" doesn't change anything and still produces bad binary as long as "Encrypt Index" is turned on.
Usually this error happens when a wrong template is used. Re-check if you have set encryption key env. variable during template build (also check core/script_encryption_key.gen.cpp
generated file after the build for the correct key).
File at core/script_encryption_key.gen.cpp
contains this:
uint8_t script_encryption_key[32]={0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};
I assume these zeroes mean that encryption key env. variable wasn't properly set?
I assume these zeroes mean that encryption key env. variable wasn't properly set?
Yes, zeros mean it's not set, it should be the key in hex format which is read from the SCRIPT_AES256_ENCRYPTION_KEY
environment variable.
This is my Windows Terminal Powershell history. I did set the env. variable. Not sure why it didn't work.
Is there scons clean command to clean build artifacts or should I just delete bin
directory and start over gain?
Edit: Another question. If encryption key wasn't set properly, then why only "Encrypt Index" option is affected? "Encrypt Exported PCK" option works fine when enabled.
Another question. If encryption key wasn't set properly, then why only "Encrypt Index" option is affected? "Encrypt Exported PCK" option works fine when enabled.
Have you selected any files to encrypt ("filters to include" in the export options encryption tab)? Only these files are encrypted, and an error will pop up only when one of the encrypted files is accessed.
Have you selected any files to encrypt ("filters to include" in the export options encryption tab)?
No I haven't. I didn't knew that only explicitly listed files in "filters to include" are encrypted,
Godot version
v4.1.1.stable.mono.official [bd6af8e0e]
System information
Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 Ti with Max-Q Design (NVIDIA; 31.0.15.3640) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)
Issue description
When "Encrypt Index" option is enabled in Export window exported binary throws error when launched. Turning "Encrypt Index" off will export properly and exported binary works as expected.
When binary is launched with
--verbose
flag, this is full error.Steps to reproduce
I have this configured: Editor Settings -> Export -> Window -> C:/tools/rcedit.exe (from https://github.com/electron/rcedit/releases)
--verbose
flag.My Export settings (mostly default)
Remove .txt extension, couldn't upload this file othervise: export_presets.cfg.txt
Minimal reproduction project
NA