#48702: specenum generator: Initial implementation Open Date: 2023-09-22 23:01 Last Update: 2023-09-22 23:14 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/48702 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48702 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-09-22 23:14 Updated by: alienvalkyrie Comment: Made a proof-of-concept patch, migrating the enums of common/terrain.h; depends on #44767 in that it requires Python 3.6. This just has everything in gen_headers (no separate subdirectory yet). Added that to the include directories as well (meson only in this patch since that's what I'm developing with). It also doesn't support all regular specenum features yet. I tried to keep the enums def format close to the packets.def format, but I'm not happy with it yet; especially when adding more options. Might have to go with two separate bodies; one for the options, then some kind of marker, then enum constants. --------------------------------------------------------------------- Ticket Status: Reporter: alienvalkyrie Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: (None) Component: Bootstrap Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Part of #48675. Initial step (first subticket) should be possible without build system integration - expect developer to run the script manually, and keep the resulting header under version control. Shouldn't do that for a large number of generated headers, but just for the first. This ticket is about writing the script with at least the basic functionality and using it to replace the enums in just one or a few headers (to test/showcase), calling it manually when the definition is changed. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/48702 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48702