From a885fbf1af3824e61d807ac8e28272e80031d412 Mon Sep 17 00:00:00 2001 From: Wynd Date: Sat, 24 Jan 2026 23:19:55 +0200 Subject: [PATCH] Added the custom export template settings --- README.md | 4 +- profiles/.gdignore | 0 profiles/justfile | 19 ++++ profiles/minsize.gdbuild | 199 +++++++++++++++++++++++++++++++++++++++ profiles/minsize.py | 19 ++++ 5 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 profiles/.gdignore create mode 100644 profiles/justfile create mode 100644 profiles/minsize.gdbuild create mode 100644 profiles/minsize.py diff --git a/README.md b/README.md index cc744ca..5f4c0c9 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ original TUI app here: [https://git.pixelatedw.xyz/wynd/gamo](https://git.pixela there's nothing particularly fancy about this and it does what it says, allows the user to test their gamepad made with godot because I couldn't be bothered with any GUI toolkits out there -it uses a custom exporting template to cut down its size by more than half +it uses a custom exporting template (built script only works on linux at the moment) to cut down its size by more than half -compared with the original TUI version it is huge coming at around 32MB (about 17 times more) and it consumes about 26 times more RAM (~130MB) +compared with the original TUI version it is huge coming at around 21MB (about 11 times more) and it consumes about 26 times more RAM (~130MB) however it comes with a bunch of benefits such as a much nicer layout, button images, transparency and an overall (very subjecitve) nicer UX/DX ## controls diff --git a/profiles/.gdignore b/profiles/.gdignore new file mode 100644 index 0000000..e69de29 diff --git a/profiles/justfile b/profiles/justfile new file mode 100644 index 0000000..fd5ae38 --- /dev/null +++ b/profiles/justfile @@ -0,0 +1,19 @@ +set export +set dotenv-load +set quiet + +build-minsize gdbuild="false": + #!/usr/bin/env bash + set -x + + godot_path="." + if [ -n "$GODOT_PATH" ]; then + godot_path="$GODOT_PATH" + fi + + gdbuild_profile="" + if [ "$gdbuild" == "true" ]; then + gdbuild_profile="build_profile="$(pwd)/minsize.gdbuild"" + fi + + scons -C "$godot_path" platform=linux profile="$(pwd)/minsize.py" "$gdbuild_profile" diff --git a/profiles/minsize.gdbuild b/profiles/minsize.gdbuild new file mode 100644 index 0000000..a4d3f6a --- /dev/null +++ b/profiles/minsize.gdbuild @@ -0,0 +1,199 @@ +{ + "disabled_build_options": { + "d3d12": false, + "disable_3d": true, + "disable_navigation_2d": true, + "disable_navigation_3d": true, + "disable_physics_2d": true, + "disable_physics_3d": true, + "disable_xr": true, + "forward_mobile_renderer": false, + "forward_plus_renderer": false, + "metal": false, + "module_godot_physics_2d_enabled": false, + "module_godot_physics_3d_enabled": false, + "module_jolt_physics_enabled": false, + "module_openxr_enabled": false, + "rendering_device": false, + "vulkan": false + }, + "disabled_classes": [ + "Animation", + "AnimationLibrary", + "AnimationMixer", + "AnimationNode", + "AnimationNodeStateMachinePlayback", + "AnimationNodeStateMachineTransition", + "AudioBusLayout", + "AudioEffect", + "AudioStream", + "AudioStreamPlayer", + "BaseMaterial3D", + "BitMap", + "BoneMap", + "ButtonGroup", + "CameraAttributes", + "CanvasItemMaterial", + "CanvasLayer", + "ColorPalette", + "Compositor", + "CompositorEffect", + "CryptoKey", + "Curve", + "Curve2D", + "Curve3D", + "Environment", + "FogMaterial", + "FoldableGroup", + "GDExtension", + "GLTFAccessor", + "GLTFAnimation", + "GLTFBufferView", + "GLTFCamera", + "GLTFDocument", + "GLTFDocumentExtension", + "GLTFLight", + "GLTFMesh", + "GLTFNode", + "GLTFPhysicsBody", + "GLTFPhysicsShape", + "GLTFSkeleton", + "GLTFSkin", + "GLTFSpecGloss", + "GLTFState", + "GLTFTexture", + "GLTFTextureSampler", + "HTTPRequest", + "InstancePlaceholder", + "JSON", + "LabelSettings", + "LightmapGIData", + "Mesh", + "MeshLibrary", + "MultiMesh", + "MultiplayerSpawner", + "MultiplayerSynchronizer", + "NavigationAgent2D", + "NavigationAgent3D", + "NavigationMesh", + "NavigationMeshSourceGeometryData2D", + "NavigationMeshSourceGeometryData3D", + "NavigationPolygon", + "Node2D", + "Node3D", + "Noise", + "Occluder3D", + "OccluderPolygon2D", + "OggPacketSequence", + "OpenXRAction", + "OpenXRActionMap", + "OpenXRActionSet", + "OpenXRBindingModifier", + "OpenXRHapticBase", + "OpenXRIPBinding", + "OpenXRInteractionProfile", + "PackedDataContainer", + "PanoramaSkyMaterial", + "ParticleProcessMaterial", + "PhysicalSkyMaterial", + "PhysicsMaterial", + "PlaceholderMaterial", + "ProceduralSkyMaterial", + "RDShaderFile", + "RDShaderSPIRV", + "Shape2D", + "Shape3D", + "SkeletonModification2D", + "SkeletonModificationStack2D", + "SkeletonProfile", + "Skin", + "Sky", + "SpriteFrames", + "StyleBoxEmpty", + "StyleBoxLine", + "StyleBoxTexture", + "SyntaxHighlighter", + "Texture", + "TileMapPattern", + "TileSet", + "TileSetSource", + "VideoStream", + "VideoStreamPlayback", + "VisualShaderNodeBillboard", + "VisualShaderNodeBooleanParameter", + "VisualShaderNodeClamp", + "VisualShaderNodeColorFunc", + "VisualShaderNodeColorOp", + "VisualShaderNodeCompare", + "VisualShaderNodeConstant", + "VisualShaderNodeCubemap", + "VisualShaderNodeCustom", + "VisualShaderNodeDerivativeFunc", + "VisualShaderNodeDeterminant", + "VisualShaderNodeDistanceFade", + "VisualShaderNodeDotProduct", + "VisualShaderNodeFaceForward", + "VisualShaderNodeFloatFunc", + "VisualShaderNodeFloatOp", + "VisualShaderNodeFloatParameter", + "VisualShaderNodeFresnel", + "VisualShaderNodeIf", + "VisualShaderNodeInput", + "VisualShaderNodeIntFunc", + "VisualShaderNodeIntOp", + "VisualShaderNodeIntParameter", + "VisualShaderNodeIs", + "VisualShaderNodeLinearSceneDepth", + "VisualShaderNodeMix", + "VisualShaderNodeMultiplyAdd", + "VisualShaderNodeOuterProduct", + "VisualShaderNodeOutput", + "VisualShaderNodeParameterRef", + "VisualShaderNodeParticleAccelerator", + "VisualShaderNodeParticleConeVelocity", + "VisualShaderNodeParticleEmit", + "VisualShaderNodeParticleEmitter", + "VisualShaderNodeParticleMultiplyByAxisAngle", + "VisualShaderNodeParticleRandomness", + "VisualShaderNodeProximityFade", + "VisualShaderNodeRandomRange", + "VisualShaderNodeRemap", + "VisualShaderNodeReroute", + "VisualShaderNodeResizableBase", + "VisualShaderNodeRotationByAxis", + "VisualShaderNodeSDFRaymarch", + "VisualShaderNodeSDFToScreenUV", + "VisualShaderNodeSample3D", + "VisualShaderNodeScreenNormalWorldSpace", + "VisualShaderNodeScreenUVToSDF", + "VisualShaderNodeSmoothStep", + "VisualShaderNodeStep", + "VisualShaderNodeSwitch", + "VisualShaderNodeTexture", + "VisualShaderNodeTextureParameter", + "VisualShaderNodeTextureSDF", + "VisualShaderNodeTextureSDFNormal", + "VisualShaderNodeTransformCompose", + "VisualShaderNodeTransformDecompose", + "VisualShaderNodeTransformFunc", + "VisualShaderNodeTransformOp", + "VisualShaderNodeTransformParameter", + "VisualShaderNodeTransformVecMult", + "VisualShaderNodeUIntFunc", + "VisualShaderNodeUIntOp", + "VisualShaderNodeUIntParameter", + "VisualShaderNodeUVFunc", + "VisualShaderNodeUVPolarCoord", + "VisualShaderNodeVarying", + "VisualShaderNodeVec2Parameter", + "VisualShaderNodeVec3Parameter", + "VisualShaderNodeVec4Parameter", + "VisualShaderNodeVectorBase", + "VisualShaderNodeWorldPositionFromDepth", + "VoxelGIData", + "World2D", + "World3D", + "X509Certificate" + ], + "type": "build_profile" +} \ No newline at end of file diff --git a/profiles/minsize.py b/profiles/minsize.py new file mode 100644 index 0000000..edae4f0 --- /dev/null +++ b/profiles/minsize.py @@ -0,0 +1,19 @@ +target = "template_release" +debug_symbols = "no" +optimize = "size_extra" +lto = "full" +deprecated = "no" +vulkan = "no" +use_volk = "no" +openxr = "no" +minizip = "no" +graphite = "no" +modules_enabled_by_default = "no" +module_gdscript_enabled = "yes" +module_text_server_fb_enabled = "yes" +module_freetype_enabled = "yes" +module_svg_enabled = "yes" +disable_3d = "yes" +disable_navigation_2d = "yes" +disable_navigation_3d = "yes" +disable_xr = "yes"