Deploy your Delphi applications with this plug-n-play Ubuntu Linux VM

Here’s the thing, setting up VMs can be a pain in the… neck. Especially when you have just try something out quickly to know if it works.

I get that pain. I felt the same way about putting in several hours of

  • learning to configure the VM machine
  • download the right ISO
  • installing it
  • running the right commands to update the OS
  • running the right commands to install the dev tools for the OS
  • installing and running the PAServer

And all to do what? See if a ‘Hello World’ app will run?? No way! That’s way too much time to try something, right?!

So here’s my solution to get all you Delphi guys out there up and running with Linux GUI development without going through the pain of doing the steps above.

I present to you… *drums rolling*… the plug-n-play Ubuntu 20.04 (latest as of this blogs date) with all necessary stuff pre-installed to run with Delphi Sydney 10.4! Yeah… just follow the steps below and you should be ready to building applications straight out of the VM box! Sounds interesting? Read on…

What you will need is…

  1. Virtualbox ( www.virtualbox.org ). The version that I have at the time of this blog is 6.1.

2. You may also want to install the Virtualbox Extension Pack ( https://www.virtualbox.org/wiki/Downloads ) . Remember, its is free for personal use however if you are a commercial user, you need to buy it. Refer to the their doc wiki on licensing ( https://www.virtualbox.org/wiki/Licensing_FAQ ) for more information.

3. Delphi 10.4 Sydney – Enterprise Edition ( https://www.embarcadero.com/products/delphi/downloads ). You need this edition (or higher) to do Linux development… which is totally worth it!

Delphi 10.4 Sydney Architect | The Ultimate Development Platform

4. The plug n play OS image files ( link here ) that works with Delphi 10.4.

Note: the names of the actual files that you have downloaded may differ from the image above.

Do you have the all the above files? Super! Lets go!

Steps:

  1. Install the Virtualbox software – Nothing much to explain in this step.
  2. Install the Extension pack – Ditto.

Once you have done that, run Virtualbox and you should see an empty list like this:

3. Click Machine > Add – This will show the file open dialog box. Choose the .vbox file that you have downloaded from the above steps.

4. Once you do that, the pre configured VM will be added to the list. It should look something like this.

5. At this point, you may need to reconfigure a few things based on the hardware you plan to run the VM on. To do that, click the menu button against the imported VM and then click Detail > Settings. You want to ensure that nothing of the following is running in red:

Its best to run the on a host with 16 gig machine so that you can allocate 8 gigs to the VM.
Ensure that you haven’t exceed the number of allowed CPUs for the VM.
The storage should be pointing to the right file. If it is not, create a new SATA Controller and choose the correct VDI file path.

Important: Since this VM has been configured on my machine, it should give you an error finding the path of the storage file. You have to remove the above SATA controller and follow these steps to fix it:

  • Click on File > Virtual Media Manager
  • Remove the hard disk stored as follows:
  • Click Add and choose the new file where you have unpacked the files from the above link
  • Next, open setting for your virtual machine, goto the storage and select the hard disk you added in the step before.
  • Next, open setting for your virtual machine, goto the storage and select the hard disk you added in the step before
This is important for Internet access within the VM.

Assuming that you have configured everything okay, you can click the Start button and the VM should start

Depending on the config of your machine, the VM may take time to load up. Looks something like this:

The default password with root access is : ubuntu

Once you have logged in, you can check where the PAServer is present

Open the application list and find Terminal in the list

Once you run the Terminal application, type the following commands to start the pre-installed PAServer. Each command is indicated with a red arrow.

Do not put password for running the PAServer. You should see the PAServer running as above.

On the above terminal application, type ‘i’ and hit enter. The PAServer responds with the IP address of the VM. Please note it. And yes, please keep the VM and PAServer running!

Now that your Linux VM is up and running, time to configure things on the RAD Studio side which is probably simplest of all things.

Open up RAD Studio, click Tools > Options > SDK Manager

Click Add and create a new profile for Linux 64 bit.

Put the IP that you got from the running PAServer on Linux. Password is blank and click Test Connection to determine if everything is good. After that hit Finish.

Warning: for the next few minutes, RAD Studio will sped time getting tonnes of files from the VM. This can be pretty long… and it might seem its in a loop. Don’t worry… it will finish eventually. Save it and close the Options window.

After that, open up Tools > Getit Package Manager and type ‘fmxlinux’ in the search bar. You should see two libraries pop list.

Install FMXLinux and the FMX Linux Samples.

Finally, open a new multi device application, choose target platform as Linux 64bit and click Run. If you VM is running the PAServer, you will be able to see a blank application popup on your VM in a minute or two.

The above is a snapshot of a sample app I deployed after following the above steps.

Hope this helped! Happy Linux coding!

2 Replies to “Deploy your Delphi applications with this plug-n-play Ubuntu Linux VM”

Leave a Reply

Your email address will not be published. Required fields are marked *