Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back script encryption in export preset #24582

Merged
merged 1 commit into from
Jan 4, 2019
Merged

Bring back script encryption in export preset #24582

merged 1 commit into from
Jan 4, 2019

Conversation

Xrayez
Copy link
Contributor

@Xrayez Xrayez commented Dec 24, 2018

What started as curiosity ended up as an actual implementation. 😁

Retrieved working implementation from 2.1 branch and adapted to
existing export preset system.

Added Script tab in export preset to export script as raw text,
compiled, or encrypted (same as in 2.1). The script encryption key is
visually validated. The script export mode and the key is saved per
per preset in `export_presets.cfg`, so it makes sense to ignore this
file in version control system.

Each custom exporting procedure can retrieve an export preset set
during project exporting. Refactored project export dialog a bit to
allow easier code comprehension.

Tested in both debug and release modes, with text, compiled, and encrypted modes respectively. If wrong key is provided during export, the exported project will crash, which is expected:

ERROR: open_and_parse: Condition ' String::md5(md5.digest) != String::md5(md5d) ' is true. returned: ERR_FILE_CORRUPT
      At: core/io/file_access_encrypted.cpp:103

The scripts are exported as .gde as before. The default script export mode is still Compiled, not Text.

I'll also write documentation for this in godot-docs.

Fixes #24121.

script_encrypt_export

Also, Merry Christmas! 🎄

Retrieved working implementation from 2.1 branch and adapted to
existing export preset system.

Added Script tab in export preset to export script as raw text,
compiled, or encrypted (same as in 2.1). The script encryption key is
visually validated. The script export mode and the key is saved per
per preset in `export_presets.cfg`, so it makes sense to ignore this
file in version control system.

Each custom exporting procedure can retrieve an export preset set
during project exporting. Refactored project export dialog a bit to
allow easier code comprehension.
@girng
Copy link

girng commented Jan 1, 2019

wow... glad it's back thank you

@Xrayez
Copy link
Contributor Author

Xrayez commented Jan 4, 2019

As been discussed in linked issues, perhaps we should rename script export mode from Compiled to Binary to avoid confusion, and leave Compiled for an actual implementation.

@akien-mga akien-mga merged commit 5809be9 into godotengine:master Jan 4, 2019
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants