Skip to content

Conversation

@klefo0
Copy link

@klefo0 klefo0 commented Oct 23, 2025

No description provided.

@ARGV = grep { $_ ne '--32' } @ARGV if $bin32;

my $input = $ARGV[0] || 'codegen/codegen.out.xml';
my $input = $ARGV[0] || 'codegen.out.xml';
Copy link
Member

Choose a reason for hiding this comment

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

I believe this script is intended to be run from the df-structures root, where codegen/codegen.out.xml is the correct path if codegen.pl is run with default arguments.

Copy link
Author

Choose a reason for hiding this comment

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

but i only found the codegen.out.xml in df's include folder, there isn't codegen/codegen.out.xml

Copy link
Member

Choose a reason for hiding this comment

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

Historically, this tool has been run against a copy of the df-structures repo, with codegen.pl run with default arguments, which results in codegen.out.xml being placed in the codegen subfolder. DF build scripting runs codegen.pl with nondefault arguments and is not the default use case here.

my ($item, $name) = @_;

my $subtype = $item->getAttribute('ld:subtype');
my $subtype = $item->getAttribute('ld:subtype') || '';
Copy link
Member

Choose a reason for hiding this comment

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

if ld:subtype was required before, this probably means some new type we have added isn't generating it, and we should fix that instead.

render_item($tg, "*${name}");
} else {
render_item($tg, "${name}[$count]");
render_item($tg, $name . "[$count]");
Copy link
Member

Choose a reason for hiding this comment

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

what's the reason for these changes?

Copy link
Author

Choose a reason for hiding this comment

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

there is an error like this Global symbol "@name" requires explicit package name (did you forget to declare "my @name"?) at E:\Development\OnGoing_Project\dfhack\library\include\df\codegen_c_hdr.pl line 665. so i need to change that to new format

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.

3 participants