# Linux fully supported with Delphi

**URL:** <https://forum.castle-engine.io/t/linux-fully-supported-with-delphi/1100>\
**Category:** News\
**Created:** [February 24, 2024, 4:05pm UTC](https://forum.castle-engine.io/t/linux-fully-supported-with-delphi/1100 "2024-02-24T16:05:04Z")\
**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:** [February 24, 2024, 4:05pm UTC](https://forum.castle-engine.io/t/linux-fully-supported-with-delphi/1100/1 "2024-02-24T16:05:04Z")

</div>

| [![play_animation demo with Castle Game Engine on Delphi/Linux](https://forum.castle-engine.io/uploads/default/original/2X/9/9a182806bc60412b352293f33fedd1fe41f09f0a.png)](https://castle-engine.io/wp/wp-content/uploads/2024/02/delphi_linux_play_animation.png "play\_animation demo with Castle Game Engine on Delphi/Linux") |
| [![TCastleControl on FMX form with Castle Game Engine on Delphi/Linux](https://forum.castle-engine.io/uploads/default/original/2X/1/15c1573fc1bdcd1f59b77196618250f8fc488284.png)](https://castle-engine.io/wp/wp-content/uploads/2024/02/delphi_linux_fmx.png "TCastleControl on FMX form with Castle Game Engine on Delphi/Linux") |
| [![Downloads with Castle Game Engine on Delphi/Linux](https://forum.castle-engine.io/uploads/default/original/2X/3/3e0ecaf97dc5b7d1d2aeaae5fb0e40d1af51d5e3.png)](https://castle-engine.io/wp/wp-content/uploads/2024/02/delphi_linux_downloads.png "Downloads with Castle Game Engine on Delphi/Linux") |
| [![Automatic Castle Game Engine tests on Delphi/Linux](https://forum.castle-engine.io/uploads/default/original/2X/6/660710e523422922c2cb69888e3ef1fb2bebcc72.png)](https://castle-engine.io/wp/wp-content/uploads/2024/02/delphi_linux_tests.png "Automatic Castle Game Engine tests on Delphi/Linux") |

We are proud to announce that _Castle Game Engine_ supports now the [Linux](https://castle-engine.io/delphi_linux) platform with the [Delphi](https://castle-engine.io/delphi) compiler! You can now deploy your Delphi games to Windows and Linux with the same code-base.

This blog post describes various details, but really the recap is short: it just works and we have [extensive documentation about Delphi + Linux specific things](https://castle-engine.io/delphi_linux). Go ahead, [download the latest CGE](https://castle-engine.io/download) and try it out 🙂

Details about what happened:

1. Well, 410 commits happened 🙂 And I initially thought this (making CGE work with Delphi/Linux) will take me a few hours to do. Then I thought it will take me a few days. It ended up taking me almost 4 months (although I was doing many other CGE tasks in parallel to this). Let this be a lesson of humility for all devs who dare make optimistic estimates!
2. Both `TCastleWindow` and `TCastleControl` applications work perfectly with Delphi for Linux.

3. All `TCastleWindow` examples work on Delphi/Linux. Explore the examples in [CGE examples/ subdirectory](https://github.com/castle-engine/castle-engine/tree/master/examples) and build and run on Linux with Delphi.

4. The page about [TCastleControl in FMX applications](https://castle-engine.io/control_on_form) stays up-to-date and relevant for Delphi/Linux.

5. Downloads (web requests) using `TCastleDownload` work too on Delphi/Linux. You can test them by

6. Under the hood, the `TCastleWindow` and `TCastleControl` for Delphi on non-Windows are actually shared more than in FPC: they both rely on a common `TFmxOpenGLUtility` class responsible for some platform-specific work, in particular to initialize OpenGL context inside an FMX window.

7. This makes our code much more cross-platform in case of Delphi. Doing _Delphi/Android_ or _Delphi/iOS_ after this should be a breeze. But I’m _not_ going to do any estimates, in light of the first point on this list 🙂

8. All 407 automatic tests, exercising some edge-cases (also with window sizes and multiple contexts) pass on Delphi/Linux. You can run them yourself, just compile and run the project in [tests/](https://github.com/castle-engine/castle-engine/tree/master/tests) just like any other CGE project.

9. Underneath, the code to initialize contexts got some upgrades. The _glX_ and _EGL_ context management has been refactored to separate units and extending them is easier.

10. Our file filters are easier exposed for Delphi: `TFileFilterList` has now methods `TFileFilterList.LclFmxFilters`, `TFileFilterList.LclFmxFiltersFromString` (suitable for both LCL and FMX) and we have `CastleFmxUtils` unit with utilities to place CGE filtes in FMX open/save dialogs.

11. Our [package checking application](https://github.com/castle-engine/castle-engine/tree/master/tools/internal/check_packages) was much extended and it now checks also Delphi packages for correctness.

12. Simple shell tests (mostly some `grep` calls) in [cge\_shell\_tests](https://github.com/castle-engine/castle-engine/blob/master/tools/internal/cge_shell_tests) also check now that Delphi packages are correct, in particular that VCL or FMX dependencies don’t happen in packages where they shouldn’t.

Note: Embarcadero had a server outage recently. Everything should be back online for users with Delphi 12 or Delphi 11.3. See [Embarcadero blog](https://blogs.embarcadero.com/we-are-experiencing-a-hardware-outage/), [GetIt Update for Delphi 12](https://blogs.embarcadero.com/getit-update-rad-studio-12-getit-online-installation-is-now-available/), [GetIt Update for Delphi 11.3](https://blogs.embarcadero.com/getitupdateradstudio11getitonlineinstallation/). If you experience problems using GetIt to get FMXLinux, please consult the above articles.
