Linux Application Development
RAD Studio allows you to develop applications for the target Linux platform. Using RAD Studio installed on Windows machine, you can create a 64-bit Linux application and deploy it to the Linux machine. Developing Linux applications is similar to creating Android apps in RAD Studio. However, for Linux, you cannot create the visual VCL and FireMonkey applications. Here is the list of apps that are available for the Linux platform:
- Console Application
- EMS Package (RAD Server)
- DataSnap
- DataSnap WebBroker
- WebBroker
- Dynamic-link Libraries
- DUnitX Project
Contents
Prerequisites
To develop Linux applications, you need to have the RAD Studio installed on the Windows PC as well as a machine with the Linux platform (can be a virtual machine).
Preparing Your Linux Development Environment
To prepare your development system (PC) and Linux machine for application development with RAD Studio:
- Install RAD Studio on your Windows PC
- Install Development Packages
- Prepare your Linux machine
- Create a Connection profile
- Add the installed SDK to the RAD Studio
- Run PAServer on Linux machine
Installing Development Packages
To install the development packages on Ubuntu:
- Right-click your desktop and select Open Terminal.
- To upgrade the packages you have already installed , type
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
in the terminal. - Type your user password and press Enter
- Wait until prompted to agree to the package upgrade operation. Type Y and press Enter
- Wait until the package upgrade operation is complete. It may take a few minutes to complete.
- To add the development packages, type
sudo apt install joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5
in the terminal. - Type your user password and press Enter
- Wait until prompted to agree to the package installation operation. Type Y and press Enter
- Wait until the pacjage installation operation is complete. It may take a few minutes to complete.
To install the development packages on Red Hat:
- Right-click your desktop and select Open Terminal.
- Type
yum groupinstall 'Development Tools'
in the terminal. - Press Enter and wait until the package installation operation is complete. It may take a few minutes to complete.
Preparing Your Linux Machine
To create Linux applications, you need to add a virtual machine PAServer:
- 1. Find the
LinuxPAServer21.0.tar.gz
file in the following location:C:\Program Files (x86)\Embarcadero\Studio\21.0\PAServer\LinuxPAServer21.0.tar.gz
- 2. Unpack the
LinuxPAServer21.0.tar.gz
file.
To use the System.zLib
unit on Red Hat:
- 1. Install the
zLib-devel
library to your RHEL machine with the following command:sudo yum install zlib-devel
- 2. Update the local SDK cache.
To use the System.zLib
unit on Ubuntu:
- 1. Install the
zLib-devel
library to your Ubuntu machine with the following command:sudo apt-get install zlib1g-dev
- 2. Update the local SDK cache.
Creating a Connection Profile
- Right-click the folder where you have unpacked the
LinuxPAServer21.0.tar.gz
file, and then click Open in Terminal. - Enter
./paserver
in terminal. Then, press Enter. - On the Tools > Options > Environment Options > Connection Profile Manager page, click the Add button. The Create a Connection Profile wizard opens.
- On the Profile information page, enter the following:
- In the Profile name field, enter the needed name.
- In the Platform field, click the 64-bit Linux platform.
- Click Next.
- On the Remote machine information page, enter the following:
- In the Remote machine field, enter the IP address or Machine name.
- Click Test Connection to check if the values are valid.
- Click Finish.
Adding the Installed SDK to RAD Studio
- On the Tools > Options > Environment Options > SDK Manager page, click the Add button.
- In the Add a New SDK dialog, enter the following:
- In the Select a platform field, click 64-bit Linux.
- In the Select a profile to connect, select a created profile from the drop-down list.
- In the Select an SDK version field, the name of the SDK that you just installed will automatically appear. If you have not installed SDK previously, you can do it on this step. If you have already installed SDK, move on to the next step.
Running PAServer on Linux machine
To run the PAServer on your Linux machine:
- Open the terminal, and then run PAServer in the terminal.
Developing Your Application
- Select the project type for your Delphi application.
- File > New > Other > Delphi Projects:
- Console Application
- DUnitX Project
- Dynamic-link Library
- Package
- File > New > Other > Delphi Projects > DataSnap Server:
- DataSnap Server
- DataSnap WebBroker
- File > New > Other > Delphi Projects > WebBroker > WebBroker Application
- File > New > Other > Delphi Projects:
See Also
- Install Linux SDK
- Prepare your Linux machine
- Create a Connection profile
- Add the installed SDK to the RAD Studio
- Run PAServer on Linux machine
- FireMonkey for Linux
- Building a Linux ‘Hello World’ Console Application
- Warning messages (Delphi)
- Delphi and RedHat or Ubuntu for Linux development
- Ubuntu 16.04 LTS for Linux Development with Upcoming Delphi 10.2