Delphi 10.4 — Linux Development Environment Setup Guide
4 min readNov 8, 2024
- Install a Linux virtual machine, such as Ubuntu 16.04 or what you want
- Locate the file “LinuxPAServer21.0.tar.gz” in the Delphi 10.4 program directory under PAServer for Linux.
- Extract the “LinuxPAServer21.0.tar.gz” file to a directory such as the home directory on Linux.
- Set the permissions of the extracted PAServer and other program files to be readable, writable, and executable.
- Open a terminal and enter
./paserver
to run it. Then, provide the Linux login user's password to start the PAServer program.
- Open Delphi, click on Tools — Options — Deployment — Connection Profile Manager — Add to create a new connection profile for the Linux virtual machine.
- Click Next, enter the IP address of the Linux virtual machine, the login password of the Linux user, and then click the Test Connection button to test the connection. This will complete the connection with the PAServer on the Linux machine.
- Click the Finish button to allow Delphi to automatically download various runtime libraries, SDKs, and other necessary files from the Linux machine.
- Install FMXLinux in Delphi (skip this step if you do not need to develop Linux desktop applications).
Here are the steps to install FMXLinux:
- Create a new subdirectory in C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository, such as FmxLinux-1.46.
- Extract the FMXLinux1.46.zip file into the newly created directory.
- Open Delphi 10.4, go to Options > Language > Delphi > Library, select the Linux64 platform, and add the two output directories of FMXLinux:
FmxLinux-1.46\Lib\Linux64\Debug
FmxLinux-1.46\Lib\Linux64\Release
Also, add C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\bin\FmuxLib.dll.- Restart Delphi 10.4 IDE.
- In the Windows Registry, navigate to the path
[HKEYCURRENTUSER]\Software\Embarcadero\BDS\21.0\Exports
, create a new String Value named FmxLinux, and set the string value to the appropriate path (you may need to fill this part based on the FMXLinux installation).
- If you need to develop console applications or QuickBurro for Linux middleware plugins for Linux, create a Console Application or Dynamic Link Library (DLL) project. Then, in the project management area on the right side, select the Linux 64 platform to begin development.
- If you need to write Linux desktop applications, create a Multi-Device Application. Then, in the project management area on the right, simply add the Linux Platform and select it to begin development.
If you encounter the following error while building a Linux application:
(It seems like you’re about to provide an error message. Could you share the specific error you’re seeing so I can help with the solution?)
If you encounter an error related to missing the zlib SDK while building a Linux application, you can resolve it by following these steps:
- Install the Zlib development library in the PAServer Linux environment: Run the following command in your Linux terminal:
- sudo apt-get install joe wget p7zip-full curl build-essential zlib1g-dev libcurl4-gnutls-dev
During installation, you might be prompted to install additional recommended packages:
sudo apt-get install doc-base krb5-doc libgcrypt20-doc gmp-doc libgmp10-doc libmpfr-dev gnutls-bin gnutls-doc krb5-user
- Update the local Linux SDK in Delphi IDE:
- Go to Options > Deployment > SDK Manager in Delphi.
- Select the appropriate Linux SDK version.
- Click the “Update Local File Cache” button to refresh the local cache and include the newly installed zlib library files.
- Rebuild the application to ensure the necessary zlib files are included and the build process completes successfully.