wxUiEditor icon indicating copy to clipboard operation
wxUiEditor copied to clipboard

Add command-line option to retrieve current data_version for AI-generated projects

Open Randalphwa opened this issue 1 month ago • 0 comments

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:

  1. Parsing src/pch.h to find the curSupportedVer constant
  2. 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)

Randalphwa avatar Nov 22 '25 02:11 Randalphwa