FireMonkey for Linux
- 1 What is FMX for Linux?
- 2 FireMonkey GUI Application Prerequisites
- 3 Getting Started
- 4 Additional Capabilities
- 5 Supported Linux Distributions
- 6 Additional Resources
- 7 See Also
What is FMX for Linux?
FireMonkey for Linux, also known as FMXLinux, is an add-on component provided to Delphi and RAD Studio Enterprise and Architect edition customers via an exclusive OEM agreement with FMXLinux. FMXLinux provides capabilities for building GUI applications for Linux, extending RAD Studio’s (Delphi Edition) FireMonkey cross-platform framework.
Starting with 10.3.1, the FireMonkey for Linux (FMX) client add-on is available for Delphi and RAD Studio Enterprise customers that are current on Update Subscription via the RAD Studio GetIt Package Manager in the IDE.
- FireMonkey for Linux provides the ability to create GUI applications for Linux, extending Delphi’s FireMonkey cross-platform framework.
- FMXLinux expands Delphi’s support from server applications to FMX client applications for popular Linux distributions.
- Includes several ready-to-use user interface styles.
- Many of the FMX components, such as grids, widgets, etc. work seamlessly on Linux clients.
- Leverage RAD Studio’s innovative features, such as Live Bindings, and much more, in your Linux client applications.
- Leverage WebKitGTK support to run an FMXLinux application as an HTML5 web application in the browser.
How to access FMX for Linux
To download and install FMXLinux, open Delphi, go to Tools > GetIt Package Manager, and search for fmxlinux. At the end of the process, you need to restart the IDE, as requested by the GetIt package manager.
FireMonkey GUI Application Prerequisites
Installing Linux Platform Support
Before installing FMXLinux, you need to have Linux platform support for Delphi installed. Go to Tools > Manage Platforms to verify that Delphi Linux 64-bit is installed.
Installing and running PAServer
After installing Linux platform support, you need to install the Platform Assistant on Linux to build and deploy Linux applications. PAServer enables you to use the Deployment Manager, import the Linux SDK, and perform remote debugging on a Linux system. After installing PAServer for Linux, you will need to run PAServer before you can start building FMX Linux GUI applications.
Installing dependencies on your Linux server
To use graphical features in your server application, you will need to install some dependencies. You don't need to install the whole X11 system on your server.
To install dependencies on Ubuntu/Debian, type this into the terminal:
sudo apt install libgl1-mesa-glx libglu1-mesa libgtk-3-common libgstreamer1.0 libgstreamer-plugins-base1.0
When installing FMXLinux via GetIt, the system registers a DLL Expert (which adds the “Add Linux Platform”) menu indicated below and also adds the catalog repository library folder to the Library Path for the Linux platform. You can verify this in Tools > Options > Language > Delphi Options > Library and choose Linux 64-bit from the Selected Platform combo box at the top:
Building and deploying your first project
After installing the prerequisites listed above and FMXLinux via the GetIt Package Manager, go to File > Open Project to open an existing FireMonkey Project or File > New > Multi-Device Application to create a new FireMonkey project.
Next, right-click on the project in the Project Group to Add Linux platform.
Once you’ve added the Linux platform to your project, you will be able to switch to Linux 64-bit and deploy your FMX GUI applications to Linux. Ensure that PAServer is running on your target Linux machine. Click Run to deploy your Linux GUI application.
Web Deployment to Ubuntu Server
You can use the GTK-Broadway backend to run an FMXLinux application as an HTML5 web application in the browser:
- Install Required Libs:
sudo apt install xorg libgl1-mesa-dev libosmesa-dev libgtk-3-bin
- Start broadway server: broadwayd
- Run application from IDE
- Load :8080 in the browser
Supported Linux Distributions
Delphi Linux supports RedHat Enterprise and Ubuntu distributions, see the list of Supported Target Platforms for more information.
There are a number of videos that you can view for help with getting started building FMX Linux applications:
- FMXLinux app in action
- Adding FMX Linux to your project
- FMX UI controls on Linux
- Running an FMXLinux app as an HTML5 web application in the browser
- CodeRage webinar replay