15. Short introduction about FMXLinux
15. Kurze Einführung zu FMXLinux

GERMAN

Was ist FMXLinux?

FMXLinux ist ein Tool und Ergänzung für Delphi Entwickler (ab Enterprise-Version), mit dessen Hilfe man Desktop-Anwendungen für Linux erstellen kann.

In der Projektverwaltung steht dann eine weitere Plattform für Linux zur Verfügung:

English

What is FMXLinux?

FMXLinux is a tool and add-on for Delphi developers (starting with the Enterprise-version), with that you can build  desktop-applications for Linux.

In the project-window you will than have an additional platform for Linux available:



 


Man muss die Plattform allerdings selber hinzufügen, indem man mit der rechten Maustaste auf den Namen der Exe-Datei klickt und dann den Eintrag wählt:
 


However, you have to add the platform yourself by right-clicking on the name of the exe file and then selecting the entry:

Warum kann FMXLinux nur mit der Enterprise-Version von Delphi benutzt werden?

Die grundsätzliche Linux-Unterstützung ist in Delphi erst ab der Enterprise-Version integriert (allerdings auch nur für die Erstellung von Konsolenanwendungen).

Daher steht der notwendige Unterbau für FMXLinux erst ab der Enterprise-Version zur Verfügung.

 

Why can FMXLinux only be used with the Enterprise version of Delphi?

The basic Linux support is integrated in Delphi only from the Enterprise version on (but only for the creation of console applications).

Therefore, the necessary substructure for FMXLinux is only available beginning with the Enterprise edition.

 

Was sind die Voraussetzungen für die Nutzung von FMXLinux?

1. Delphi Enterprise (ab Tokyo) mit installierter Delphi 64 Bit Linux-Unterstützung
 

What are the requirements for using FMXLinux?

1. Delphi Enterprise (from Tokyo on) with Delphi 64-bit Linux support installed


2. Lauffähiges Linux-System, entweder als Bootsystem oder in einer virtuellen Maschine laufend. Ich persönlich habe beste Erfahrungen bei der Entwicklung mit Ubuntu 16 LTS gemacht.
 

2. Runnable Linux system, running either as a boot system or in a virtual machine.
Personally, I've had some great development experience with Ubuntu 16 LTS.
3. Einrichtung und Start des PAServer-Programms für Linux im laufenden Linux-Betriebssystem. Kopieren Sie dazu die Datei "LinuxPAServer19.0.tar.gz" auf ein Laufwerk, dass Sie unter Linux nutzen, entpacken die Datei mit dem Archiv-Manager und starten das PAServer-Programm mit dem Befehl "./paserver".

Unter Windows müssen Sie bei erstmaliger Verwendung der Linux-Plattform noch das SDK einrichten, das funktioniert entsprechend wie bei der MAC-Plattform.

Hinweis: In meinem FMX-Buch zu Delphi 10.2 finden Sie ein eigenes Kapitel "5. Cross-Platform Entwicklung mit Linux", wo die Einrichtungsschritte bebildert und Schritt für Schritt erläutert sind, incl. Einrichtung der Linux-SDK-Plattform.
 

3. Setting up and starting the PAServer program for Linux in the running Linux operating system.

To do this, copy the file "LinuxPAServer19.0.tar.gz" to a drive that you use on Linux, unpack the file with the Archive Manager and start the PAServer program with the command "./paserver".

On Windows, when using the Linux platform for the first time, you must set up the SDK, which works in the same way as with the MAC platform.

Note: In my FMX book for Delphi 10.2 you will find a separate chapter "5. Cross-Platform Development with Linux", where the setup steps are illustrated and explained, including setting up the Linux SDK platform.

4. Download und Installation von FMXLinux. Sie können eine kostenlose Testversion von FMXLinux von der Seite des Herstellers laden (diese ist voll funktionsfähig, beim Start des erzeugten Linux-Programms wird aber ein Hinweis auf die Verwendung einer Testversion ausgegeben):

https://fmxlinux.com/index.html

Wenn Sie die Vollversion käuflich erworben haben, müssen Sie noch zusätzlich ein Passwort bei der Installation eingeben, welches Ihnen der Hersteller zur Verfügung stellt.

 

4. Download and install FMXLinux. You can download a free trial version of FMXLinux from the manufacturer's website (it is fully functional, but when you start the generated Linux program you will get an indication of using a trial version):

https://fmxlinux.com/index.html

If you have purchased the full version, you must additionally enter a password during installation, which is provided by the manufacturer.

Wie arbeitet man mit FMXLinux in Delphi?

FMX-Linux bietet einen Standard-Experten für das Fenster-Design, Sie können also die Linux-Plattform auswählen und Ihre Anwendung ganz normal wie sonst auch designen. Allerdings gibt es hier zwei Einschränkungen:

1. Im UI-Designer steht keine eigene Ansicht (Stil) für die Linux-Plattform zur Verfügung. Das ist aber letztlich kein Problem, da Sie die Master-Ansicht verwenden können, um die Linux-Oberfläche zu gestalten. Und dann verwenden Sie den Windows oder MAC Stil, um abweichende Designs zu erstellen.

2. In der ausgewählten Linux-Plattform können Sie keine neuen Komponenten hinzufügen. Dazu müssen Sie kurz auf eine der anderen Ansichten wechseln (z.B. Windows), fügen die Komponente hinzu und wechseln dann wieder auf die Linux-Plattform.

 

How do you work with FMXLinux in Delphi?

FMX-Linux provides a standard expert for window designing, so you can choose the Linux platform and design your application the way you normally would. However, there are two limitations here:

1. The UI Designer does not have its own style view for the Linux platform. But this is not a problem, since you can use the master view to design the Linux interface. And then use the Windows or MAC style to create different designs.

2. You can not add new components to the selected Linux platform. To do this, you'll need to switch briefly to one of the other views (for example, Windows), add the component, and then switch back to the Linux platform.

Benötigt das erzeugte Linux-Programm weitere Dateien?

Das Programm benötigt die "Libfmux.so", welches Delphi / FMXLinux automatisch bei der Bereitstellung über den PAServer in das Verzeichnis des Anwendungsprogramms überträgt.

 

Does the generated Linux program need additional files?

The program requires the "Libfmux.so", which Delphi / FMXLinux automatically transfers to the directory of the application program via the PAServer.

Wie integriert sich die FMXLinux technisch betrachtet in Delphi?

Wie bereits erwähnt, unterstützt Delphi von Haus aus nur Konsolenprogramme für Linux. Damit die FMX-Units, die normalerweise für die Entwicklung für Desktop-Anwendungen für Windows und MAC OS verwendet werden, auch unter Linux genutzt werden können, müssen diese angepasst werden.

Aber keine Sorge, Ihre Originaldateien werden nicht angerührt. Während der Installation von FMXLinux kopiert das Installationsprogramm die FMX-Units der vorhandenen Delphi-Installation in ein eigenes Verzeichnis und passt die Dateien dort so an, dass sie auch unter Linux verwendet werden können.

Damit diese "gepatchten" Dateien und nicht die von der Original-Delphi-Installation verwendet werden, wird bei der erstmaligen Hinzufügung der Linux-Plattform zu einem Projekt ein entsprechender Eintrag in dem Suchpfad vorgenommen:

 

How does the FMXLinux integrate technically in Delphi?

As mentioned before, Delphi only supports console programs for Linux. In order to be able to use the FMX units, which are normally used for development for desktop applications for Windows and MAC OS, also under Linux, they must be adapted.

But do not worry, your original files will not be touched. During the installation of FMXLinux, the installation program copies the FMX units of the existing Delphi installation into a separate directory and adjusts the files there so that they can also be used under Linux.

In order for these "patched" files to be used, rather than the original Delphi installation, the first time the Linux platform is added to a project, a corresponding entry is made in the search path:



 
Wie sieht es mit der Unterstützung von FMXLinux seitens Komponentenherstellern aus?

Hier wächst die Unterstützung. TMS-Software war schon sehr früh dabei, ich verwende auch einige Komponenten des TMS FMX-UI-Packs in meinen Cross Platform Projekten.

Auf der Seite des Herstellers finden Sie eine Liste:

https://fmxlinux.com/tlist.html
 

Whats about the component manufacturers' support of FMXLinux?

Here the support grows. TMS software was very early on, I also use some components of the TMS FMX UI pack in my Cross Platform projects.

On the manufacturer's page you will find a list:

https://fmxlinux.com/tlist.html

Wie sind die bisher mit FMXLinux gemachten Erfahrungen?

Inzwischen liegt FMXLinux in einer recht stabilen Version 1.25 vor.

Es hat bislang alles recht gut funktioniert. Bei evtl. Problemen kann man dies auf der Seite des Herstellers melden (Bug Tracker) und bislang dauerte es nie lang, bis das gemeldete Problem in der nächsten Version von FMXLinux behoben wurde.

Ich habe bereits zwei mittlere FMX-Projekte um die Linux-Plattform ergänzt, ein Rechnungsprogramm und ein Datenbankprogramm. Gerade bin ich dabei, auch mein E-Mail-Programm von der VCL-Version in die FMX-Version zu konvertieren, siehe zu allen drei erwähnten Programmen nachfolgend Screenshots, um einen kurzen Eindruck zu erhalten:

 

What are the experiences so far with FMXLinux?


Meanwhile, FMXLinux is in a fairly stable version 1.25.

It has worked pretty well so far. If there are any problems you can report this on the manufacturer's website (Bug Tracker) and so far it has not taken long for the reported issue to be resolved in the next version of FMXLinux.

I have already added two middle FMX projects to the Linux platform, a billing program and a database program. I am currently converting my e-mail program from the VCL version to the FMX version as well. See screenshots below for all three mentioned programs on Linux to get a brief impression:


Database-program PC-Database

Accounting program PC-Rechnung:

E-Mail-program Safer Mail (currently under development):