encounter / dtk-template

Project template for decomp-toolkit
Creative Commons Zero v1.0 Universal
17 stars 14 forks source link

Expand options for outputting context #3

Closed Repiteo closed 4 months ago

Repiteo commented 10 months ago

Bringing over this QOL from the Pikmin 2 repo. Context files now have these expanded capabilities:

image

Repiteo commented 9 months ago

Testing locally on some of the repos that use this repo's formatting, and this doesn't seem to work as expected compared to Pikmin 2. Gonna try to get to the bottom of that

encounter commented 8 months ago

For the recent feature I added to objdiff, auto-creating a decomp.me scratch, I implemented this same thing but slightly differently. Mainly: context generation are separate rules, and always available, but not built by default. I can see why it's useful to generate all of them at once, so maybe I can implement a ninja context step to do so

Repiteo commented 8 months ago

@ribbanya Having tried the alternative locally, I disagree with swapping the extension. With this implementation, it's making context for every compiled file, so that bloat would add up extremely fast. Because excluding it explicitly isn't as straightforward as I'd like, and considering the main use-case is to be taken to decomp.me, I'm fine with leaving it as-is in a metadata-esque way

However, one alternative would be still compiling all the context, but in a designated location. It would output similar to how .obj files are created in their own folders in a way that mirrors the scripts being compiled, just in a separate location. Excluding an entire directory would be significantly easier than dealing with wildcards

ribbanya commented 8 months ago

Yeah that makes sense. In that case I would prefer a layout of build/ctx/dolphin/gx/GXInit.c mirroring the source tree. Maybe build/ctx/src/... if you want to allow for multiple context root directories.

encounter commented 4 months ago

Thanks for the work on this, closing because context generation and objdiff decomp.me integration is available on main.