mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	GDScript: Reintroduce binary tokenization on export
This adds back a function available in 3.x: exporting the GDScript files in a binary form by converting the tokens recognized by the tokenizer into a data format. It is enabled by default on export but can be manually disabled. The format helps with loading times since, the tokens are easily reconstructed, and with hiding the source code, since recovering it would require a specialized tool. Code comments are not stored in this format. The `--test` command can also include a `--use-binary-tokens` flag which will run the GDScript tests with the binary format instead of the regular source code by converting them in-memory before the test runs.
This commit is contained in:
		
							parent
							
								
									41564aaf77
								
							
						
					
					
						commit
						b4d0a09f15
					
				
					 26 changed files with 1010 additions and 119 deletions
				
			
		|  | @ -323,6 +323,15 @@ String EditorExportPreset::get_script_encryption_key() const { | |||
| 	return script_key; | ||||
| } | ||||
| 
 | ||||
| void EditorExportPreset::set_script_export_mode(int p_mode) { | ||||
| 	script_mode = p_mode; | ||||
| 	EditorExport::singleton->save_presets(); | ||||
| } | ||||
| 
 | ||||
| int EditorExportPreset::get_script_export_mode() const { | ||||
| 	return script_mode; | ||||
| } | ||||
| 
 | ||||
| Variant EditorExportPreset::get_or_env(const StringName &p_name, const String &p_env_var, bool *r_valid) const { | ||||
| 	const String from_env = OS::get_singleton()->get_environment(p_env_var); | ||||
| 	if (!from_env.is_empty()) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 George Marques
						George Marques