# Delphi improvements: build tool uses msbuild, allows to pick Delphi version, better generated DPROJ, hints to fix PAServer on Linux and linking on macOS

**URL:** https://forum.castle-engine.io/t/delphi-improvements-build-tool-uses-msbuild-allows-to-pick-delphi-version-better-generated-dproj-hints-to-fix-paserver-on-linux-and-linking-on-macos/2179
**Category:** News
**Created:** [July 5, 2026, 5:57am UTC](https://forum.castle-engine.io/t/delphi-improvements-build-tool-uses-msbuild-allows-to-pick-delphi-version-better-generated-dproj-hints-to-fix-paserver-on-linux-and-linking-on-macos/2179 "2026-07-05T05:57:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [July 5, 2026, 5:57am UTC](https://forum.castle-engine.io/t/delphi-improvements-build-tool-uses-msbuild-allows-to-pick-delphi-version-better-generated-dproj-hints-to-fix-paserver-on-linux-and-linking-on-macos/2179/1 "2026-07-05T05:57:11Z")

</div>

| [![Delphi + Castle Game Engine](https://forum.castle-engine.io/uploads/default/original/2X/9/9a20e38794b774be61ba4124bad93d1c85d5eaeb.png)](https://castle-engine.io/wp/wp-content/uploads/2026/07/delphi_walking.png "Delphi + Castle Game Engine") |

We improved how our engine tools ([build tool](https://castle-engine.io/build_tool) and [editor](https://castle-engine.io/editor)) call Delphi. These improvements take us closer to [making our engine compatible with Delphi for Android, iOS and macOS](https://castle-engine.io/delphi_more_platforms) and improve how you can build with Delphi from shell (e.g. from _Continuous Integration_ workflows) for all platforms.

1. First of all, our [build tool](https://castle-engine.io/build_tool), when using Delphi (pass `--compiler=delphi`), now calls [msbuild](https://docwiki.embarcadero.com/RADStudio/Sydney/en/Building_a_Project_Using_an_MSBuild_Command) when you build for non-Windows. We do not directly call `dcc*` compilers.

This makes building non-Windows applications with Delphi, using command-line, much easier. Notably, the command `castle-engine compile --compiler=delphi --os=linux` just works. See [using Delphi to build Linux applications](https://castle-engine.io/delphi_linux#_for_ci_continuous_integration_command_line_compilation_using_delphi_for_linux).

Note: pass `--verbose` to our build tool to see more details about what is executed. In effect, we pass options to `msbuild` to make it more verbose too. By default, `msbuild` output will be silent, unless Delphi will report some warnings/hints.

See our [dcc vs msbuild comparison](https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/delphi_dcc_vs_msbuild.md) for more explanation.

We still fallback to using `dcc*`

  - if we cannot find DPROJ, 
  - or if you pass `--use-delphi-dcc` option to the build tool,
  - or you build for Windows (because using `dcc` directly avoids the 32k command-line length problem, see [dcc vs msbuild comparison](https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/delphi_dcc_vs_msbuild.md)). 

_Note that this section of the post has been edited 1 day after publishing. We had to change our course. Initially, we tried to use `msbuild` also for Windows with Delphi \> 10, but this was not good, we’ve been hit by the 32k command-line length problem also with Delphi 13._

2. Build tool allows to request specific Delphi version (instead of always calling the latest) using `--delphi-version` parameter. For example, to compile using Delphi 13, call

3. We used to do this for a long time, knowing it’s not a good solution… time to remove this hack.

4. If you have issues with [Delphi+Linux](https://castle-engine.io/delphi_linux) and PAServer due to _“too new Python on Linux”_, see [here for solution](https://castle-engine.io/delphi_linux#_installing_pa_server).

5. Maybe you have problems building from Delphi 13 for _macOS/Aarch64 (Silicon)_? Then we have another tip:

Thanks for reading and stay tuned for more Delphi news — we are working on something exciting 🙂 As always, we appreciate your support on [Patreon](https://www.patreon.com/cw/castleengine).
