recursive assets
Some checks failed
CI / build-test-release (push) Failing after 14m17s

This commit is contained in:
Jorijn van der Graaf 2026-05-12 03:44:14 +02:00
commit dea67ae5aa
2 changed files with 94 additions and 29 deletions

View file

@ -125,14 +125,23 @@ export namespace Crafter {
std::vector<fs::path> buildFiles;
std::vector<Define> defines;
std::vector<Shader> shaders;
// Source assets (.png, .obj) compressed via Crafter.Asset's
// SaveCompressed → .ctex/.cmesh in this configuration's bin dir.
// Requires Crafter.Asset in cfg.dependencies (transitively): the
// build engine locates it by name and uses its library API to do
// the conversion (an auxiliary host-target executable, generated
// once per build host, links Crafter.Asset and is invoked per
// asset). Forwarded to a consuming executable's bin dir alongside
// .spv shaders and cfg.files entries.
// Source assets compressed via Crafter.Asset's SaveCompressed →
// .ctex/.cmesh in this configuration's bin dir.
//
// Each entry is either:
// - A single .png/.obj file. Output lands flat in the bin dir:
// bin/<filename>.ctex or bin/<filename>.cmesh.
// - A directory. The build recurses; .png/.obj are compressed
// with the relative tree mirrored under bin/<dirname>/, and
// every other file in the tree is copied through unchanged.
// Lets mod/map trees (mod.json + cannon/base.obj +
// cannon/color.png) keep their nested layout so JSON paths
// like "cannon/base.cmesh" resolve at runtime.
//
// Crafter.Asset must be reachable through cfg.dependencies (the
// build engine links its library API into crafter-build via a
// self-host pass). Forwarded to a consuming executable's bin dir
// alongside .spv shaders and cfg.files entries.
std::vector<fs::path> assets;
std::vector<ExternalDependency> externalDependencies;
std::vector<std::string> compileFlags;