DSTEngine/standalone-openfl-app/IMPORTANT_INSTRUCTIONS.md

1.7 KiB

Important Development Instructions

In this repository you will find 3 projects.

One of them is in the root and src directories of this repo, this is the project we're actively working on.

The other 2 are located at

  • ./lime-repo
  • ./openfl-repo

Instructions:

Analyze the openfl repo, this project contains a build chain based on HXP that can be called from the commandline. We need to document how this buildchain operates when the following command is ran.

openfl test linux

We already know that it makes some calls to lime under the hood which has a similar build chain.

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 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