FireMonkey on Linux!

Posted by on in Blogs

It did not take long since the release of Delphi Linux compiler to have the ability to build Linux GUIs with Delphi!

Just go to http://fmxlinux.com and get the only currently available download of FireMonkey for Linux which is "Free Trial v 0.905".

You need to have RAD Studio 10.2 "Tokyo" installed. Make sure it is not running and install the trial. It is small and installs very fast. Run Delphi and create a new multi-device project. Drop a button on the form and write just one line of code in the "OnClick" event handler to display "Hello World from Delphi on Linux desktop!" in the caption of the form. Save all and run on Windows just to be sure;-)

The FmxLinux trial installed the actual Delphi FireMonkey for Linux, but also the IDE integration. If you now right-click on the "Hello World" project in the Project Manager, you will see that there is new item in the context menu "Add Linux Platform". Click on it and here we are! Our multi-device app is now having "Linux Target" active!

The last step is to deploy and run the test app on a Linux desktop installation. That's quick. I'm using Mac and VMWare for virtualization. Download Ubuntu 16.04 Desktop ISO and create a new VM using "Linux Easy Install" option in VMWare Fusion. That's very similar to creating Ubuntu Server VM. Now we need to have Delphi 10.2 PAServer running on Ubuntu Desktop. Probably the easiest solution is to upload the Linux PAServer archive somewhere and download it with integrated FireFox web browser to our Ubuntu desktop installation. Just double-click on the PAServer download to unpack it and drag the contents of the archive somewhere in your file system. For example into "Documents".

Right-click on Ubuntu desktop and select the option to open terminal session. Change directory into where the PAServer is unpacked and run it with "./PAServer" command. Optionally enter password and then enter "i" to list IP addresses to use to connect to the PAServer.

Now in Delphi right-click on Linux target platform and select "Edit Connection". Create a new connection and enter the IP address from the PAServer's "i" command. What I have found tricky was the fact that I needed to leave the password field blank to connect.

If "Test Connection" works, you just need to click on the green arrow "Run" button to build, deploy and run the app.

 

It is so cool! Delphi FireMonkey GUI app running on Linux!



About
Gold User, Rank: 9, Points: 364
Crazy about Delphi Programming!

Comments

  • Kaspar N7812
    Kaspar N7812 Monday, 24 April 2017

    Really a great developement. Thanks to eugene and his friends!

  • Arthur
    Arthur Saturday, 15 April 2017

    Install: C:\FmxLinux
    Add library path: C:\FmxLinux\Source
    When try compile: [Warning Warning] Local file "\Redist\libfmux.so" not found. Skipping deployment.
    In Linux Terminal: Runtime error 217 at 0000000000664245

  • unSigned
    unSigned Thursday, 13 April 2017

    Why is this feature not official but a 3rd party component?

  • GodfreyF
    GodfreyF Monday, 24 April 2017

    It should have been, but EMB fired the developer who made it.

  • Tee
    Tee Monday, 24 April 2017

    Wow! I actually went and looked up Eugene (the owner of the FmxLinux web site) to verify this.
    Double-Wow! I did not realise that he was actually the original designer and one of the developers of the FMX Framework, before it became part of EMB!

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: