Skip to content

feat: add branding metadata rawfile to generated zones - #944

Open
michaeloliverx wants to merge 3 commits into
Laupetin:mainfrom
michaeloliverx:feat-branding-rawfile
Open

feat: add branding metadata rawfile to generated zones#944
michaeloliverx wants to merge 3 commits into
Laupetin:mainfrom
michaeloliverx:feat-branding-rawfile

Conversation

@michaeloliverx

Copy link
Copy Markdown
Contributor

Relates to #328

Example output:

generator.name=OpenAssetTools
generator.version=v0.31.0-28-gf99726d6
mod.name=iw4x_code_post_gfx_mp

Keys can be changed / discussed.

Comment thread src/ObjCompiling/RawFile/BrandingAssetCreator.h
if constexpr (requires { rawFile->compressedLen; })
rawFile->compressedLen = 0;

if constexpr (requires { rawFile->data.buffer; })

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL: you can do this... Oh wonders of modern c++.

Still a bit icky in bigger components over multiple games because its hard to debug which configuration gets what result 😅 but it's okay here i guess

{
const auto brandingText = CreateBrandingText(m_zone_definition, m_zone.m_name);
auto* rawFile = detail::CreateBrandingRawFile<typename Asset_t::Type, Compress>(m_memory, m_zone.m_name, brandingText);
context.AddAsset<Asset_t>(m_zone.m_name, rawFile);

@Laupetin Laupetin Aug 7, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably check if such a file is already in the zone?
This current overwrites any rawfile with the same name.

It would probably be better to prioritize user input and assets over this branding file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants