Asset packer bugfixes and improvements

- Ignore hidden files
- Fix .DS_Store
- Check known extensions
- Support precompiled anims
- Fix FBT integration
This commit is contained in:
Willy-JL
2024-03-17 21:19:13 +00:00
parent 03499243a3
commit 6ae098fa4e
2 changed files with 24 additions and 13 deletions

View File

@@ -72,24 +72,30 @@ def _packs_emitter(target, source, env):
target_dir = target[0]
env.Replace(_PACKS_OUT_DIR=target_dir)
env.Replace(_PACKS_SRC_DIR=source_dir)
target = set();
target = [
target_dir.File(source_dir.rel_path(node))
target.update(
source_dir.rel_path(node)
for node in env.GlobRecursive("*/Anims/manifest.txt", source_dir.srcnode())
]
target.extend(
target_dir.File(source_dir.rel_path(node).removesuffix(".png") + ".bm")
)
target.update(
source_dir.rel_path(node)
for node in env.GlobRecursive("*/Anims/**/*.bm", source_dir.srcnode())
)
target.update(
source_dir.rel_path(node).removesuffix(".png") + ".bm"
for node in env.GlobRecursive("*/Anims/**/*.png", source_dir.srcnode())
)
target.extend(
target_dir.File(source_dir.rel_path(node).removesuffix(".png") + ".bmx")
target.update(
source_dir.rel_path(node).removesuffix(".png") + ".bmx"
for node in env.GlobRecursive("*/Icons/**/*.png", source_dir.srcnode())
)
target.extend(
target_dir.File(source_dir.rel_path(node).removesuffix(".c") + ".u8f")
target.update(
source_dir.rel_path(node).removesuffix(".c") + ".u8f"
for node in env.GlobRecursive("*/Fonts/*.c", source_dir.srcnode())
)
target = [target_dir.File(path) for path in target]
return target, source