wxUiEditor
wxUiEditor copied to clipboard
Add command-line option to retrieve current data_version for AI-generated projects
Feature Request
Add a hidden/internal command-line option that returns the current data_version integer value for use when AI tools generate .wxui project files.
Problem
AI tools generating .wxui project files need to know the correct data_version to use in the XML root element. Currently, this requires:
- Parsing
src/pch.hto find thecurSupportedVerconstant - Cross-referencing with version mapping comments
This approach is unreliable because:
- The constant may be renamed or moved
- Comment format may change
- AI tools would need to parse C++ code
Proposed Solution
Add a command-line option such as:
wxUiEditor --data-version
This should:
- Return only the integer value of
curSupportedVer(e.g.,21) - Print to stdout with no additional text
- Exit immediately after printing
- Be documented in AI context documentation only (not user-facing docs)
Example Usage
$dataVersion = & wxUiEditor.exe --data-version
# Returns: 21
AI tools can then reliably construct the XML header:
<?xml version="1.0"?>
<wxUiEditorData data_version="21">
Benefits
- Reliable method for AI tools to determine correct data_version
- No need to parse source code or maintain version mapping tables
- Future-proof as wxUiEditor versions evolve
- Simple implementation (single printf/return)