You've already forked godot
							
							
				mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-04 12:00:25 +00:00 
			
		
		
		
	Merge pull request #111015 from Alexofp/texture-compression-build-option
Scons option to enable CVTT and Betsy compression in export templates
This commit is contained in:
		@@ -1,5 +1,17 @@
 | 
				
			|||||||
def can_build(env, platform):
 | 
					def can_build(env, platform):
 | 
				
			||||||
    return env.editor_build
 | 
					    return env.editor_build or env["betsy_export_templates"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def get_opts(platform):
 | 
				
			||||||
 | 
					    from SCons.Variables import BoolVariable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return [
 | 
				
			||||||
 | 
					        BoolVariable(
 | 
				
			||||||
 | 
					            "betsy_export_templates",
 | 
				
			||||||
 | 
					            "Enable Betsy image compression in export template builds (increases binary size)",
 | 
				
			||||||
 | 
					            False,
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def configure(env):
 | 
					def configure(env):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,17 @@
 | 
				
			|||||||
def can_build(env, platform):
 | 
					def can_build(env, platform):
 | 
				
			||||||
    return env.editor_build
 | 
					    return env.editor_build or env["cvtt_export_templates"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def get_opts(platform):
 | 
				
			||||||
 | 
					    from SCons.Variables import BoolVariable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return [
 | 
				
			||||||
 | 
					        BoolVariable(
 | 
				
			||||||
 | 
					            "cvtt_export_templates",
 | 
				
			||||||
 | 
					            "Enable CVTT image compression in export template builds (increases binary size)",
 | 
				
			||||||
 | 
					            False,
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def configure(env):
 | 
					def configure(env):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,8 +30,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "register_types.h"
 | 
					#include "register_types.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef TOOLS_ENABLED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "image_compress_cvtt.h"
 | 
					#include "image_compress_cvtt.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void initialize_cvtt_module(ModuleInitializationLevel p_level) {
 | 
					void initialize_cvtt_module(ModuleInitializationLevel p_level) {
 | 
				
			||||||
@@ -47,5 +45,3 @@ void uninitialize_cvtt_module(ModuleInitializationLevel p_level) {
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // TOOLS_ENABLED
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,11 +30,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef TOOLS_ENABLED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "modules/register_module_types.h"
 | 
					#include "modules/register_module_types.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void initialize_cvtt_module(ModuleInitializationLevel p_level);
 | 
					void initialize_cvtt_module(ModuleInitializationLevel p_level);
 | 
				
			||||||
void uninitialize_cvtt_module(ModuleInitializationLevel p_level);
 | 
					void uninitialize_cvtt_module(ModuleInitializationLevel p_level);
 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // TOOLS_ENABLED
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user