fixed bootstrapping and asset handling

This commit is contained in:
2025-04-11 23:47:07 +02:00
parent f4bbbb9454
commit d73b8bb02e
15 changed files with 1432 additions and 318 deletions

View File

@@ -19,4 +19,19 @@ We already know that it makes some calls to lime under the hood which has a simi
The current project is built to create an openfl app using the hxml build system and bypass lime's/ openfl's build system entirely.
We are currently working on asset bundling, this is proving to be a difficult task. Please document how openfl does this in a file called BUILD_CHAIN_DOCUMENTATION_OPENFL.md
We are currently working on asset bundling, this is proving to be a difficult task. Please document how openfl does this in a file called OpenFL_Build_Chain_Asset_System_Deep_Dive.md
## What we need:
- `src/Assets.hx`
- define asset paths in a similar way to how openfl does this in the project.xml file. This will be done using a custom meta tag `@:Assets`
- We will have a macro in `src/macros/AssetMacro.hx` to process these meta tags, build a manifest, and copy the assets into the `--cpp` output directory specified in `build.hxml`
- `src/macros/AssetMacro.hx`
- Process `@:Assets` metatags defined in `src/Assets.hx`
- Build manifest in a `manifest` subdirectory the `--cpp` output directory specified in `build.hxml`
- copy the assets into the `assets` subdirectory in the `--cpp` output directory
- `src/ManifestResources.hx`
- initialize the Asset Libraries from the manifest files
- `src/ApplicationMain.hx`
- Initialize `src/ManifestResources.hx`
- bootstrap the openfl application
- add `src/Main.hx` to the application