Skip to content

chore(windows): let engine.groupproj Build All work end-to-end in IDE #16192

Description

@MattGyverLee

Problem

Opening windows/src/engine/engine.groupproj in Delphi 12 CE loads all engine children (keyman.exe, kmcomapi.dll, tsysinfo.exe, tsysinfox64.exe) into one Project Manager window — a natural workflow for a contributor iterating on engine code. But IDE "Build All" doesn't work end-to-end today for two reasons:

  1. Group order is wrong: engine.groupproj lists tsysinfo before tsysinfox64. tsysinfo.dproj embeds tsysinfo_x64.res which requires tsysinfox64.exe to have been built first. Build All tries tsysinfo first and fails.
  2. The .exe → .bin → .res chain lives in shell: even in the correct order, the copy+rc step between the two Delphi builds is in windows/src/engine/tsysinfo/build.sh (do_build), not in tsysinfo.dproj. Delphi's Build All has no way to fire that shell step between compiling the two projects.

Result: CE contributors iterating on engine code have to walk through 4 CE prompts via the shell script even when they don't need the shell orchestration for anything else.

Proposed fix

Two small changes:

  1. Reorder engine.groupproj so tsysinfox64 sits before tsysinfo in the group. Both under <ItemGroup> and under the <Target Name="Build"> CallTarget list.

  2. Add a <PreBuildEvent> to tsysinfo.dproj that runs the copy + rc.exe:

    <PreBuildEvent>
      copy /Y "$(ProjectDir)..\tsysinfox64\bin\Win64\Debug\tsysinfox64.exe" "$(ProjectDir)tsysinfox64.bin"
      rc /nologo "$(ProjectDir)tsysinfo_x64.rc"
    </PreBuildEvent>

    (Exact paths / Configs may need parameterisation via $(Config).)

After this, IDE Build All on engine.groupproj produces all four engine outputs from the IDE, no CE-prompt terminal roundtrip needed.

The build.sh orchestration keeps working exactly as it does today (build.sh does the copy+rc BEFORE invoking delphi_msbuild on tsysinfo — the PreBuildEvent would just harmlessly re-run the same copy+rc, or be a no-op if the file is already fresh).

What this does NOT solve

Other cross-project dependencies still require build.sh scaffolding on a fresh clone:

  • devtools -buildmessageconstantsMessageIdentifierConsts.pas needed by keyman.dproj / kmshell.dproj
  • build_standards_data codegen for BCP-47 registry .pas files needed by TIKE
  • kmcmplib-19.dll (Rust build) needed by TIKE at runtime
  • regsvr32 kmcomapi.dll at install time

So the workflow becomes: full build.sh chain once for codegen and vendored deps, then Build All in the IDE for engine iteration. Currently: full build.sh chain every time.

Out of scope

  • Same treatment for desktop.groupproj and developer.groupproj: worth investigating in a follow-up but each has its own cross-project bits (Locale codegen for desktop/setup, kmcmplib runtime for TIKE, common_components.bpl / keyman_components.bpl for both).
  • This is deliberately not part of feat(windows): Delphi CE interactive build workflow #16044 which is conservative about .dproj touches.

Context

Surfaced during the CE workflow walkthrough for #16044 — testing whether the four sequential CE prompts for engine children were avoidable. Related to the broader Delphi-12-CE contributor onboarding work under #4599.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions